From: Todd C. Miller Date: Tue, 1 Jun 2004 16:23:10 +0000 (+0000) Subject: Add definitions of OPEN_MAX and INT_MAX for those without it and remove X-Git-Tag: SUDO_1_6_8~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3970195197e26700f93ebac5a3b771452fc84ce3;p=sudo Add definitions of OPEN_MAX and INT_MAX for those without it and remove definition of RLIM_INFINITY (now unused). --- diff --git a/compat.h b/compat.h index 381eafda6..f6fb926e6 100644 --- a/compat.h +++ b/compat.h @@ -37,8 +37,16 @@ #endif /* __P */ /* - * Some systems do not define PATH_MAX. + * Some systems lack full limit definitions. */ +#ifndef OPEN_MAX +# define OPEN_MAX 256 +#endif + +#ifndef INT_MAX +# define INT_MAX 0x7fffffff +#endif + #ifndef PATH_MAX # ifdef MAXPATHLEN # define PATH_MAX MAXPATHLEN @@ -51,9 +59,6 @@ # endif #endif -/* - * Some systems do not define MAXHOSTNAMELEN. - */ #ifndef MAXHOSTNAMELEN # define MAXHOSTNAMELEN 64 #endif @@ -198,14 +203,6 @@ typedef struct sigaction sigaction_t; # endif #endif -/* - * HP-UX 9.x has RLIMIT_* but no RLIM_INFINITY. - * Using -1 works because we only check for RLIM_INFINITY and do not set it. - */ -#ifndef RLIM_INFINITY -# define RLIM_INFINITY (-1) -#endif - /* * If we lack getprogname(), emulate with __progname if possible. * Otherwise, add a prototype for use with our own getprogname.c.