mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 22:43:03 +01:00
Do more AMD64 fixes. libfbstatic builds and can do some basic stuff now
This commit is contained in:
parent
d1b0a27946
commit
6973b067ea
@ -15,13 +15,11 @@
|
||||
# All Rights Reserved.
|
||||
# Contributor(s): ______________________________________.
|
||||
# Start of file prefix.linux: $(VERSION) $(PLATFORM)
|
||||
#$Id: prefix.linux_amd64,v 1.1 2004-01-12 04:57:45 skidder Exp $
|
||||
#$Id: prefix.linux_amd64,v 1.2 2004-01-12 06:58:23 skidder Exp $
|
||||
# 2 Oct 2002, Nickolay Samofatov - Major cleanup
|
||||
|
||||
PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -pipe -MMD -fPIC -fmessage-length=0
|
||||
# uncomment if you need PROD_BUILD engine that is possible to debug
|
||||
#PROD_FLAGS=-ggdb -O3 -march=i586 -mcpu=i686 -fno-builtin -DNDEBUG -DLINUX -pipe -MMD -fPIC -fmessage-length=0
|
||||
DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -fmessage-length=0
|
||||
PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0
|
||||
DEV_FLAGS=-ggdb -DLINUX -DAMD64 -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -fmessage-length=0
|
||||
|
||||
OS_ServerFiles=inet_server.cpp
|
||||
|
||||
|
@ -42,7 +42,7 @@ inline SSHORT get_short(const SCHAR* p)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS)
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS) || defined(AMD64)
|
||||
// For IA32 (little-endian) this optimization is a _very_ large speed-up!
|
||||
// According to CTO32L definition in common.h this trick works for VAX/VMS
|
||||
return *reinterpret_cast<const SSHORT*>(p);
|
||||
@ -76,7 +76,7 @@ inline SLONG get_long(const SCHAR* p)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS)
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS) || defined(AMD64)
|
||||
// For IA32 (little-endian) this optimization is a _very_ large speed-up!
|
||||
return *reinterpret_cast<const SLONG*>(p);
|
||||
#else
|
||||
@ -112,7 +112,7 @@ inline SLONG get_long(const UCHAR* p)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS)
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS) || defined(AMD64)
|
||||
// For IA32 (little-endian) this optimization is a _very_ large speed-up!
|
||||
return *reinterpret_cast<const SLONG*>(p);
|
||||
#else
|
||||
@ -141,7 +141,7 @@ inline SSHORT gather_short(const SCHAR*& p)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS)
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS) || defined(AMD64)
|
||||
// For IA32 (little-endian) this optimization is a _very_ large speed-up!
|
||||
const SSHORT value = *reinterpret_cast<const SSHORT*>(p);
|
||||
p += 2;
|
||||
@ -177,7 +177,7 @@ inline SLONG gather_long(const SCHAR*& p)
|
||||
*
|
||||
**************************************/
|
||||
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS)
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(VMS) || defined(AMD64)
|
||||
// For IA32 (little-endian) this optimization is a _very_ large speed-up!
|
||||
const SLONG value = *reinterpret_cast<const SLONG*>(p);
|
||||
p += 4;
|
||||
|
@ -49,7 +49,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: common.h,v 1.96 2004-01-06 10:27:52 robocop Exp $
|
||||
$Id: common.h,v 1.97 2004-01-12 06:58:26 skidder Exp $
|
||||
*/
|
||||
|
||||
#ifndef JRD_COMMON_H
|
||||
@ -117,6 +117,10 @@ $Id: common.h,v 1.96 2004-01-06 10:27:52 robocop Exp $
|
||||
#define UNIX 1
|
||||
#define IEEE 1
|
||||
|
||||
#ifdef AMD64
|
||||
#define IMPLEMENTATION isc_info_db_impl_linux_amd64 /* 66 next higher unique number, See you later */
|
||||
#endif
|
||||
|
||||
#ifdef i386
|
||||
#define I386 1
|
||||
#define IMPLEMENTATION isc_info_db_impl_i386 /* 60 next higher unique number, See you later */
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: ibase.h,v 1.63 2003-12-27 22:03:27 skidder Exp $
|
||||
$Id: ibase.h,v 1.64 2004-01-12 06:58:26 skidder Exp $
|
||||
*/
|
||||
|
||||
#ifndef JRD_IBASE_H
|
||||
@ -1576,6 +1576,7 @@ enum info_db_implementations
|
||||
isc_info_db_impl_sinixz = 64,
|
||||
|
||||
isc_info_db_impl_linux_sparc = 65,
|
||||
isc_info_db_impl_linux_amd64 = 66,
|
||||
|
||||
isc_info_db_impl_last_value /* Leave this LAST! */
|
||||
};
|
||||
|
@ -35,10 +35,9 @@ typedef char CHAR;
|
||||
typedef char SCHAR;
|
||||
typedef unsigned char BYTE;
|
||||
|
||||
#pragma FB_COMPILER_MESSAGE("64-bit readiness problem!")
|
||||
typedef unsigned long ULONG;
|
||||
typedef long LONG;
|
||||
typedef signed long SLONG;
|
||||
typedef unsigned int ULONG;
|
||||
typedef int LONG;
|
||||
typedef signed int SLONG;
|
||||
#endif
|
||||
|
||||
typedef SSHORT(*FPTR_short) ();
|
||||
|
@ -2607,7 +2607,7 @@ ISC_STATUS GDS_GET_SLICE(ISC_STATUS* user_status,
|
||||
reinterpret_cast<BID>(array_id),
|
||||
sdl,
|
||||
param_length,
|
||||
reinterpret_cast<const long*>(param),
|
||||
reinterpret_cast<const SLONG*>(param),
|
||||
slice_length, slice);
|
||||
}
|
||||
catch (const std::exception&)
|
||||
@ -2802,7 +2802,7 @@ ISC_STATUS GDS_PUT_SLICE(ISC_STATUS* user_status,
|
||||
reinterpret_cast<BID>(array_id),
|
||||
sdl,
|
||||
param_length,
|
||||
reinterpret_cast<const long*>(param), slice_length, slice);
|
||||
reinterpret_cast<const SLONG*>(param), slice_length, slice);
|
||||
}
|
||||
catch (const std::exception&)
|
||||
{
|
||||
|
@ -132,6 +132,7 @@ static bool find_type(SLONG, WIN*, PAG*, USHORT, USHORT, UCHAR**,
|
||||
21 FreeBSD/i386
|
||||
22 NetBSD/i386
|
||||
23 Darwin/PowerPC
|
||||
24 LINUX on AMD64 systems
|
||||
|
||||
*/
|
||||
|
||||
@ -191,6 +192,10 @@ static bool find_type(SLONG, WIN*, PAG*, USHORT, USHORT, UCHAR**,
|
||||
#define CLASS 23
|
||||
#endif
|
||||
|
||||
#if defined LINUX && defined AMD64
|
||||
#define CLASS 24
|
||||
#endif
|
||||
|
||||
|
||||
// CVC: Since nobody checks the result from this function (strange!), I changed
|
||||
// bool to void as the return type but left the result returned as comment.
|
||||
|
@ -250,7 +250,8 @@ static const TEXT* const impl_implementation[] = {
|
||||
"Firebird/NetBSD/i386", /* 62 */
|
||||
"Firebird/Darwin/PowerPC", /* 63 */
|
||||
"Firebird/SINIX-Z", /* 64 */
|
||||
"Firebird/linux Sparc" /* 65 */
|
||||
"Firebird/linux Sparc", /* 65 */
|
||||
"Firebird/linux AMD64" /* 66 */
|
||||
};
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
// The simpliest way to check it is to issue
|
||||
// "select abs(2.0/3.0) from rdb$database" from correct client
|
||||
// It will return big strange value in case of invalid define
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86)
|
||||
#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64)
|
||||
#define SWAP_DOUBLE
|
||||
#elif defined(sparc) || defined(PowerPC)
|
||||
#undef SWAP_DOUBLE
|
||||
@ -753,10 +753,10 @@ bool_t xdr_u_long(XDR * xdrs, u_long * ip)
|
||||
switch (xdrs->x_op)
|
||||
{
|
||||
case XDR_ENCODE:
|
||||
return PUTLONG(xdrs, reinterpret_cast < long *>(ip));
|
||||
return PUTLONG(xdrs, reinterpret_cast<SLONG*>(ip));
|
||||
|
||||
case XDR_DECODE:
|
||||
if (!GETLONG(xdrs, reinterpret_cast < long *>(ip)))
|
||||
if (!GETLONG(xdrs, reinterpret_cast<SLONG*>(ip)))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user