diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-29 06:22:41 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-29 06:22:41 +0000 |
| commit | 00e5987be5ae3b7c108866ac1dba4403cc4306d5 (patch) | |
| tree | fe0a9e079d59ddd8881908a2449dee49add57ba8 /pw/pw.h | |
| parent | 8b5f16fbd8d18aa47074a93c215947b3401257e7 (diff) | |
| download | pw-darwin-00e5987be5ae3b7c108866ac1dba4403cc4306d5.tar.gz pw-darwin-00e5987be5ae3b7c108866ac1dba4403cc4306d5.zip | |
Create a strtounum function using the same API as strtonum
This function returns uintmax_t
Use this function to convert to gid_t/uid_t
Diffstat (limited to 'pw/pw.h')
| -rw-r--r-- | pw/pw.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -32,6 +32,7 @@ #include <string.h> #include <unistd.h> #include <stdarg.h> +#include <inttypes.h> #include <errno.h> #include <sys/types.h> #include <sys/stat.h> @@ -101,3 +102,6 @@ char *pw_pwcrypt(char *password); extern const char *Modes[]; extern const char *Which[]; + +uintmax_t strtounum(const char *numstr, uintmax_t minval, uintmax_t maxval, + const char **errmsg); |
