From c74deb36764313d641529a64eccab12873c16376 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 30 Sep 2002 16:16:13 +0000 Subject: [PATCH] Patch #615069: Fix build problems on SCO Open Server 5. --- Lib/test/regrtest.py | 59 ++++++++++++++++++++++++++++++++++++++++- Modules/_cursesmodule.c | 2 +- Modules/_hotshot.c | 2 ++ configure.in | 19 ++++++++++--- 4 files changed, 76 insertions(+), 6 deletions(-) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 5204c0a4e727..2d806f16c75a 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -560,7 +560,7 @@ _expectations = { test_winreg test_winsound """, - 'unixware5': + 'unixware7': """ test_al test_bsddb @@ -584,6 +584,63 @@ _expectations = { test_winreg test_winsound """, + 'openunix8': + """ + test_al + test_bsddb + test_cd + test_cl + test_dl + test_gl + test_imgfile + test_largefile + test_linuxaudiodev + test_minidom + test_nis + test_ntpath + test_openpty + test_pyexpat + test_sax + test_socketserver + test_sunaudiodev + test_sundry + test_unicode_file + test_winreg + test_winsound + """, + 'sco_sv3': + """ + test_al + test_asynchat + test_bsddb + test_cd + test_cl + test_dl + test_fork1 + test_gettext + test_gl + test_imgfile + test_largefile + test_linuxaudiodev + test_locale + test_minidom + test_nis + test_ntpath + test_openpty + test_pyexpat + test_queue + test_sax + test_socketserver + test_sunaudiodev + test_sundry + test_thread + test_threaded_import + test_threadedtempfile + test_threading + test_unicode_file + test_winreg + test_winsound + """, 'riscos': """ test_al diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 2bee69c3b18a..033f14a5ba63 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -124,7 +124,7 @@ extern int setupterm(char *,int,int *); #include #endif -#if !defined(HAVE_NCURSES_H) && (defined(sgi) || defined(__sun)) +#if !defined(HAVE_NCURSES_H) && (defined(sgi) || defined(__sun) || defined(SCO5)) #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ typedef chtype attr_t; /* No attr_t type is available */ #endif diff --git a/Modules/_hotshot.c b/Modules/_hotshot.c index 894c3a268621..12a264418ece 100644 --- a/Modules/_hotshot.c +++ b/Modules/_hotshot.c @@ -55,6 +55,8 @@ typedef struct timeval hs_time; #ifndef PATH_MAX # ifdef MAX_PATH # define PATH_MAX MAX_PATH +# elif defined (_POSIX_PATH_MAX) +# define PATH_MAX _POSIX_PATH_MAX # else # error "Need a defn. for PATH_MAX in _hotshot.c" # endif diff --git a/configure.in b/configure.in index 71b20a5ff257..bf2959b9375a 100644 --- a/configure.in +++ b/configure.in @@ -55,7 +55,8 @@ AC_MSG_CHECKING(MACHDEP) if test -z "$MACHDEP" then ac_sys_system=`uname -s` - if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then + if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then ac_sys_release=`uname -v` else ac_sys_release=`uname -r` @@ -387,11 +388,17 @@ then *) OPT="-O3 -Wall -Wstrict-prototypes";; esac + case $ac_sys_system in + SCO_SV*) OPT="$OPT -m486 -DSCO5";; + esac ;; *) case $ac_sys_system in OpenUNIX*|UnixWare*) OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; + SCO_SV*) + CFLAGS="$CFLAGS -belf" + OPT="-belf -O -Ki486 -DSCO5";; *) OPT="-O";; esac @@ -833,7 +840,7 @@ then then LDSHARED="$(CC) -shared" else LDSHARED="$(CC) -G" fi;; - SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; + SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";; Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; *) LDSHARED="ld";; @@ -862,7 +869,11 @@ then then CCSHARED="-fPIC" else CCSHARED="-KPIC" fi;; - SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; + SCO_SV*) + if test "$GCC" = "yes" + then CCSHARED="-fPIC" + else CCSHARED="-Kpic -belf" + fi;; Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; @@ -899,7 +910,7 @@ then fi LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; - SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; + SCO_SV*) LINKFORSHARED="-Wl,-Bexport";; ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; FreeBSD*|NetBSD*|OpenBSD*) if [[ "`$CC -dM -E -