Patch to compile 6.5 on SCO OpenServer - Mailing list pgsql-ports
From | Andrew Merrill |
---|---|
Subject | Patch to compile 6.5 on SCO OpenServer |
Date | |
Msg-id | 3717BEDF.CEECE09@compclass.com Whole thread Raw |
Responses |
Re: [PORTS] Patch to compile 6.5 on SCO OpenServer
|
List | pgsql-ports |
This was made with the April 15 snapshot of 6.5, which does not compile on SCO OpenServer without changes. (6.4.2 didn't compile on SCO OpenServer either, with the same problems.) For those not familiar with SCO, they have two distinct product lines, OpenServer and UnixWare. 6.4.2 compiles out of the box on UnixWare 7, and 6.5 will with a patch I submitted recently. I've tested this patch on: 1) SCO OpenServer 5.0.5 with the SCO UDK compiler 2) SCO OpenServer 5.0.2 with the SCO OpenServer Development Kit compiler It is likely to work on other OpenServer 5.0.x releases. What needs to be done to update the various "supported hardware platforms" lists to include both SCO OpenServer and SCO UnixWare? Andrew Merrill The Computer Classroom, Inc. *** ./backend/libpq/pqcomm.c.orig Fri Apr 16 16:45:32 1999 --- ./backend/libpq/pqcomm.c Fri Apr 16 16:45:35 1999 *************** *** 533,538 **** pqdebug("%s", PQerrormsg); return STATUS_ERROR; } if ((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(one))) == -1) { --- 533,543 ---- pqdebug("%s", PQerrormsg); return STATUS_ERROR; } + + #ifdef ONLY_REUSE_INET_SOCKETS + if (family == AF_INET) { + #endif + if ((setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(one))) == -1) { *************** *** 543,548 **** pqdebug("%s", PQerrormsg); return STATUS_ERROR; } MemSet((char *) &saddr, 0, sizeof(saddr)); saddr.sa.sa_family = family; if (family == AF_UNIX) --- 548,558 ---- pqdebug("%s", PQerrormsg); return STATUS_ERROR; } + + #ifdef ONLY_REUSE_INET_SOCKETS + } + #endif + MemSet((char *) &saddr, 0, sizeof(saddr)); saddr.sa.sa_family = family; if (family == AF_UNIX) *** ./include/port/sco.h.orig Fri Apr 16 16:45:08 1999 --- ./include/port/sco.h Fri Apr 16 16:58:54 1999 *************** *** 1,5 **** #include <limits.h> /* For _POSIX_PATH_MAX */ #define MAXPATHLEN _POSIX_PATH_MAX #define NOFILE NOFILES_MIN --- 1,6 ---- #include <limits.h> /* For _POSIX_PATH_MAX */ + #ifndef MAXPATHLEN #define MAXPATHLEN _POSIX_PATH_MAX #endif *************** *** 1,6 **** #include <limits.h> /* For _POSIX_PATH_MAX */ #define MAXPATHLEN _POSIX_PATH_MAX #define NOFILE NOFILES_MIN --- 2,8 ---- #ifndef MAXPATHLEN #define MAXPATHLEN _POSIX_PATH_MAX + #endif #ifndef NOFILE #define NOFILE NOFILES_MIN *************** *** 2,7 **** #define MAXPATHLEN _POSIX_PATH_MAX #define NOFILE NOFILES_MIN #define DISABLE_COMPLEX_MACRO --- 4,10 ---- #define MAXPATHLEN _POSIX_PATH_MAX #endif + #ifndef NOFILE #define NOFILE NOFILES_MIN #endif *************** *** 3,7 **** #define MAXPATHLEN _POSIX_PATH_MAX #define NOFILE NOFILES_MIN #define DISABLE_COMPLEX_MACRO --- 6,12 ---- #ifndef NOFILE #define NOFILE NOFILES_MIN + #endif #define ONLY_REUSE_INET_SOCKETS *************** *** 4,7 **** #define NOFILE NOFILES_MIN #define DISABLE_COMPLEX_MACRO --- 8,15 ---- #define NOFILE NOFILES_MIN #endif + #define ONLY_REUSE_INET_SOCKETS + #define DISABLE_COMPLEX_MACRO #define USE_POSIX_TIME *************** *** 5,7 **** #define NOFILE NOFILES_MIN #define DISABLE_COMPLEX_MACRO --- 11,45 ---- #define ONLY_REUSE_INET_SOCKETS #define DISABLE_COMPLEX_MACRO + + #define USE_POSIX_TIME + #define NO_EMPTY_STMTS + #define SYSV_DIRENT + + #define HAS_TEST_AND_SET + #define NEED_I386_TAS_ASM + + #define USE_UNIVEL_CC + + typedef unsigned char slock_t; + + #define DISABLE_COMPLEX_MACRO + + /*************************************************************** + * The following include will get the needed prototype for the + * strcasecmp() function. + ***************************************************************/ + #include <strings.h> + + #ifndef BIG_ENDIAN + #define BIG_ENDIAN 4321 + #endif + #ifndef LITTLE_ENDIAN + #define LITTLE_ENDIAN 1234 + #endif + #ifndef PDP_ENDIAN + #define PDP_ENDIAN 3412 + #endif + #ifndef BYTE_ORDER + #define BYTE_ORDER LITTLE_ENDIAN + #endif
pgsql-ports by date: