|
From: <ego...@us...> - 2015-01-21 11:11:14
|
Revision: 60531
http://sourceforge.net/p/firebird/code/60531
Author: egorpugin
Date: 2015-01-21 11:11:04 +0000 (Wed, 21 Jan 2015)
Log Message:
-----------
[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.
Modified Paths:
--------------
firebird/trunk/configure.ac
firebird/trunk/src/common/common.h
firebird/trunk/src/common/isc_sync.cpp
firebird/trunk/src/jrd/license.h
firebird/trunk/src/jrd/recsrc/HashJoin.cpp
firebird/trunk/src/remote/inet.cpp
firebird/trunk/src/remote/protocol.h
firebird/trunk/src/remote/remote_def.h
firebird/trunk/src/utilities/ntrace/PluginLogWriter.cpp
Modified: firebird/trunk/configure.ac
===================================================================
--- firebird/trunk/configure.ac 2015-01-21 09:18:18 UTC (rev 60530)
+++ firebird/trunk/configure.ac 2015-01-21 11:11:04 UTC (rev 60531)
@@ -854,6 +854,7 @@
AC_CHECK_FUNCS(semtimedop)
AC_CHECK_FUNCS(fegetenv)
AC_CHECK_FUNCS(strerror_r)
+AC_CHECK_FUNCS(qsort_r)
case $host in
*-darwin*)
ac_cv_func_fdatasync=no
Modified: firebird/trunk/src/common/common.h
===================================================================
--- firebird/trunk/src/common/common.h 2015-01-21 09:18:18 UTC (rev 60530)
+++ firebird/trunk/src/common/common.h 2015-01-21 11:11:04 UTC (rev 60531)
@@ -220,6 +220,9 @@
#define UNIX
#define FB_OS OsDarwin
+#ifdef ARM
+#define FB_CPU CpuArm
+#endif /* ARM */
#ifdef __ppc__
#define powerpc
#define FB_CPU CpuPowerPc
Modified: firebird/trunk/src/common/isc_sync.cpp
===================================================================
--- firebird/trunk/src/common/isc_sync.cpp 2015-01-21 09:18:18 UTC (rev 60530)
+++ firebird/trunk/src/common/isc_sync.cpp 2015-01-21 11:11:04 UTC (rev 60531)
@@ -112,12 +112,14 @@
#include <sys/param.h>
#endif
+#ifndef WIN_NT
#ifndef HAVE_GETPAGESIZE
static size_t getpagesize()
{
return PAGESIZE;
}
#endif
+#endif
//#define DEBUG_IPC
#ifdef DEBUG_IPC
Modified: firebird/trunk/src/jrd/license.h
===================================================================
--- firebird/trunk/src/jrd/license.h 2015-01-21 09:18:18 UTC (rev 60530)
+++ firebird/trunk/src/jrd/license.h 2015-01-21 11:11:04 UTC (rev 60531)
@@ -125,6 +125,9 @@
#if defined(__ppc__) || defined(__ppc64__)
#define FB_PLATFORM "UP" // Darwin/PowerPC
#endif
+#if defined(ARM)
+#define FB_PLATFORM "UA"
+#endif
#endif // DARWIN
#ifndef FB_VERSION
Modified: firebird/trunk/src/jrd/recsrc/HashJoin.cpp
===================================================================
--- firebird/trunk/src/jrd/recsrc/HashJoin.cpp 2015-01-21 09:18:18 UTC (rev 60530)
+++ firebird/trunk/src/jrd/recsrc/HashJoin.cpp 2015-01-21 11:11:04 UTC (rev 60531)
@@ -65,7 +65,11 @@
void qsort_ctx(void* base, size_t count, size_t width, qsort_compare_callback compare, void* arg)
{
#if defined(LINUX)
+#ifdef HAVE_QSORT_R
qsort_r(base, count, width, compare, arg);
+#else
+#undef USE_QSORT_CTX
+#endif
#elif defined(WIN_NT)
struct qsort_ctx_data tmp = {arg, compare};
qsort_s(base, count, width, &qsort_ctx_arg_swap, &tmp);
Modified: firebird/trunk/src/remote/inet.cpp
===================================================================
--- firebird/trunk/src/remote/inet.cpp 2015-01-21 09:18:18 UTC (rev 60530)
+++ firebird/trunk/src/remote/inet.cpp 2015-01-21 11:11:04 UTC (rev 60531)
@@ -799,7 +799,7 @@
gai_hints.ai_family = ((packet || host.hasData() || !ipv6) ? AF_UNSPEC : AF_INET6);
gai_hints.ai_socktype = SOCK_STREAM;
-#ifndef WIN_NT
+#if !defined(WIN_NT) && !defined(__clang__)
gai_hints.ai_protocol = SOL_TCP;
#else
gai_hints.ai_protocol = IPPROTO_TCP;
Modified: firebird/trunk/src/remote/protocol.h
===================================================================
--- firebird/trunk/src/remote/protocol.h 2015-01-21 09:18:18 UTC (rev 60530)
+++ firebird/trunk/src/remote/protocol.h 2015-01-21 11:11:04 UTC (rev 60531)
@@ -95,7 +95,8 @@
arch_winnt_64 = 40,
arch_darwin_x64 = 41,
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
Modified: firebird/trunk/src/remote/remote_def.h
===================================================================
--- firebird/trunk/src/remote/remote_def.h 2015-01-21 09:18:18 UTC (rev 60530)
+++ firebird/trunk/src/remote/remote_def.h 2015-01-21 11:11:04 UTC (rev 60531)
@@ -70,6 +70,8 @@
const P_ARCH ARCHITECTURE = arch_darwin_x64;
#elif defined(DARWINPPC64)
const P_ARCH ARCHITECTURE = arch_darwin_ppc64;
+#elif defined(ARM)
+const P_ARCH ARCHITECTURE = arch_arm;
#endif
Modified: firebird/trunk/src/utilities/ntrace/PluginLogWriter.cpp
===================================================================
--- firebird/trunk/src/utilities/ntrace/PluginLogWriter.cpp 2015-01-21 09:18:18 UTC (rev 60530)
+++ firebird/trunk/src/utilities/ntrace/PluginLogWriter.cpp 2015-01-21 11:11:04 UTC (rev 60531)
@@ -28,6 +28,13 @@
#include "PluginLogWriter.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;
// seems to only be Solaris 9 that doesn't have strerror_r,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|