summaryrefslogtreecommitdiff
path: root/hints/dec_osf.sh
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-10-08 08:40:21 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2014-10-08 22:37:29 +0200
commitf62f716d325db54bb85abeeb80fa2b4466ff860b (patch)
treea31c290095a0c15bfd9db3bf59f8e737bc0a9dba /hints/dec_osf.sh
parent36252f000ad9d912b065ff84daf4faaee722ad4e (diff)
downloadperl-f62f716d325db54bb85abeeb80fa2b4466ff860b.tar.gz
Tru64: the socket API defines must come early.
There seems to be no way around needing to select the socket API early.
Diffstat (limited to 'hints/dec_osf.sh')
-rw-r--r--hints/dec_osf.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index 5a168061c3..1897d6b91b 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -528,7 +528,6 @@ gcc) ;;
# -readonly_strings moves string constants into read-only section
# which hopefully means that modifying them leads into segmentation
# faults.
- #
for i in -trapuv -readonly_strings
do
case "$ccflags" in
@@ -539,8 +538,24 @@ gcc) ;;
;;
esac
-# Would need -D_SOCKADDR_LEN for the Configure test.
-d_sockaddr_sa_len='define'
+# In Tru64 several slightly incompatible socket APIs are supported,
+# which one applies is chosen with a set of defines:
+# -D_SOCKADDR_LEN enables 4.4BSD and IPv6 interfaces
+# -D_POSIX_PII_SOCKET enables socklen_t instead of size_t
+for i in -D_SOCKADDR_LEN -D_POSIX_PII_SOCKET
+do
+ case "$ccflags" in
+ *$i*) ;;
+ *) ccflags="$ccflags $i" ;;
+ esac
+done
+# For OSF/1 3.2, however, defining _SOCKADDR_LEN would be
+# a bad idea since it breaks send() and recv().
+case "$ccflags" in
+*DEC_OSF1_3_X*SOCKADDR_LEN*)
+ ccflags=`echo " $ccflags " | sed -e 's/ -D_SOCKADDR_LEN / /'`
+ ;;
+esac
#
# Unset temporary variables no more needed.