From 0fd55c6858b1ed5f985845d4fa4c97efef3f363e Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Wed, 29 Jul 2015 06:22:41 +0000 Subject: 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 --- pw/pw.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pw/pw.h') diff --git a/pw/pw.h b/pw/pw.h index ed3b715..3ab3c74 100644 --- a/pw/pw.h +++ b/pw/pw.h @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -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); -- cgit v1.2.3-56-ge451