From 05876e7f0a4033f8dc7431aa64d3d56de13eec68 Mon Sep 17 00:00:00 2001 From: robocop Date: Wed, 2 Apr 2008 10:43:33 +0000 Subject: [PATCH] Remove SINIX-Z from FB2. --- src/common/config/config.cpp | 2 +- src/config/Parameters.h | 4 -- src/gpre/cob.cpp | 2 +- src/gpre/ftn.cpp | 17 ----- src/include/gen/autoconfig_msvc.h | 1 - src/jrd/common.h | 112 ------------------------------ src/jrd/flu.cpp | 2 +- src/jrd/isc_file.cpp | 6 +- src/jrd/license.h | 4 -- src/jrd/pag.cpp | 4 -- src/lock/lock.h | 4 -- src/remote/inet.cpp | 18 +---- src/utilities/drop.cpp | 2 +- 13 files changed, 10 insertions(+), 168 deletions(-) diff --git a/src/common/config/config.cpp b/src/common/config/config.cpp index 8ea43fdfc1..f0a6f792e9 100644 --- a/src/common/config/config.cpp +++ b/src/common/config/config.cpp @@ -78,7 +78,7 @@ const ConfigImpl::ConfigEntry ConfigImpl::entries[] = #else {TYPE_INTEGER, "LockMemSize", (ConfigValue) 262144}, // bytes #endif -#if defined(SINIXZ) || defined(FREEBSD) || defined(NETBSD) +#if defined(FREEBSD) || defined(NETBSD) {TYPE_INTEGER, "LockSemCount", (ConfigValue) 25}, // semaphores #else {TYPE_INTEGER, "LockSemCount", (ConfigValue) 32}, // semaphores diff --git a/src/config/Parameters.h b/src/config/Parameters.h index 56ef20b712..268d19c72e 100644 --- a/src/config/Parameters.h +++ b/src/config/Parameters.h @@ -33,11 +33,7 @@ #else INT_PARAMETER (LockMemSize, 262144) // bytes #endif -#ifdef SINIXZ - INT_PARAMETER (LockSemCount, 25) // semaphores -#else INT_PARAMETER (LockSemCount, 32) // semaphores -#endif INT_PARAMETER (LockSignal, 16) // signal # BOOL_PARAMETER (LockGrantOrder, true) INT_PARAMETER (LockHashSlots, 101) // slots diff --git a/src/gpre/cob.cpp b/src/gpre/cob.cpp index 56af5c886f..e54bc95355 100644 --- a/src/gpre/cob.cpp +++ b/src/gpre/cob.cpp @@ -126,7 +126,7 @@ static const char* const ISC_BADDRESS = "ISC_BADDRESS"; static const char* const COMMIT = "commit"; static const char* const ROLLBACK = "rollback"; -#if defined AIX || defined AIX_PPC || defined SOLARIS || defined HP10 || defined HP11 || defined SINIXZ || defined LINUX || defined DARWIN || defined FREEBSD || defined NETBSD || defined WIN_NT +#if defined AIX || defined AIX_PPC || defined SOLARIS || defined HP10 || defined HP11 || defined LINUX || defined DARWIN || defined FREEBSD || defined NETBSD || defined WIN_NT static const char* const OMITTED = "BY VALUE 0"; static const char* const BY_VALUE = "BY VALUE "; static const char* const END_VALUE = ""; diff --git a/src/gpre/ftn.cpp b/src/gpre/ftn.cpp index 7d35db5fb4..1c340303d3 100644 --- a/src/gpre/ftn.cpp +++ b/src/gpre/ftn.cpp @@ -209,23 +209,6 @@ const char* const I4CONST_2 = ""; const char* const COMMENT = "* "; const char* const INLINE_COMMENT = "\n* "; const char* const COMMA = ","; -#elif defined(SINIXZ) -const char* const INCLUDE_ISC_FTN = " INCLUDE '/usr/interbase/include/gds.f\' \n\n"; -const char* const INCLUDE_FTN_FILE = "include/gds.f"; -const char* const DOUBLE_DCL = "DOUBLE PRECISION"; -const char* const I2CONST_1 = ""; -const char* const I2CONST_2 = ""; -const char* const I2_1 = ""; -const char* const I2_2 = ""; -const char* const VAL_1 = ""; -const char* const VAL_2 = ""; -const char* const REF_1 = ""; -const char* const REF_2 = ""; -const char* const I4CONST_1 = ""; -const char* const I4CONST_2 = ""; -const char* const COMMENT = "* "; -const char* const INLINE_COMMENT = "\n* "; -const char* const COMMA = ","; #elif defined(LINUX) const char* const INCLUDE_ISC_FTN = " INCLUDE '/usr/interbase/include/gds.f\' \n\n"; const char* const INCLUDE_FTN_FILE = "include/gds.f"; diff --git a/src/include/gen/autoconfig_msvc.h b/src/include/gen/autoconfig_msvc.h index 9a2d55899c..d9cb02f40e 100644 --- a/src/include/gen/autoconfig_msvc.h +++ b/src/include/gen/autoconfig_msvc.h @@ -252,7 +252,6 @@ #undef AIX #define WIN_NT #undef SCO_EV -#undef SINIXZ #define FB_PREFIX "c:\\Program Files\\Firebird\\" diff --git a/src/jrd/common.h b/src/jrd/common.h index 9a479539f6..fc8891bcdb 100644 --- a/src/jrd/common.h +++ b/src/jrd/common.h @@ -146,118 +146,6 @@ #endif /* LINUX */ -/***************************************************** -* SINIX-Z 5.42 -*****************************************************/ -#ifdef SINIXZ -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* These prototypes are missing in the system header files :-( */ -int gettimeofday (struct timeval *tp); -int munmap(void * addr, size_t len); -int gethostname(char *name, size_t len); -int socket(int domain, int type, int protocol); -int connect(int s, struct sockaddr *name, int namelen); -int send(int s, void *msg, int len, int flags); -int recv(int s, void *buf, int len, int flags); -int strcasecmp(const char *s1, const char *s2); -int strncasecmp(const char *s1, const char *s2, size_t n); -int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *execptfds, struct timeval *timeout); -int getsockopt(int s, int level, int optname, char *optval, int *optlen); -int setsockopt(int s, int level, int optname, char *optval, int optlen); -int bind(int s, struct sockaddr *name, int namelen); -int listen(int s, int backlog); -int accept(int s, struct sockaddr *ddr, int *addrlen); -int getsockname(int s, struct sockaddr *name, int *namelen); -int setsockname(int s, struct sockaddr *name, int *namelen); -int getpeername(int s, struct sockaddr *name, int *namelen); -int shutdown(int s, int how); -int syslog(int pri, char *fmt, ...); - -#ifdef __cplusplus - } -#endif - -#include -#define dlopen(a, b) dlopen((char *)(a),(b)) -#define dlsym(a, b) dlsym((a), (char *)(b)) - -#include -#include - -struct sinixz_sigaction - { - int sa_flags; - union - { - /* Used if SA_SIGINFO is not set. */ - void (*sa_handler)(int); - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -#define sa_handler __sigaction_handler.sa_handler -#define sa_sigaction __sigaction_handler.sa_sigaction - sigset_t sa_mask; - int sa_resv[2]; - }; - -static inline int sinixz_sigaction(int sig, const struct sinixz_sigaction *act, - struct sinixz_sigaction *oact) -{ - return sigaction(sig, (struct sigaction*)act, (struct sigaction*)oact); -} - -// Re-define things actually -#define sigaction sinixz_sigaction - -#define QUADFORMAT "ll" -#define QUADCONST(n) (n##LL) - -//#define ALIGNMENT 4 -//#define DOUBLE_ALIGN 8 - -#ifdef SUPERSERVER -#define SET_TCP_NO_DELAY -#endif - -//#define KILLER_SIGNALS - -#define UNIX -#define IEEE - -#ifdef i386 -#define I386 -/* Change version string into SINIXZ */ -#define IMPLEMENTATION isc_info_db_impl_sinixz /* 64 */ -#endif /* i386 */ - -#define setreuid(ruid, euid) setuid(euid) -#define setregid(rgid, egid) setgid(egid) - -#define MEMMOVE(from, to, length) memmove ((void *)to, (void *)from, (size_t) length) -#define MOVE_FAST(from, to, length) memcpy (to, from, (int) (length)) -#define MOVE_FASTER(from, to, length) memcpy (to, from, (int) (length)) -#define MOVE_CLEAR(to, length) memset (to, 0, (int) (length)) - -//format for __LINE__ -#define LINEFORMAT "d" - -//#define SLONGFORMAT "ld" -//#define ULONGFORMAT "lu" -//#define XLONGFORMAT "lX" -//#define xLONGFORMAT "lx" - -#define O_BINARY 0 -#endif /* SINIXZ */ /***************************************************** * Darwin Platforms diff --git a/src/jrd/flu.cpp b/src/jrd/flu.cpp index 7a7d817ec0..a4a97f28da 100644 --- a/src/jrd/flu.cpp +++ b/src/jrd/flu.cpp @@ -66,7 +66,7 @@ #include -#if (defined SOLARIS || defined SCO_EV || defined LINUX || defined AIX_PPC || defined SINIXZ || defined FREEBSD || defined NETBSD || HPUX) +#if (defined SOLARIS || defined SCO_EV || defined LINUX || defined AIX_PPC || defined FREEBSD || defined NETBSD || HPUX) #define DYNAMIC_SHARED_LIBRARIES #endif diff --git a/src/jrd/isc_file.cpp b/src/jrd/isc_file.cpp index 392b0d6048..8aa0f0e760 100644 --- a/src/jrd/isc_file.cpp +++ b/src/jrd/isc_file.cpp @@ -244,7 +244,7 @@ namespace { #endif //NO_NFS } // anonymous namespace -#if (!defined NO_NFS || defined FREEBSD || defined NETBSD || defined SINIXZ) +#if (!defined NO_NFS || defined FREEBSD || defined NETBSD) static void expand_filename2(tstring&, bool); #endif @@ -545,7 +545,7 @@ iscProtocol ISC_extract_host(Firebird::PathName& file_name, } -#if (!defined NO_NFS || defined FREEBSD || defined NETBSD || defined SINIXZ) +#if (!defined NO_NFS || defined FREEBSD || defined NETBSD) void ISC_expand_filename(tstring& buff, bool expand_mounts) { /************************************** @@ -1116,7 +1116,7 @@ int ISC_strip_extension(TEXT* file_name) #endif -#if (!defined NO_NFS || defined FREEBSD || defined NETBSD || defined SINIXZ) +#if (!defined NO_NFS || defined FREEBSD || defined NETBSD) static void expand_filename2(tstring& buff, bool expand_mounts) { /************************************** diff --git a/src/jrd/license.h b/src/jrd/license.h index 4e018291c0..b1f90b4784 100644 --- a/src/jrd/license.h +++ b/src/jrd/license.h @@ -119,10 +119,6 @@ #define FB_PLATFORM "LI" /* Linux on Intel */ #endif -#ifdef SINIXZ -#define FB_PLATFORM "SZ" /* SINIX for PC */ -#endif - #ifdef FREEBSD #define FB_PLATFORM "FB" /* FreeBSD/i386 */ #endif diff --git a/src/jrd/pag.cpp b/src/jrd/pag.cpp index b0947cc8fc..1823ba8836 100644 --- a/src/jrd/pag.cpp +++ b/src/jrd/pag.cpp @@ -256,10 +256,6 @@ const SSHORT CLASS = CLASS_AIX_PPC; const SSHORT CLASS = CLASS_WINDOWS_I386; #endif -#ifdef SINIXZ -const SSHORT CLASS = CLASS_LINUX_I386; -#endif - #ifdef LINUX #ifdef i386 const SSHORT CLASS = CLASS_LINUX_I386; diff --git a/src/lock/lock.h b/src/lock/lock.h index 1ebd007882..097f750f74 100644 --- a/src/lock/lock.h +++ b/src/lock/lock.h @@ -70,10 +70,6 @@ const int DEFAULT_SIZE = 98304; //#define SEMAPHORES 25 //#endif // -//#ifdef SINIXZ -//#define SEMAPHORES 25 -//#endif -// //#ifndef SEMAPHORES //#define SEMAPHORES 32 //#endif diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index da30ac2f19..357a471076 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -88,10 +88,6 @@ #include #include #include -/* EKU: SINIX-Z does not define INADDR_NONE */ -#ifndef INADDR_NONE -#define INADDR_NONE (unsigned long)-1 -#endif #endif // !(defined VMS || defined WIN_NT) #if (defined DARWIN || defined HPUX) @@ -2196,7 +2192,7 @@ static int parse_line( if (strcmp(entry1, host_name)) { -#if (defined UNIX) && !(defined SINIXZ) && !(defined NETBSD) +#if (defined UNIX) && !(defined NETBSD) if (entry1[1] == '@') { if (!innetgr(&entry1[2], host_name, 0, 0)) @@ -2225,7 +2221,7 @@ static int parse_line( /* if they're in the user group: + they're in, - they're out */ -#if (defined UNIX) && !(defined SINIXZ) && !(defined NETBSD) +#if (defined UNIX) && !(defined NETBSD) if (entry2[1] == '@') { if (innetgr(&entry2[2], 0, user_name, 0)) { if (entry2[0] == '+') @@ -3616,12 +3612,7 @@ static bool_t packet_send( rem_port* port, const SCHAR* buffer, SSHORT buffer_le * **************************************/ -#ifdef SINIXZ -// Please systems with ill-defined send() function, like SINIX-Z. - char* data = const_cast(buffer); -#else const char* data = buffer; -#endif SSHORT length = buffer_length; while (length) { @@ -3670,11 +3661,8 @@ static bool_t packet_send( rem_port* port, const SCHAR* buffer, SSHORT buffer_le int count = 0; SSHORT n; int inetErrNo; -#ifdef SINIXZ - char* b = const_cast(buffer); -#else const char* b = buffer; -#endif + while ((n = send((SOCKET) port->port_handle, b, 1, MSG_OOB)) == -1 && (INET_ERRNO == ENOBUFS || INTERRUPT_ERROR(INET_ERRNO))) { diff --git a/src/utilities/drop.cpp b/src/utilities/drop.cpp index ee87af5b7b..505f19fba7 100644 --- a/src/utilities/drop.cpp +++ b/src/utilities/drop.cpp @@ -361,7 +361,7 @@ static int sem_exclusive( SLONG key, SLONG count) **************************************/ int semid; -#if !(defined sun || defined LINUX || defined FREEBSD || defined NETBSD || defined SINIXZ) +#if !(defined sun || defined LINUX || defined FREEBSD || defined NETBSD) return semget(key, (int) count, IPC_EXCL); #else if ((semid = semget(key, (int) count, IPC_EXCL)) != -1)