summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJens Hamisch <jens@Strawberry.COM>2000-11-14 12:34:40 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-14 15:42:40 +0000
commit1e743fda37685ecafb0bc463ccd70b605724c884 (patch)
tree03b8db2b21002acf1312ed8aed1580cabba50256 /perl.h
parentfd826df20626be7c608e33b1edcdc11e7174f60a (diff)
downloadperl-1e743fda37685ecafb0bc463ccd70b605724c884.tar.gz
Hoist the duplicated socket/netdb include logic to perl.h;
undef SETERRNO in case SOCKS has defined it. Based on: Subject: [ID 20001114.002] Code-Cleanups concerning SOCKS5 and Solaris Message-Id: <20001114113440.A20005@Strawberry.COM> p4raw-id: //depot/perl@7683
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/perl.h b/perl.h
index 6f822dcf4a..f932198d3e 100644
--- a/perl.h
+++ b/perl.h
@@ -709,10 +709,32 @@ typedef struct perl_mstats perl_mstats_t;
#endif
#include <errno.h>
-#ifdef HAS_SOCKET
-# ifdef I_NET_ERRNO
-# include <net/errno.h>
-# endif
+
+#if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */
+# include <sys/socket.h>
+# if defined(USE_SOCKS) && defined(I_SOCKS)
+# if !defined(INCLUDE_PROTOTYPES)
+# define INCLUDE_PROTOTYPES /* for <socks.h> */
+# define PERL_SOCKS_NEED_PROTOTYPES
+# endif
+# include <socks.h>
+# ifdef PERL_SOCKS_NEED_PROTOTYPES /* keep cpp space clean */
+# undef INCLUDE_PROTOTYPES
+# undef PERL_SOCKS_NEED_PROTOTYPES
+# endif
+# endif
+# ifdef I_NETDB
+# include <netdb.h>
+# endif
+# ifndef ENOTSOCK
+# ifdef I_NET_ERRNO
+# include <net/errno.h>
+# endif
+# endif
+#endif
+
+#ifdef SETERRNO
+# undef SETERRNO /* SOCKS might have defined this */
#endif
#ifdef VMS