Front page | perl.perl5.porters |
Postings from May 2003
[PATCH] OpenUNIX 8 support
Thread Next
From:
Rafael Garcia-Suarez
Date:
May 2, 2003 07:17
Subject:
[PATCH] OpenUNIX 8 support
Message ID:
20030502121208.3d235027.rgarciasuarez@free.fr
With this patch, bleadperl compiles and passes all tests on OpenUNIX 8
(UnixWare 7.1.2), with the system's cc, and default configuration.
The hints file defaulting to -Duseshrplib is disabled for OpenUNIX only;
this is a conservative approach, but it may make sense to disable it
for all svr5 systems.
The socketpair tests that cause hang are skipped ; see also :
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-01/msg00400.html
The pp_sys.c chunk corrects a problem with accept(2) : it resets the
length parameter to 0 when reading on an UNIX-domain socket. Weird.
I used the __SCO_VERSION__ cpp symbol, but it's maybe preferable
to add a -DACCEPT_ON_UNIX_SOCKS_IS_BROKEN symbol into ccflags, and
use that. I didn't test with gcc.
I'm not going to apply the Configure chunk (due to uname changes),
because metaconfig is scary.
Index: hints/svr5.sh
===================================================================
--- hints/svr5.sh (revision 1156)
+++ hints/svr5.sh (working copy)
@@ -1,4 +1,4 @@
-# svr5 hints, System V Release 5.x (UnixWare 7)
+# svr5 hints, System V Release 5.x (UnixWare 7, OpenUNIX 8)
# mods after mail fm Andy Dougherty
# Reworked by hops@sco.com Sept/Oct 1999 for UW7.1 platform support
# Boyd Gerber, gerberb@zenez.com 1999/09/21 for threads support.
@@ -96,14 +96,13 @@
d_setlinebuf='undef'
d_setregid='undef' d_setreuid='undef' # -- in /usr/lib/libc.so.1
-
# Broken C-Shell tests (Thanks to Tye McQueen):
# The OS-specific checks may be obsoleted by the this generic test.
sh_cnt=`sh -c 'echo /*' | wc -c`
csh_cnt=`csh -f -c 'glob /*' 2>/dev/null | wc -c`
csh_cnt=`expr 1 + $csh_cnt`
if [ "$sh_cnt" -ne "$csh_cnt" ]; then
- echo "You're csh has a broken 'glob', disabling..." >&2
+ echo "Your csh has a broken 'glob', disabling..." >&2
d_csh='undef'
fi
@@ -116,9 +115,9 @@
uw_ver=`uname -v`
uw_isuw=`uname -s 2>&1`
-if [ "$uw_isuw" = "UnixWare" ]; then
+if [ "$uw_isuw" = "UnixWare" -o "$uw_isuw" = "OpenUNIX" ]; then
case $uw_ver in
- 7.1*)
+ 8.*|7.1*)
d_csh='undef'
d_memcpy='define'
d_memset='define'
@@ -160,8 +159,10 @@
# lddlflags : must tell the linker to output a shared library
# use shared perl lib if the user doesn't choose otherwise
-if test "x$useshrplib" = "x"; then
- useshrplib='true'
+if test "$uw_isuw" != "OpenUNIX"; then
+ if test "x$useshrplib" = "x"; then
+ useshrplib='true'
+ fi
fi
case "$cc" in
Index: ext/Socket/socketpair.t
===================================================================
--- ext/Socket/socketpair.t (revision 1156)
+++ ext/Socket/socketpair.t (working copy)
@@ -114,7 +114,8 @@
ok (shutdown(LEFT, SHUT_WR), "shutdown left for writing");
# This will hang forever if eof is buggy, and alarm doesn't interrupt system
# Calls. Hence the child process minder.
-{
+SKIP: {
+ skip "SCO OpenUNIX has a bug with shutdown", 2 if $^O =~ /^svr/;
local $SIG{ALRM} = sub { warn "EOF on right took over 3 seconds" };
local $TODO = "Known problems with unix sockets on $^O"
if $^O eq 'hpux' || $^O eq 'super-ux';
Index: Configure
===================================================================
--- Configure (revision 1225)
+++ Configure (working copy)
@@ -3195,7 +3195,7 @@
mips) osname=mips_osf1 ;;
esac
;;
- unixware) osname=svr5
+ openunix|unixware) osname=svr5
osvers="$4"
;;
uts) osname=uts
Index: pp_sys.c
===================================================================
--- pp_sys.c (revision 1203)
+++ pp_sys.c (working copy)
@@ -2516,6 +2516,9 @@
len = sizeof saddr; /* EPOC somehow truncates info */
setbuf( IoIFP(nstio), NULL); /* EPOC gets confused about sockets */
#endif
+#ifdef __SCO_VERSION__
+ len = sizeof saddr; /* OpenUNIX 8 somehow truncates info */
+#endif
PUSHp((char *)&saddr, len);
RETURN;
End of Patch.
Thread Next
-
[PATCH] OpenUNIX 8 support
by Rafael Garcia-Suarez