]> granicus.if.org Git - sudo/commitdiff
Add definitions of OPEN_MAX and INT_MAX for those without it and remove
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 1 Jun 2004 16:23:10 +0000 (16:23 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 1 Jun 2004 16:23:10 +0000 (16:23 +0000)
definition of RLIM_INFINITY (now unused).

compat.h

index 381eafda689b2b40ab5e02bff5d48b11b98271f4..f6fb926e647cb0372f19be658d950af4044b89aa 100644 (file)
--- a/compat.h
+++ b/compat.h
 #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.