summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-03-30 15:38:21 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-01 12:01:35 +1200
commitd574b85ef38b533c29517c911f5b03db91196ab8 (patch)
treedde5247b099e81bb216aa1ad9bb97ce13b1ab8c5 /pp_sys.c
parent22921e25517d6c195d0fab9eb946bfafb563c256 (diff)
downloadperl-d574b85ef38b533c29517c911f5b03db91196ab8.tar.gz
Improve definition of Sock_size_t
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 3b06b9ccb1..00012c315d 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -89,11 +89,13 @@ extern int h_errno;
# define vfork fork
#endif
-/* Put this after #includes because <unistd.h> defines _XOPEN_VERSION. */
-#if _XOPEN_VERSION >= 4
-# define Sock_size_t Size_t
-#else
-# define Sock_size_t int
+/* Put this after #includes because <unistd.h> defines _XOPEN_*. */
+#ifndef Sock_size_t
+# if _XOPEN_VERSION >= 5 || defined(_XOPEN_SOURCE_EXTENDED)
+# define Sock_size_t Size_t
+# else
+# define Sock_size_t int
+# endif
#endif
#if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)