In house patch to use XPG7 standard NOTE : This patch will not be pushed upstream, as community is using XPG5 standards. --- ghostscript-9.22/contrib/pcl3/src/pclgen.c.orig 2017-11-15 22:39:33.665870850 +0000 +++ ghostscript-9.22/contrib/pcl3/src/pclgen.c 2017-11-15 22:40:06.218958657 +0000 @@ -52,7 +52,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif /* Standard headers */ --- ghostscript-9.22/contrib/pcl3/src/pclscan.c.orig 2017-11-15 22:39:33.678926042 +0000 +++ ghostscript-9.22/contrib/pcl3/src/pclscan.c 2017-11-15 22:40:18.977403291 +0000 @@ -14,7 +14,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif #ifndef _XOPEN_SOURCE_EXTENDED #define _XOPEN_SOURCE_EXTENDED 1 --- ghostscript-9.22/contrib/pcl3/src/pclcap.c.orig 2017-11-15 22:39:33.690765286 +0000 +++ ghostscript-9.22/contrib/pcl3/src/pclcap.c 2017-11-15 22:40:24.433529220 +0000 @@ -14,7 +14,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif /* Standard headers */ --- ghostscript-9.22/contrib/pcl3/src/pcl3opts.c.orig 2017-11-15 22:39:33.699537920 +0000 +++ ghostscript-9.22/contrib/pcl3/src/pcl3opts.c 2017-11-15 22:40:31.214560193 +0000 @@ -16,7 +16,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif /* Standard headers */ --- ghostscript-9.22/contrib/pcl3/src/gdevpcl3.c.orig 2017-11-15 22:39:33.708117318 +0000 +++ ghostscript-9.22/contrib/pcl3/src/gdevpcl3.c 2017-11-15 22:40:38.495432108 +0000 @@ -26,7 +26,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif /* Special Aladdin header, must be included before on some --- ghostscript-9.22/contrib/pcl3/src/pclsize.c.orig 2017-11-15 22:39:33.716785373 +0000 +++ ghostscript-9.22/contrib/pcl3/src/pclsize.c 2017-11-15 22:40:43.278651991 +0000 @@ -14,7 +14,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif /* Standard headers */ --- ghostscript-9.22/contrib/pcl3/src/pclcomp.c.orig 2017-11-15 22:39:33.722733512 +0000 +++ ghostscript-9.22/contrib/pcl3/src/pclcomp.c 2017-11-15 22:40:48.150119434 +0000 @@ -19,7 +19,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif /* Interface definition */ --- ghostscript-9.22/contrib/pcl3/eprn/eprnrend.c.orig 2017-11-15 22:39:33.731522701 +0000 +++ ghostscript-9.22/contrib/pcl3/eprn/eprnrend.c 2017-11-15 22:40:55.363194720 +0000 @@ -47,7 +47,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif /* Special Aladdin header, must be included before on some --- ghostscript-9.22/contrib/pcl3/eprn/mediasize.c.orig 2017-11-15 22:39:33.737465046 +0000 +++ ghostscript-9.22/contrib/pcl3/eprn/mediasize.c 2017-11-15 22:40:59.934371021 +0000 @@ -14,7 +14,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif #include "std.h" --- ghostscript-9.22/contrib/pcl3/eprn/eprnparm.c.orig 2017-11-15 22:39:33.745832998 +0000 +++ ghostscript-9.22/contrib/pcl3/eprn/eprnparm.c 2017-11-15 22:41:04.593953330 +0000 @@ -35,7 +35,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif /* Special Aladdin header, must be included before on some --- ghostscript-9.22/contrib/pcl3/eprn/gdeveprn.c.orig 2017-11-15 22:39:33.754233077 +0000 +++ ghostscript-9.22/contrib/pcl3/eprn/gdeveprn.c 2017-11-15 22:41:09.486215276 +0000 @@ -36,7 +36,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif /* Preprocessor symbol with version-dependent default */ --- ghostscript-9.22/contrib/pcl3/eprn/eprnfs.c.orig 2017-11-15 22:39:33.762834725 +0000 +++ ghostscript-9.22/contrib/pcl3/eprn/eprnfs.c 2017-11-15 22:41:14.645748439 +0000 @@ -25,7 +25,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif #include "gdeveprn.h" --- ghostscript-9.22/contrib/pcl3/eprn/pagecount.c.orig 2017-11-15 22:39:33.772209213 +0000 +++ ghostscript-9.22/contrib/pcl3/eprn/pagecount.c 2017-11-15 22:41:19.848722191 +0000 @@ -19,7 +19,7 @@ /*****************************************************************************/ #ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #endif #include "std.h" --- ghostscript-9.22/freetype/src/tools/ftrandom/ftrandom.c.orig 2017-11-15 22:39:33.778152105 +0000 +++ ghostscript-9.22/freetype/src/tools/ftrandom/ftrandom.c 2017-11-15 22:41:27.680390290 +0000 @@ -29,7 +29,7 @@ /* This file is now part of the FreeType library */ -#define _XOPEN_SOURCE 600 /* for `kill', `strdup', `random', and `srandom' */ +#define _XOPEN_SOURCE 700 /* for `kill', `strdup', `random', and `srandom' */ #include --- ghostscript-9.22/base/unistd_.h.orig 2017-11-15 22:39:33.786534768 +0000 +++ ghostscript-9.22/base/unistd_.h 2017-11-15 22:41:54.677828001 +0000 @@ -50,9 +50,9 @@ # define isatty(fd) _isatty(fd) # define setmode(fd, mode) _setmode(fd, mode) #else - /* _XOPEN_SOURCE 500 define is needed to get + /* _XOPEN_SOURCE 700 define is needed to get * access to pread and pwrite */ -# define _XOPEN_SOURCE 500 +# define _XOPEN_SOURCE 700 # define __USE_UNIX98 # include #endif