about summary refs log tree commit diff
path: root/Src/system.h
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-08-14 07:30:28 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-08-14 07:30:28 +0000
commit135b181aa6428bafa62b5029bfd944e88a20fa9c (patch)
tree605a84cb3366528518c0bcc1a0432c1f039be4cb /Src/system.h
parentf9cda7964fcdb3e86381df36c1cbfea62de749ab (diff)
downloadzsh-135b181aa6428bafa62b5029bfd944e88a20fa9c.tar.gz
zsh-135b181aa6428bafa62b5029bfd944e88a20fa9c.tar.xz
zsh-135b181aa6428bafa62b5029bfd944e88a20fa9c.zip
12604: Remove calls to zpathmax(), minor fixes to zopenmax().
Diffstat (limited to 'Src/system.h')
-rw-r--r--Src/system.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/Src/system.h b/Src/system.h
index 2ed75b621..3d23f5761 100644
--- a/Src/system.h
+++ b/Src/system.h
@@ -200,18 +200,15 @@ struct timezone {
 # ifdef MAXPATHLEN
 #  define PATH_MAX MAXPATHLEN
 # else
-   /* so we will just pick something */
-#  define PATH_MAX 1024
+#  ifdef _POSIX_PATH_MAX
+#   define PATH_MAX _POSIX_PATH_MAX
+#  else
+    /* so we will just pick something */
+#   define PATH_MAX 1024
+#  endif
 # endif
 #endif
-#ifndef HAVE_PATHCONF
-# define zpathmax(X) ((long)((strlen(X) >= PATH_MAX) ? \
-			     ((errno = ENAMETOOLONG), -1) : \
-			     ((errno = 0), PATH_MAX)))
-#endif
 
-/* we should be getting this value from sysconf(_SC_OPEN_MAX) */
-/* but this is too much trouble                               */
 #ifndef OPEN_MAX
 # ifdef NOFILE
 #  define OPEN_MAX NOFILE
@@ -221,7 +218,7 @@ struct timezone {
 # endif
 #endif
 #ifndef HAVE_SYSCONF
-# define zopenmax() (long) OPEN_MAX
+# define zopenmax() ((long) OPEN_MAX)
 #endif
 
 #ifdef HAVE_FCNTL_H