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
ifeq ($(NDB_SCI), Y)
CCFLAGS_TOP += -DHAVE_SCI
CCFLAGS_TOP += -DHAVE_NDB_SCI
endif
ifeq ($(NDB_SHM), Y)
CCFLAGS_TOP += -DHAVE_NDB_SHM
endif
ifneq ($(findstring OSE, $(NDB_OS)),)

View File

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

View File

@@ -3,6 +3,13 @@
#define NDBGLOBAL_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_ctype.h>
#include <ndb_types.h>
@@ -31,7 +38,6 @@
#ifdef NDB_WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#define DIR_SEPARATOR "\\"
#define PATH_MAX 256

View File

@@ -40,24 +40,8 @@ typedef int socklen_t;
#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
*/
@@ -70,6 +54,20 @@ typedef int socklen_t;
#define NDB_INVALID_SOCKET INVALID_SOCKET
#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
#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) \
-I$(call fixpath,$(NDB_TOP)/include/transporter)
ifeq ($(NDB_SHM), Y)
ifeq ($(NDB_OS), WIN32)
SOURCES += SHM_Transporter.win32.cpp
endif
ifeq ($(NDB_OS), SOLARIS)
else
SOURCES += SHM_Transporter.unix.cpp
endif
ifeq ($(NDB_OS), HPUX)
SOURCES += SHM_Transporter.unix.cpp
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)
SOURCES += SCI_Transporter.cpp
endif
endif
ifneq ($(findstring OSE, $(NDB_OS)),)
SOURCES += OSE_Transporter.cpp

View File

@@ -21,39 +21,18 @@
#include <NdbOut.hpp>
#endif
#ifdef NDB_SOLARIS
#define NDB_TCP_TRANSPORTER
//#define NDB_SCI_TRANSPORTER
#ifdef HAVE_NDB_SHM
#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
#ifndef HAVE_SCI
#ifdef NDB_SCI_TRANSPORTER
#undef NDB_SCI_TRANSPORTER
#ifdef HAVE_NDB_SCI
#define NDB_SCI_TRANSPORTER
#endif
#ifdef HAVE_NDB_OSE
#define NDB_OSE_TRANSPORTER
#endif
#ifdef DEBUG_TRANSPORTER

View File

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

View File

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

View File

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