1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

portability/autoconf fixes

This commit is contained in:
unknown
2004-05-12 09:27:59 +02:00
parent 5a6ab9bd0d
commit 69424ca9ab
9 changed files with 56 additions and 73 deletions

View File

@@ -53,7 +53,11 @@ SHLIBEXT := so
endif endif
ifeq ($(NDB_SCI), Y) ifeq ($(NDB_SCI), Y)
CCFLAGS_TOP += -DHAVE_SCI CCFLAGS_TOP += -DHAVE_NDB_SCI
endif
ifeq ($(NDB_SHM), Y)
CCFLAGS_TOP += -DHAVE_NDB_SHM
endif endif
ifneq ($(findstring OSE, $(NDB_OS)),) ifneq ($(findstring OSE, $(NDB_OS)),)

View File

@@ -11,6 +11,11 @@ then
NDB_SCI=N NDB_SCI=N
fi fi
if [ -z "$NDB_SHM" ]
then
NDB_SHM=N
fi
os=`uname -s` os=`uname -s`
case $os in case $os in
Linux) Linux)

View File

@@ -3,6 +3,13 @@
#define NDBGLOBAL_H #define NDBGLOBAL_H
#include <my_global.h> #include <my_global.h>
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
#define NDB_WIN32
#else
#undef NDB_WIN32
#endif
#include <m_string.h> #include <m_string.h>
#include <m_ctype.h> #include <m_ctype.h>
#include <ndb_types.h> #include <ndb_types.h>
@@ -31,7 +38,6 @@
#ifdef NDB_WIN32 #ifdef NDB_WIN32
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#include <windows.h>
#define DIR_SEPARATOR "\\" #define DIR_SEPARATOR "\\"
#define PATH_MAX 256 #define PATH_MAX 256

View File

@@ -40,24 +40,8 @@ typedef int socklen_t;
#define InetErrno (* inet_errno()) #define InetErrno (* inet_errno())
#endif #elif NDB_WIN32
#if defined NDB_SOLARIS || defined NDB_HPUX || defined NDB_IBMAIX || defined NDB_TRU64X || NDB_LINUX || defined NDB_MACOSX
/**
* Include files needed
*/
#include <netdb.h>
#define NDB_NONBLOCK O_NONBLOCK
#define NDB_SOCKET_TYPE int
#define NDB_INVALID_SOCKET -1
#define NDB_CLOSE_SOCKET(x) close(x)
#define InetErrno errno
#endif
#ifdef NDB_WIN32
/** /**
* Include files needed * Include files needed
*/ */
@@ -70,6 +54,20 @@ typedef int socklen_t;
#define NDB_INVALID_SOCKET INVALID_SOCKET #define NDB_INVALID_SOCKET INVALID_SOCKET
#define NDB_CLOSE_SOCKET(x) closesocket(x) #define NDB_CLOSE_SOCKET(x) closesocket(x)
#else
/**
* Include files needed
*/
#include <netdb.h>
#define NDB_NONBLOCK O_NONBLOCK
#define NDB_SOCKET_TYPE int
#define NDB_INVALID_SOCKET -1
#define NDB_CLOSE_SOCKET(x) close(x)
#define InetErrno errno
#endif #endif
#define NDB_SOCKLEN_T SOCKET_SIZE_TYPE #define NDB_SOCKLEN_T SOCKET_SIZE_TYPE

View File

@@ -20,37 +20,18 @@ DIRS := basictest perftest
CCFLAGS_LOC += -I$(call fixpath,$(NDB_TOP)/include/kernel) \ CCFLAGS_LOC += -I$(call fixpath,$(NDB_TOP)/include/kernel) \
-I$(call fixpath,$(NDB_TOP)/include/transporter) -I$(call fixpath,$(NDB_TOP)/include/transporter)
ifeq ($(NDB_SHM), Y)
ifeq ($(NDB_OS), WIN32) ifeq ($(NDB_OS), WIN32)
SOURCES += SHM_Transporter.win32.cpp SOURCES += SHM_Transporter.win32.cpp
endif else
ifeq ($(NDB_OS), SOLARIS)
SOURCES += SHM_Transporter.unix.cpp SOURCES += SHM_Transporter.unix.cpp
endif endif
ifeq ($(NDB_OS), HPUX)
SOURCES += SHM_Transporter.unix.cpp
endif endif
ifeq ($(NDB_OS), MACOSX)
SOURCES += SHM_Transporter.unix.cpp
endif
ifeq ($(NDB_OS), IBMAIX)
SOURCES += SHM_Transporter.unix.cpp
endif
ifeq ($(NDB_OS), TRU64X)
SOURCES += SHM_Transporter.unix.cpp
endif
ifeq ($(NDB_OS), LINUX)
SOURCES += SHM_Transporter.unix.cpp
ifeq ($(NDB_SCI), Y) ifeq ($(NDB_SCI), Y)
SOURCES += SCI_Transporter.cpp SOURCES += SCI_Transporter.cpp
endif endif
endif
ifneq ($(findstring OSE, $(NDB_OS)),) ifneq ($(findstring OSE, $(NDB_OS)),)
SOURCES += OSE_Transporter.cpp SOURCES += OSE_Transporter.cpp

