2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Remove _MAX and _MIN defines that any system from the last 20 years

should have.  Add ULLONG_MAX in case it is missing.
This commit is contained in:
Todd C. Miller 2013-12-16 14:52:31 -07:00
parent 68f6e23b07
commit f689a86354
2 changed files with 9 additions and 16 deletions

View File

@ -33,6 +33,7 @@
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
#include <termios.h>
#include <limits.h>
#include "missing.h"
#include "sudo_debug.h"

View File

@ -124,22 +124,6 @@
# 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
@ -156,6 +140,14 @@
# endif
#endif
#ifndef ULONG_MAX
# if defined(UQUAD_MAX)
# define ULLONG_MAX UQUAD_MAX
# else
# define ULLONG_MAX 0xffffffffffffffffULL
# endif
#endif
#ifndef PATH_MAX
# ifdef _POSIX_PATH_MAX
# define PATH_MAX _POSIX_PATH_MAX