mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 10:00:38 +01:00
[build] [cmake] Prepare sources for CMake building. Add clang preprocessor defs, ARM architecture defs, some Android-related defs. Add 'qsort_r' function search to configure.ac.
This commit is contained in:
parent
8216554413
commit
d397e68a48
@ -854,6 +854,7 @@ AC_CHECK_FUNCS(fchmod)
|
|||||||
AC_CHECK_FUNCS(semtimedop)
|
AC_CHECK_FUNCS(semtimedop)
|
||||||
AC_CHECK_FUNCS(fegetenv)
|
AC_CHECK_FUNCS(fegetenv)
|
||||||
AC_CHECK_FUNCS(strerror_r)
|
AC_CHECK_FUNCS(strerror_r)
|
||||||
|
AC_CHECK_FUNCS(qsort_r)
|
||||||
case $host in
|
case $host in
|
||||||
*-darwin*)
|
*-darwin*)
|
||||||
ac_cv_func_fdatasync=no
|
ac_cv_func_fdatasync=no
|
||||||
|
@ -220,6 +220,9 @@
|
|||||||
|
|
||||||
#define UNIX
|
#define UNIX
|
||||||
#define FB_OS OsDarwin
|
#define FB_OS OsDarwin
|
||||||
|
#ifdef ARM
|
||||||
|
#define FB_CPU CpuArm
|
||||||
|
#endif /* ARM */
|
||||||
#ifdef __ppc__
|
#ifdef __ppc__
|
||||||
#define powerpc
|
#define powerpc
|
||||||
#define FB_CPU CpuPowerPc
|
#define FB_CPU CpuPowerPc
|
||||||
|
@ -112,12 +112,14 @@ static int process_id;
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef WIN_NT
|
||||||
#ifndef HAVE_GETPAGESIZE
|
#ifndef HAVE_GETPAGESIZE
|
||||||
static size_t getpagesize()
|
static size_t getpagesize()
|
||||||
{
|
{
|
||||||
return PAGESIZE;
|
return PAGESIZE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define DEBUG_IPC
|
//#define DEBUG_IPC
|
||||||
#ifdef DEBUG_IPC
|
#ifdef DEBUG_IPC
|
||||||
|
@ -125,6 +125,9 @@
|
|||||||
#if defined(__ppc__) || defined(__ppc64__)
|
#if defined(__ppc__) || defined(__ppc64__)
|
||||||
#define FB_PLATFORM "UP" // Darwin/PowerPC
|
#define FB_PLATFORM "UP" // Darwin/PowerPC
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(ARM)
|
||||||
|
#define FB_PLATFORM "UA"
|
||||||
|
#endif
|
||||||
#endif // DARWIN
|
#endif // DARWIN
|
||||||
|
|
||||||
#ifndef FB_VERSION
|
#ifndef FB_VERSION
|
||||||
|
@ -65,7 +65,11 @@ namespace
|
|||||||
void qsort_ctx(void* base, size_t count, size_t width, qsort_compare_callback compare, void* arg)
|
void qsort_ctx(void* base, size_t count, size_t width, qsort_compare_callback compare, void* arg)
|
||||||
{
|
{
|
||||||
#if defined(LINUX)
|
#if defined(LINUX)
|
||||||
|
#ifdef HAVE_QSORT_R
|
||||||
qsort_r(base, count, width, compare, arg);
|
qsort_r(base, count, width, compare, arg);
|
||||||
|
#else
|
||||||
|
#undef USE_QSORT_CTX
|
||||||
|
#endif
|
||||||
#elif defined(WIN_NT)
|
#elif defined(WIN_NT)
|
||||||
struct qsort_ctx_data tmp = {arg, compare};
|
struct qsort_ctx_data tmp = {arg, compare};
|
||||||
qsort_s(base, count, width, &qsort_ctx_arg_swap, &tmp);
|
qsort_s(base, count, width, &qsort_ctx_arg_swap, &tmp);
|
||||||
|
@ -799,7 +799,7 @@ rem_port* INET_connect(const TEXT* name,
|
|||||||
gai_hints.ai_family = ((packet || host.hasData() || !ipv6) ? AF_UNSPEC : AF_INET6);
|
gai_hints.ai_family = ((packet || host.hasData() || !ipv6) ? AF_UNSPEC : AF_INET6);
|
||||||
gai_hints.ai_socktype = SOCK_STREAM;
|
gai_hints.ai_socktype = SOCK_STREAM;
|
||||||
|
|
||||||
#ifndef WIN_NT
|
#if !defined(WIN_NT) && !defined(__clang__)
|
||||||
gai_hints.ai_protocol = SOL_TCP;
|
gai_hints.ai_protocol = SOL_TCP;
|
||||||
#else
|
#else
|
||||||
gai_hints.ai_protocol = IPPROTO_TCP;
|
gai_hints.ai_protocol = IPPROTO_TCP;
|
||||||
|
@ -95,7 +95,8 @@ enum P_ARCH
|
|||||||
arch_winnt_64 = 40,
|
arch_winnt_64 = 40,
|
||||||
arch_darwin_x64 = 41,
|
arch_darwin_x64 = 41,
|
||||||
arch_darwin_ppc64 = 42,
|
arch_darwin_ppc64 = 42,
|
||||||
arch_max = 43 // Keep this at the end
|
arch_arm = 43,
|
||||||
|
arch_max = 44 // Keep this at the end
|
||||||
};
|
};
|
||||||
|
|
||||||
// Protocol Types
|
// Protocol Types
|
||||||
|
@ -70,6 +70,8 @@ const P_ARCH ARCHITECTURE = arch_intel_32;
|
|||||||
const P_ARCH ARCHITECTURE = arch_darwin_x64;
|
const P_ARCH ARCHITECTURE = arch_darwin_x64;
|
||||||
#elif defined(DARWINPPC64)
|
#elif defined(DARWINPPC64)
|
||||||
const P_ARCH ARCHITECTURE = arch_darwin_ppc64;
|
const P_ARCH ARCHITECTURE = arch_darwin_ppc64;
|
||||||
|
#elif defined(ARM)
|
||||||
|
const P_ARCH ARCHITECTURE = arch_arm;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,6 +28,13 @@
|
|||||||
#include "PluginLogWriter.h"
|
#include "PluginLogWriter.h"
|
||||||
#include "../common/classes/init.h"
|
#include "../common/classes/init.h"
|
||||||
|
|
||||||
|
#ifndef S_IREAD
|
||||||
|
#define S_IREAD S_IRUSR
|
||||||
|
#endif
|
||||||
|
#ifndef S_IWRITE
|
||||||
|
#define S_IWRITE S_IWUSR
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace Firebird;
|
using namespace Firebird;
|
||||||
|
|
||||||
// seems to only be Solaris 9 that doesn't have strerror_r,
|
// seems to only be Solaris 9 that doesn't have strerror_r,
|
||||||
|
Loading…
Reference in New Issue
Block a user