Fix for 687030, GS 8.11 builds but doesn't work on HPUX

Alex Cherepanov <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Organization Coscript Software
Message-ID <[email protected]>
HP-UX 11i 11.11 incorrectly defines FILENAME_MAX as 14 .
Ignore system defined FILENAME_MAX when it is too small.
gp_unifs.c.diff (text/plain, 827 B)
Index: gs/src/gp_unifs.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gp_unifs.c,v
retrieving revision 1.14
diff -b -u -r1.14 gp_unifs.c
--- gs/src/gp_unifs.c	20 Aug 2003 17:58:32 -0000	1.14
+++ gs/src/gp_unifs.c	11 Sep 2003 05:47:27 -0000
@@ -31,8 +31,14 @@
 
 /* Provide a definition of the maximum path length in case the system
  * headers don't define it. This should be gp_file_name_sizeof from
- * gp.h once that value is properly sent in a system-dependent way 
+ * gp.h once that value is properly sent in a system-dependent way.
+ * HP-UX 11i 11.11 incorrectly defines FILENAME_MAX as 14 .
  */
+#ifdef FILENAME_MAX
+#  if FILENAME_MAX < 80  /* arbitrary */
+#    undef FILENAME_MAX
+#  endif
+#endif
 #ifndef FILENAME_MAX
 #  define FILENAME_MAX 1024
 #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.