diff --git a/builds/posix/prefix.linux_s390x b/builds/posix/prefix.linux_s390x new file mode 100644 index 0000000000..d1140dd9a1 --- /dev/null +++ b/builds/posix/prefix.linux_s390x @@ -0,0 +1,34 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Start of file prefix.linux: $(VERSION) $(PLATFORM) +# +# 2 Oct 2002, Nickolay Samofatov - Major cleanup + +COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -pipe -MMD -fPIC -fmessage-length=0 -fsigned-char +OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer -fno-builtin +WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable + +PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS) +DEV_FLAGS=-DUSE_VALGRIND -p $(COMMON_FLAGS) $(WARN_FLAGS) +#DEV_FLAGS=-p $(COMMON_FLAGS) $(WARN_FLAGS) + +OS_ServerFiles=inet_server.cpp + +EMBED_UTIL_TARGETS=gstat gds_drop gsec nbackup fb_lock_print fbsvcmgr +CLIENT_UTIL_TARGETS=gds_drop gstat gsec fbguard fbmgr_bin nbackup fb_lock_print fbsvcmgr + +Physical_IO_Module=os/posix/unix.cpp diff --git a/configure.in b/configure.in index e8a0e128f0..cd28434cba 100644 --- a/configure.in +++ b/configure.in @@ -204,6 +204,15 @@ dnl CPU_TYPE=ppc64 PTHREAD_LIBS=-lpthread ;; + s390*-*-linux*) + MAKEFILE_PREFIX=linux_s390x + INSTALL_PREFIX=linux + PLATFORM=LINUX + AC_DEFINE(LINUX, 1, [Define this if OS is Linux]) + EDITLINE_FLG=Y + SHRLIB_EXT=so + ;; + *-*-linux*) MAKEFILE_PREFIX=linux_generic INSTALL_PREFIX=linux diff --git a/src/jrd/common.h b/src/jrd/common.h index a7ba2a8883..9d9036972d 100644 --- a/src/jrd/common.h +++ b/src/jrd/common.h @@ -151,6 +151,14 @@ #define RISC_ALIGNMENT #endif // IA64 +#ifdef __s390__ +#ifdef __s390x__ +#define IMPLEMENTATION isc_info_db_impl_linux_s390x // 78 +#else +#define IMPLEMENTATION isc_info_db_impl_linux_s390 // 79 +#endif // __s390x__ +#endif // __s390__ + #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)) diff --git a/src/jrd/inf_pub.h b/src/jrd/inf_pub.h index 132c55b267..51c3023b72 100644 --- a/src/jrd/inf_pub.h +++ b/src/jrd/inf_pub.h @@ -207,6 +207,8 @@ enum info_db_implementations isc_info_db_impl_linux_ia64 = 76, isc_info_db_impl_darwin_ppc64 = 77, + isc_info_db_impl_linux_s390x = 78, + isc_info_db_impl_linux_s390 = 79, isc_info_db_impl_last_value // Leave this LAST! }; diff --git a/src/jrd/pag.cpp b/src/jrd/pag.cpp index c4e4f8a8f2..9a571c8cda 100644 --- a/src/jrd/pag.cpp +++ b/src/jrd/pag.cpp @@ -160,9 +160,11 @@ static const int CLASS_SOLARIS_AMD64 = 32; //Solaris/amd64 static const int CLASS_LINUX_ARM = 33; // LINUX/ARM static const int CLASS_LINUX_IA64 = 34; // LINUX/IA64 static const int CLASS_DARWIN_PPC64 = 35; // Darwin/PowerPC64 +static const int CLASS_LINUX_S390X = 36; // LINUX/s390x +static const int CLASS_LINUX_S390 = 37; // LINUX/s390 static const int CLASS_MAX10 = CLASS_LINUX_AMD64; // This should not be changed, no new ports with ODS10 -static const int CLASS_MAX = CLASS_DARWIN_PPC64; +static const int CLASS_MAX = CLASS_LINUX_S390; // ARCHITECTURE COMPATIBILITY CLASSES @@ -253,7 +255,9 @@ static ArchitectureType archMatrix[CLASS_MAX + 1] = { archLittleEndian, // CLASS_SOLARIS_AMD64 archLittleEndian, // CLASS_LINUX_ARM archLittleEndian, // CLASS_LINUX_IA64 - archBigEndian // CLASS_DARWIN_PPC64 + archBigEndian, // CLASS_DARWIN_PPC64 + archBigEndian, // CLASS_LINUX_S390X + archBigEndian // CLASS_LINUX_S390 }; #ifdef sun @@ -311,6 +315,12 @@ const SSHORT CLASS = CLASS_LINUX_MIPSEL; const SSHORT CLASS = CLASS_LINUX_MIPS; #elif defined(IA64) const SSHORT CLASS = CLASS_LINUX_IA64; +#elif defined(__s390__) +# if defined(__s390x__) +const SSHORT CLASS = CLASS_LINUX_S390X; +# else +const SSHORT CLASS = CLASS_LINUX_S390; +# endif // defined(__s390x__) #else #error no support on other hardware for Linux #endif diff --git a/src/jrd/utl.cpp b/src/jrd/utl.cpp index 1463d7f5fb..86bad294d8 100644 --- a/src/jrd/utl.cpp +++ b/src/jrd/utl.cpp @@ -244,7 +244,9 @@ static const TEXT* const impl_implementation[] = { "Firebird/sun/amd64", /* 74 */ "Firebird/linux ARM", /* 75 */ "Firebird/linux IA64", /* 76 */ - "Firebird/Darwin/PowerPC64" /* 77 */ + "Firebird/Darwin/PowerPC64", /* 77 */ + "Firebird/linux s390x", // 78 + "Firebird/linux s390" // 79 };