diff options
author | Jens Hamisch <jens@Strawberry.COM> | 2000-11-14 12:34:40 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-14 15:42:40 +0000 |
commit | 1e743fda37685ecafb0bc463ccd70b605724c884 (patch) | |
tree | 03b8db2b21002acf1312ed8aed1580cabba50256 /perl.h | |
parent | fd826df20626be7c608e33b1edcdc11e7174f60a (diff) | |
download | perl-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.h | 30 |
1 files changed, 26 insertions, 4 deletions
@@ -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 |