From: Jarkko Hietaniemi Date: Tue, 11 May 1999 22:03:48 +0000 (+0000) Subject: Add I_NETINET_TCP to help change #3391. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9cc6feabb930fb7cac992ab0a2febf2fb1986667;p=p5sagit%2Fp5-mst-13.2.git Add I_NETINET_TCP to help change #3391. p4raw-link: @3391 on //depot/perl: 1494e794755363d23b7bca66c4a024ccc839e963 p4raw-id: //depot/cfgperl@3394 --- diff --git a/Configure b/Configure index e326c3e..aeb379d 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Mon Apr 19 22:21:08 EET DST 1999 [metaconfig 3.0 PL70] +# Generated on Wed May 12 00:58:20 EET DST 1999 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <findhdr <" > foo\$\$.c $cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \ @@ -4356,7 +4355,7 @@ $grep "^[ ]*#.*\$wanted" | \ while read cline; do name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\` case "\$name" in - *[/\\\\]\$wanted) echo "\$name"; exit 0;; + */\$wanted) echo "\$name"; exit 0;; *) name='';; esac; done; @@ -5450,10 +5449,6 @@ if "$useshrplib"; then beos) # beos doesn't like the default, either. ;; - hpux*) - # hpux doesn't like the default, either. - tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\"" - ;; *) tmp_shrpenv="env LD_RUN_PATH=$shrpdir" ;; @@ -8008,6 +8003,7 @@ else eval $setvar done fi + : see if flock exists set flock d_flock eval $inlibc @@ -11957,6 +11953,10 @@ esac set i_neterrno eval $setvar +: see if netinet/tcp.h is available +set netinet/tcp.h i_netinettcp +eval $inhdr + : see if this is a poll.h system set poll.h i_poll eval $inhdr @@ -13039,6 +13039,7 @@ i_mntent='$i_mntent' i_ndbm='$i_ndbm' i_netdb='$i_netdb' i_neterrno='$i_neterrno' +i_netinettcp='$i_netinettcp' i_niin='$i_niin' i_poll='$i_poll' i_pthread='$i_pthread' diff --git a/config_h.SH b/config_h.SH index 00388e0..68dc253 100644 --- a/config_h.SH +++ b/config_h.SH @@ -1449,17 +1449,17 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * This macro surrounds its token with double quotes. */ #if $cpp_stuff == 1 -# define CAT2(a,b)a/**/b -# define STRINGIFY(a)"a" +#define CAT2(a,b)a/**/b +#define STRINGIFY(a)"a" /* If you can get stringification with catify, tell me how! */ -#else -# if $cpp_stuff == 42 -# define CAT2(a,b)a ## b -# define StGiFy(a)# a -# define STRINGIFY(a)StGiFy(a) -# else -# include "Bletch: How does this C preprocessor catenate tokens?" -# endif +#endif +#if $cpp_stuff == 42 +#define CAT2(a,b)a ## b +#define StGiFy(a)# a +#define STRINGIFY(a)StGiFy(a) +#endif +#if $cpp_stuff != 1 && $cpp_stuff != 42 +#include "Bletch: How does this C preprocessor catenate tokens?" #endif /* CPPSTDIN: @@ -2244,6 +2244,12 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$i_mntent I_MNTENT /**/ +/* I_NETINET_TCP: + * This symbol, if defined, indicates to the C program that it should + * include . + */ +#$i_netinettcp I_NETINET_TCP /**/ + /* I_POLL: * This symbol, if defined, indicates that exists and * should be included. diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 5182587..b2b1455 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -6,48 +6,49 @@ # ifdef I_SYS_TYPES # include # endif -#include -#ifdef MPE -# define PF_INET AF_INET -# define PF_UNIX AF_UNIX -# define SOCK_RAW 3 -#endif -#ifdef I_SYS_UN -#include -#endif +# include +# ifdef MPE +# define PF_INET AF_INET +# define PF_UNIX AF_UNIX +# define SOCK_RAW 3 +# endif +# ifdef I_SYS_UN +# include +# endif # ifdef I_NETINET_IN # include # endif -#include -#ifdef I_ARPA_INET -# include -#endif +# include +# ifdef I_ARPA_INET +# include +# endif +# ifdef I_NETINET_TCP +# include +# endif #else -#include "sockadapt.h" +# include "sockadapt.h" #endif -#include - #ifdef I_SYSUIO # include #endif #ifndef AF_NBS -#undef PF_NBS +# undef PF_NBS #endif #ifndef AF_X25 -#undef PF_X25 +# undef PF_X25 #endif #ifndef INADDR_NONE -#define INADDR_NONE 0xffffffff +# define INADDR_NONE 0xffffffff #endif /* INADDR_NONE */ #ifndef INADDR_BROADCAST -#define INADDR_BROADCAST 0xffffffff +# define INADDR_BROADCAST 0xffffffff #endif /* INADDR_BROADCAST */ #ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK 0x7F000001 +# define INADDR_LOOPBACK 0x7F000001 #endif /* INADDR_LOOPBACK */ #ifndef HAS_INET_ATON