Use strtonum() instead of atoi(), strtol() or strtoul() where possible.

This commit is contained in:
Todd C. Miller
2013-12-10 16:23:21 -07:00
parent f83eac40eb
commit 8f9ce7249a
22 changed files with 227 additions and 200 deletions

View File

@@ -124,10 +124,38 @@
# define OPEN_MAX 256
#endif
#ifndef USHRT_MAX
# define USHRT_MAX 0xffff
#endif
#ifndef INT_MAX
# define INT_MAX 0x7fffffff
#endif
#ifndef INT_MIN
# define INT_MIN (-0x7fffffff-1)
#endif
#ifndef UINT_MAX
# define UINT_MAX 0xffffffffU
#endif
#ifndef LLONG_MAX
# if defined(QUAD_MAX)
# define LLONG_MAX QUAD_MAX
# else
# define LLONG_MAX 0x7fffffffffffffffLL
# endif
#endif
#ifndef LLONG_MIN
# if defined(QUAD_MIN)
# define LLONG_MIN QUAD_MIN
# else
# define LLONG_MIN (-0x7fffffffffffffffLL-1)
# endif
#endif
#ifndef PATH_MAX
# ifdef _POSIX_PATH_MAX
# define PATH_MAX _POSIX_PATH_MAX