Commit 92f63ab2 authored by Kean Johnson's avatar Kean Johnson

SCO port update for SCO OpenServer 5 and UnixWare 7. A few general cleanups

    and bugs not specifically related to the port fixed along the way.
parent 4a64cca6
...@@ -65,16 +65,20 @@ in this Software without prior written authorization from The Open Group. ...@@ -65,16 +65,20 @@ in this Software without prior written authorization from The Open Group.
#define imake_ccflags "-DSYSV" #define imake_ccflags "-DSYSV"
#endif #endif
#if defined(USL) || defined(__USLC__) || defined(Oki) || defined(NCR) #if defined(__UNIXWARE__) || defined(__USLC__) || defined(Oki) || defined(NCR)
#ifdef __UNIXWARE__
#define image_ccflags "-Xa -DSVR4 -DSVR5 -D__UNIXWARE__"
#else
#define imake_ccflags "-Xa -DSVR4" #define imake_ccflags "-Xa -DSVR4"
#endif #endif
#endif
/* SCO may define __USLC__ so put this after the USL check */ /* SCO may define __USLC__ so put this after the USL check */
#if defined(M_UNIX) || defined(_SCO_DS) #if defined(M_UNIX) || defined(_SCO_DS)
#ifdef imake_ccflags #ifdef imake_ccflags
#undef imake_ccflags #undef imake_ccflags
#endif #endif
#define imake_ccflags "-Dsco -DSYSV -DSCO -DSCO325" #define imake_ccflags "-DSYSV -DSCO325 -D__SCO__"
#endif #endif
#ifdef sony #ifdef sony
...@@ -204,7 +208,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -204,7 +208,7 @@ in this Software without prior written authorization from The Open Group.
* descriptor onto another, define such a mechanism here (if you don't * descriptor onto another, define such a mechanism here (if you don't
* already fall under the existing category(ies). * already fall under the existing category(ies).
*/ */
#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(sco) #if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(__SCO__)
#define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \ #define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \
fcntl(fd1, F_DUPFD, fd2))) fcntl(fd1, F_DUPFD, fd2)))
#endif #endif
...@@ -219,7 +223,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -219,7 +223,7 @@ in this Software without prior written authorization from The Open Group.
* all colons). One way to tell if you need this is to see whether or not * all colons). One way to tell if you need this is to see whether or not
* your Makefiles have no tabs in them and lots of @@ strings. * your Makefiles have no tabs in them and lots of @@ strings.
*/ */
#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(sco) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXOS2__) #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__SCO__) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXOS2__)
#define FIXUP_CPP_WHITESPACE #define FIXUP_CPP_WHITESPACE
#endif #endif
#ifdef WIN32 #ifdef WIN32
...@@ -435,8 +439,9 @@ char *cpp_argv[ARGUMENTS] = { ...@@ -435,8 +439,9 @@ char *cpp_argv[ARGUMENTS] = {
#if defined(macII) || defined(_AUX_SOURCE) #if defined(macII) || defined(_AUX_SOURCE)
"-DmacII", /* Apple A/UX */ "-DmacII", /* Apple A/UX */
#endif #endif
#if defined(USL) || defined(__USLC__) #if defined(USL) || defined(__UNIXWARE__) || \
"-DUSL", /* USL */ (defined(__USLC__) && !defined(_SCO_DS))
"-D__UNIXWARE__", /* SCO UnixWare 7 */
#endif #endif
#ifdef sony #ifdef sony
"-Dsony", /* Sony */ "-Dsony", /* Sony */
...@@ -494,8 +499,8 @@ char *cpp_argv[ARGUMENTS] = { ...@@ -494,8 +499,8 @@ char *cpp_argv[ARGUMENTS] = {
"-DSVR4", "-DSVR4",
# endif # endif
#endif /* MOTOROLA */ #endif /* MOTOROLA */
#if defined(M_UNIX) || defined(sco) #if defined(M_UNIX) || defined(sco) || defined(__SCO__) || defined(_SCO_DS)
"-Dsco", "-D__SCO__",
"-DSYSV", "-DSYSV",
#endif #endif
#ifdef i386 #ifdef i386
...@@ -521,11 +526,8 @@ char *cpp_argv[ARGUMENTS] = { ...@@ -521,11 +526,8 @@ char *cpp_argv[ARGUMENTS] = {
# endif # endif
# endif # endif
# endif # endif
# ifdef SCO # if (_SCO_DS - 0 == 1)
"-DSCO",
# ifdef _SCO_DS
"-DSCO325", "-DSCO325",
# endif
# endif # endif
# endif # endif
# ifdef ESIX # ifdef ESIX
...@@ -559,11 +561,8 @@ char *cpp_argv[ARGUMENTS] = { ...@@ -559,11 +561,8 @@ char *cpp_argv[ARGUMENTS] = {
# endif # endif
# endif # endif
# endif # endif
# ifdef SCO # if (_SCO_DS - 0 == 1)
"-DSCO",
# ifdef _SCO_DS
"-DSCO325", "-DSCO325",
# endif
# endif # endif
# ifdef ESIX # ifdef ESIX
"-DESIX", "-DESIX",
...@@ -782,7 +781,7 @@ char *cpp_argv[ARGUMENTS] = { ...@@ -782,7 +781,7 @@ char *cpp_argv[ARGUMENTS] = {
# define DEFAULT_OS_MINOR_REV "r %*[^.].%*d.%1s" # define DEFAULT_OS_MINOR_REV "r %*[^.].%*d.%1s"
# define DEFAULT_OS_TEENY_REV "r %*[^.].%*d.%*c%[0-9]" # define DEFAULT_OS_TEENY_REV "r %*[^.].%*d.%*c%[0-9]"
# define DEFAULT_OS_NAME "srvm %[^\n]" # define DEFAULT_OS_NAME "srvm %[^\n]"
# elif defined(USL) || defined(__USLC__) # elif defined(USL) || defined(__USLC__) || defined(__UNIXWARE__)
/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */ /* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
# define DEFAULT_OS_MAJOR_REV "v %[0-9]" # define DEFAULT_OS_MAJOR_REV "v %[0-9]"
# define DEFAULT_OS_MINOR_REV "v %*d.%1s" # define DEFAULT_OS_MINOR_REV "v %*d.%1s"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment