summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-05-11 22:03:48 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-05-11 22:03:48 +0000
commit9cc6feabb930fb7cac992ab0a2febf2fb1986667 (patch)
tree736aa7fe34919dd58d35dc7dbecfe76629b1253b
parent27130c9a98b24c6442a9f796599b1927247c27ab (diff)
downloadperl-9cc6feabb930fb7cac992ab0a2febf2fb1986667.tar.gz
Add I_NETINET_TCP to help change #3391.
p4raw-link: @3391 on //depot/perl: 1494e794755363d23b7bca66c4a024ccc839e963 p4raw-id: //depot/cfgperl@3394
-rwxr-xr-xConfigure27
-rw-r--r--config_h.SH26
-rw-r--r--ext/Socket/Socket.xs43
3 files changed, 52 insertions, 44 deletions
diff --git a/Configure b/Configure
index e326c3e303..aeb379de50 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$$ <<EOF
@@ -605,6 +605,7 @@ i_mntent=''
i_ndbm=''
i_netdb=''
i_neterrno=''
+i_netinettcp=''
i_niin=''
i_sysin=''
i_poll=''
@@ -4342,13 +4343,11 @@ echo "Your cpp writes the filename in the $pos field of the line."
$cat >findhdr <<EOF
$startsh
wanted=\$1
-for usrincdir in $usrinc
-do
- if test -f \$usrincdir/\$wanted; then
- echo "\$usrincdir/\$wanted"
- exit 0
- fi
-done
+name=''
+if test -f $usrinc/\$wanted; then
+ echo "$usrinc/\$wanted"
+ exit 0
+fi
awkprg='{ print \$$fieldn }'
echo "#include <\$wanted>" > 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 00388e0fa6..68dc253959 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -1449,17 +1449,17 @@ sed <<!GROK!THIS! >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 <<!GROK!THIS! >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 <netinet/tcp.h>.
+ */
+#$i_netinettcp I_NETINET_TCP /**/
+
/* I_POLL:
* This symbol, if defined, indicates that <poll.h> exists and
* should be included.
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 51825871b7..b2b145577f 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -6,48 +6,49 @@
# ifdef I_SYS_TYPES
# include <sys/types.h>
# endif
-#include <sys/socket.h>
-#ifdef MPE
-# define PF_INET AF_INET
-# define PF_UNIX AF_UNIX
-# define SOCK_RAW 3
-#endif
-#ifdef I_SYS_UN
-#include <sys/un.h>
-#endif
+# include <sys/socket.h>
+# ifdef MPE
+# define PF_INET AF_INET
+# define PF_UNIX AF_UNIX
+# define SOCK_RAW 3
+# endif
+# ifdef I_SYS_UN
+# include <sys/un.h>
+# endif
# ifdef I_NETINET_IN
# include <netinet/in.h>
# endif
-#include <netdb.h>
-#ifdef I_ARPA_INET
-# include <arpa/inet.h>
-#endif
+# include <netdb.h>
+# ifdef I_ARPA_INET
+# include <arpa/inet.h>
+# endif
+# ifdef I_NETINET_TCP
+# include <netinet/tcp.h>
+# endif
#else
-#include "sockadapt.h"
+# include "sockadapt.h"
#endif
-#include <netinet/tcp.h>
-
#ifdef I_SYSUIO
# include <sys/uio.h>
#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