View File

@@ -21,39 +21,18 @@
#include <NdbOut.hpp> #include <NdbOut.hpp>
#endif #endif
#ifdef NDB_SOLARIS
#define NDB_TCP_TRANSPORTER #define NDB_TCP_TRANSPORTER
//#define NDB_SCI_TRANSPORTER
#ifdef HAVE_NDB_SHM
#define NDB_SHM_TRANSPORTER #define NDB_SHM_TRANSPORTER
#elif defined NDB_OSE || defined NDB_SOFTOSE
#define NDB_TCP_TRANSPORTER
#define NDB_OSE_TRANSPORTER
#elif defined NDB_LINUX
#define NDB_TCP_TRANSPORTER
#define NDB_SCI_TRANSPORTER
#define NDB_SHM_TRANSPORTER
#elif defined NDB_WIN32
#define NDB_TCP_TRANSPORTER
#elif defined NDB_HPUX
#define NDB_TCP_TRANSPORTER
#define NDB_SHM_TRANSPORTER
#elif defined NDB_MACOSX
#define NDB_TCP_TRANSPORTER
#define NDB_SHM_TRANSPORTER
#elif defined NDB_IBMAIX
#define NDB_TCP_TRANSPORTER
#define NDB_SHM_TRANSPORTER
#elif defined NDB_TRU64X
#define NDB_TCP_TRANSPORTER
#define NDB_SHM_TRANSPORTER
#else
#error unsupported platform
#endif #endif
#ifndef HAVE_SCI #ifdef HAVE_NDB_SCI
#ifdef NDB_SCI_TRANSPORTER #define NDB_SCI_TRANSPORTER
#undef NDB_SCI_TRANSPORTER
#endif #endif
#ifdef HAVE_NDB_OSE
#define NDB_OSE_TRANSPORTER
#endif #endif
#ifdef DEBUG_TRANSPORTER #ifdef DEBUG_TRANSPORTER

View File

@@ -854,7 +854,7 @@ int Ndbfs::translateErrno(int aErrno)
//no space left on device //no space left on device
case ENFILE: case ENFILE:
case EDQUOT: case EDQUOT:
#ifndef NDB_MACOSX #ifdef ENOSR
case ENOSR: case ENOSR:
#endif #endif
case ENOSPC: case ENOSPC:
@@ -872,12 +872,16 @@ int Ndbfs::translateErrno(int aErrno)
return FsRef::fsErrInvalidParameters; return FsRef::fsErrInvalidParameters;
//environment error //environment error
case ELOOP: case ELOOP:
#ifndef NDB_MACOSX #ifdef ENOLINK
case ENOLINK: case ENOLINK:
#endif
#ifdef EMULTIHOP
case EMULTIHOP: case EMULTIHOP:
#endif #endif
#ifndef NDB_LINUX #ifdef EOPNOTSUPP
case EOPNOTSUPP: case EOPNOTSUPP:
#endif
#ifdef ESPIPE
case ESPIPE: case ESPIPE:
#endif #endif
case EPIPE: case EPIPE:

View File

@@ -257,8 +257,10 @@ handler(int sig){
case SIGINT: /* 2 - Interrupt */ case SIGINT: /* 2 - Interrupt */
case SIGQUIT: /* 3 - Quit */ case SIGQUIT: /* 3 - Quit */
case SIGTERM: /* 15 - Terminate */ case SIGTERM: /* 15 - Terminate */
#ifndef NDB_MACOSX #ifdef SIGPWR
case SIGPWR: /* 19 - Power fail */ case SIGPWR: /* 19 - Power fail */
#endif
#ifdef SIGPOLL
case SIGPOLL: /* 22 */ case SIGPOLL: /* 22 */
#endif #endif
case SIGSTOP: /* 23 */ case SIGSTOP: /* 23 */

View File

@@ -473,6 +473,10 @@ HugoAsynchTransactions::executeAsynchOperation(Ndb* pNdb,
} }
} }
break; break;
case NO_INSERT:
case NO_UPDATE:
case NO_DELETE:
abort();
} }
// Close all transactions // Close all transactions