File: use_PATH_MAX_from_climits

package info (click to toggle)
swish%2B%2B 6.1.5-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,904 kB
  • sloc: ansic: 11,936; lisp: 804; sh: 629; perl: 366; makefile: 42
file content (36 lines) | stat: -rw-r--r-- 1,254 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- a/util.h
+++ b/util.h
@@ -36,19 +36,20 @@
 #include <sys/stat.h>
 #include <unistd.h>			            /* for _exit(2), geteuid(2) */
 
-//
-// POSIX.1 is, IMHO, brain-damaged in the way it makes you determine the
-// maximum path-name length, so we'll simply pick a sufficiently large constant
-// such as 1024.  In practice, this is the actual value used on many SVR4 as
-// well as 4.3+BSD systems.
-//
-// See also: W. Richard Stevens.  "Advanced Programming in the Unix
-// Environment," Addison-Wesley, Reading, MA, 1993.  pp. 34-42.
-//
-#ifdef	PATH_MAX
-#undef	PATH_MAX
-#endif
-int const		    PATH_MAX = 1024;
+// Forgo upstreams way of setting PATH_MAX and use the value from climits
+// //
+// // POSIX.1 is, IMHO, brain-damaged in the way it makes you determine the
+// // maximum path-name length, so we'll simply pick a sufficiently large constant
+// // such as 1024.  In practice, this is the actual value used on many SVR4 as
+// // well as 4.3+BSD systems.
+// //
+// // See also: W. Richard Stevens.  "Advanced Programming in the Unix
+// // Environment," Addison-Wesley, Reading, MA, 1993.  pp. 34-42.
+// //
+// #ifdef	PATH_MAX
+// #undef	PATH_MAX
+// #endif
+// int const		    PATH_MAX = 1024;
 
 // local
 #include "exit_codes.h"