summaryrefslogtreecommitdiff
path: root/ndb/include
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/include')
-rw-r--r--ndb/include/debugger/SignalLoggerManager.hpp1
-rw-r--r--ndb/include/kernel/LogLevel.hpp3
-rw-r--r--ndb/include/kernel/signaldata/BuildIndx.hpp1
-rw-r--r--ndb/include/kernel/signaldata/SignalData.hpp1
-rw-r--r--ndb/include/kernel/signaldata/SignalDataPrint.hpp2
-rw-r--r--ndb/include/logger/LogHandler.hpp1
-rw-r--r--ndb/include/logger/Logger.hpp2
-rw-r--r--ndb/include/ndb_global.h66
-rw-r--r--ndb/include/ndb_types.h5
-rw-r--r--ndb/include/newtonapi/defs/pcn_types.h3
-rw-r--r--ndb/include/portlib/NdbConstant.hpp28
-rw-r--r--ndb/include/portlib/NdbMem.h3
-rw-r--r--ndb/include/portlib/NdbStdio.h36
-rw-r--r--ndb/include/portlib/NdbTCP.h37
-rw-r--r--ndb/include/portlib/NdbUnistd.h39
-rw-r--r--ndb/include/util/Bitmask.hpp1
-rw-r--r--ndb/include/util/File.hpp3
-rw-r--r--ndb/include/util/NdbString.h49
-rw-r--r--ndb/include/util/SimpleProperties.hpp3
-rw-r--r--ndb/include/util/getarg.h2
-rw-r--r--ndb/include/util/socket_io.h3
21 files changed, 79 insertions, 210 deletions
diff --git a/ndb/include/debugger/SignalLoggerManager.hpp b/ndb/include/debugger/SignalLoggerManager.hpp
index 3d89b399f3b..093a2de762e 100644
--- a/ndb/include/debugger/SignalLoggerManager.hpp
+++ b/ndb/include/debugger/SignalLoggerManager.hpp
@@ -24,7 +24,6 @@
#define SignalLoggerManager_H
-#include <NdbStdio.h>
#include <kernel_types.h>
#include <BlockNumbers.h>
#include <TransporterDefinitions.hpp>
diff --git a/ndb/include/kernel/LogLevel.hpp b/ndb/include/kernel/LogLevel.hpp
index 0902f3e488b..3363dc2befd 100644
--- a/ndb/include/kernel/LogLevel.hpp
+++ b/ndb/include/kernel/LogLevel.hpp
@@ -17,8 +17,7 @@
#ifndef _LOG_LEVEL_HPP
#define _LOG_LEVEL_HPP
-#include <ndb_types.h>
-#include <assert.h>
+#include <ndb_global.h>
/**
*
diff --git a/ndb/include/kernel/signaldata/BuildIndx.hpp b/ndb/include/kernel/signaldata/BuildIndx.hpp
index 9cf1123cc61..29dfaeb79a6 100644
--- a/ndb/include/kernel/signaldata/BuildIndx.hpp
+++ b/ndb/include/kernel/signaldata/BuildIndx.hpp
@@ -19,7 +19,6 @@
#include "SignalData.hpp"
#include <NodeBitmask.hpp>
-#include <NdbString.h>
#include <signaldata/DictTabInfo.hpp>
/**
diff --git a/ndb/include/kernel/signaldata/SignalData.hpp b/ndb/include/kernel/signaldata/SignalData.hpp
index 8237d7ffad0..511e7d30c21 100644
--- a/ndb/include/kernel/signaldata/SignalData.hpp
+++ b/ndb/include/kernel/signaldata/SignalData.hpp
@@ -20,7 +20,6 @@
#include <ndb_global.h>
#include <ndb_limits.h>
#include <kernel_types.h>
-#include <NdbConstant.hpp>
#ifndef NDB_ASSERT
#ifdef VM_TRACE
diff --git a/ndb/include/kernel/signaldata/SignalDataPrint.hpp b/ndb/include/kernel/signaldata/SignalDataPrint.hpp
index 588e2893214..17ab07acd4e 100644
--- a/ndb/include/kernel/signaldata/SignalDataPrint.hpp
+++ b/ndb/include/kernel/signaldata/SignalDataPrint.hpp
@@ -17,8 +17,8 @@
#ifndef SIGNAL_DATA_PRINT_H
#define SIGNAL_DATA_PRINT_H
+#include <ndb_global.h>
#include <kernel_types.h>
-#include <NdbStdio.h>
/**
* Typedef for a Signal Data Print Function
diff --git a/ndb/include/logger/LogHandler.hpp b/ndb/include/logger/LogHandler.hpp
index 8c5c9298f69..8f76783e6b0 100644
--- a/ndb/include/logger/LogHandler.hpp
+++ b/ndb/include/logger/LogHandler.hpp
@@ -19,7 +19,6 @@
#include "Logger.hpp"
-#include <NdbStdio.h> // Defines NULL
/**
* This class is the base class for all log handlers. A log handler is
diff --git a/ndb/include/logger/Logger.hpp b/ndb/include/logger/Logger.hpp
index 2d12a5b8a6e..d4937c11744 100644
--- a/ndb/include/logger/Logger.hpp
+++ b/ndb/include/logger/Logger.hpp
@@ -17,8 +17,8 @@
#ifndef Logger_H
#define Logger_H
+#include <ndb_global.h>
#include <BaseString.hpp>
-#include <stdarg.h>
class LogHandler;
class LogHandlerList;
diff --git a/ndb/include/ndb_global.h b/ndb/include/ndb_global.h
index a1aa292a2f6..028f1fdeea4 100644
--- a/ndb/include/ndb_global.h
+++ b/ndb/include/ndb_global.h
@@ -1,6 +1,72 @@
+
+#ifndef NDBGLOBAL_H
+#define NDBGLOBAL_H
+
#include <my_global.h>
#include <m_string.h>
#include <m_ctype.h>
#include <ndb_types.h>
#include <ctype.h>
+#include <stdarg.h>
+#include <time.h>
+#include <fcntl.h>
#include <sys/param.h>
+#include <sys/stat.h>
+
+#ifndef NDB_MACOSX
+#include <sys/mman.h>
+#endif
+
+#ifdef NDB_WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <windows.h>
+
+#define DIR_SEPARATOR "\\"
+#define PATH_MAX 256
+
+#pragma warning(disable: 4503 4786)
+#else
+
+#define DIR_SEPARATOR "/"
+
+#endif
+
+#ifdef NDB_VC98
+#define STATIC_CONST(x) enum { x }
+#else
+#define STATIC_CONST(x) static const Uint32 x
+#endif
+
+#ifdef __cplusplus
+#include <new>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <assert.h>
+
+#ifndef HAVE_STRDUP
+extern char * strdup(const char *s);
+#endif
+
+#ifndef HAVE_STRLCPY
+extern size_t strlcpy (char *dst, const char *src, size_t dst_sz);
+#endif
+
+#ifndef HAVE_STRLCAT
+extern size_t strlcat (char *dst, const char *src, size_t dst_sz);
+#endif
+
+#ifndef HAVE_STRCASECMP
+extern int strcasecmp(const char *s1, const char *s2);
+extern int strncasecmp(const char *s1, const char *s2, size_t n);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/ndb/include/ndb_types.h b/ndb/include/ndb_types.h
index 697d5f73473..166368b99c5 100644
--- a/ndb/include/ndb_types.h
+++ b/ndb/include/ndb_types.h
@@ -21,11 +21,6 @@
#ifndef SYS_TYPES_H
#define SYS_TYPES_H
-#if 0
-#include <sys/types.h>
-#include <stddef.h>
-#endif
-
typedef char Int8;
typedef unsigned char Uint8;
typedef short Int16;
diff --git a/ndb/include/newtonapi/defs/pcn_types.h b/ndb/include/newtonapi/defs/pcn_types.h
index a823846d7be..1c5de22e518 100644
--- a/ndb/include/newtonapi/defs/pcn_types.h
+++ b/ndb/include/newtonapi/defs/pcn_types.h
@@ -17,8 +17,7 @@
#ifndef PCN_TYPES_H
#define PCN_TYPES_H
-#include <stddef.h>
-#include <NdbUnistd.h>
+#include <ndb_global.h>
#ifdef NDB_MACOSX
typedef unsigned int Size_t;
diff --git a/ndb/include/portlib/NdbConstant.hpp b/ndb/include/portlib/NdbConstant.hpp
deleted file mode 100644
index bd45209d2b5..00000000000
--- a/ndb/include/portlib/NdbConstant.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 2003 MySQL AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-#ifndef NDB_CONSTANT_HPP
-#define NDB_CONSTANT_HPP
-
-#include <ndb_types.h>
-
-#ifdef NDB_VC98
-#define STATIC_CONST(x) enum { x }
-#else
-#define STATIC_CONST(x) static const Uint32 x
-#endif
-
-#endif
diff --git a/ndb/include/portlib/NdbMem.h b/ndb/include/portlib/NdbMem.h
index 38ad3f60448..0f2de80200e 100644
--- a/ndb/include/portlib/NdbMem.h
+++ b/ndb/include/portlib/NdbMem.h
@@ -17,8 +17,7 @@
#ifndef NDB_MEM_H
#define NDB_MEM_H
-#include <stddef.h>
-
+#include <ndb_global.h>
#ifdef __cplusplus
extern "C" {
diff --git a/ndb/include/portlib/NdbStdio.h b/ndb/include/portlib/NdbStdio.h
deleted file mode 100644
index 2b01e4d4dc8..00000000000
--- a/ndb/include/portlib/NdbStdio.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 2003 MySQL AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-/*
- * NdbStdio.h - stdio.h for ndb
- *
- *
- */
-
-
-#if defined NDB_OSE || defined NDB_SOFTOSE
-/* On OSE Delta the snprintf is declare in outfmt.h */
-#include <outfmt.h>
-#endif
-
-#include <ndb_global.h>
-
-#ifdef NDB_WIN32
-#define snprintf _snprintf
-#define vsnprintf _vsnprintf
-#define strtok_r(s1, s2, l) strtok(s1, s2)
-#endif
-
diff --git a/ndb/include/portlib/NdbTCP.h b/ndb/include/portlib/NdbTCP.h
index 6e2f18b61b2..e7538b1ed7f 100644
--- a/ndb/include/portlib/NdbTCP.h
+++ b/ndb/include/portlib/NdbTCP.h
@@ -17,6 +17,8 @@
#ifndef NDB_TCP_H
#define NDB_TCP_H
+#include <ndb_global.h>
+
#if defined NDB_OSE || defined NDB_SOFTOSE
/**
* Include files needed
@@ -24,7 +26,6 @@
#include "inet.h"
#include <netdb.h>
-#include <errno.h>
#define NDB_NONBLOCK FNDELAY
#define NDB_SOCKET_TYPE int
@@ -40,45 +41,15 @@ typedef int socklen_t;
#endif
-#if defined NDB_SOLARIS || defined NDB_HPUX || defined NDB_IBMAIX || defined NDB_TRU64X
-/**
- * Include files needed
- */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <unistd.h>
-
-#include <netdb.h>
-#include <errno.h>
-#include <fcntl.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
-
-#if defined NDB_LINUX || defined NDB_MACOSX
+#if defined NDB_SOLARIS || defined NDB_HPUX || defined NDB_IBMAIX || defined NDB_TRU64X || NDB_LINUX || defined NDB_MACOSX
/**
* Include files needed
*/
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
-#include <unistd.h>
#include <netdb.h>
-#include <errno.h>
-#include <fcntl.h>
#define NDB_NONBLOCK O_NONBLOCK
#define NDB_SOCKET_TYPE int
@@ -89,14 +60,12 @@ typedef int socklen_t;
#endif
-
#ifdef NDB_WIN32
/**
* Include files needed
*/
#include <winsock2.h>
#include <ws2tcpip.h>
-#include <errno.h>
#define InetErrno WSAGetLastError()
#define EWOULDBLOCK WSAEWOULDBLOCK
diff --git a/ndb/include/portlib/NdbUnistd.h b/ndb/include/portlib/NdbUnistd.h
deleted file mode 100644
index 42f67e2aeb3..00000000000
--- a/ndb/include/portlib/NdbUnistd.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 2003 MySQL AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-#ifndef NDB_UNISTD_H
-#define NDB_UNISTD_H
-
-#ifdef NDB_WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <windows.h>
-#include <limits.h>
-
-#define DIR_SEPARATOR "\\"
-#define PATH_MAX 256
-
-#pragma warning(disable: 4503 4786)
-
-#else
-#include <unistd.h>
-#include <limits.h>
-
-#define DIR_SEPARATOR "/"
-
-#endif
-
-#endif
diff --git a/ndb/include/util/Bitmask.hpp b/ndb/include/util/Bitmask.hpp
index 7a7d140ffe8..ed981743512 100644
--- a/ndb/include/util/Bitmask.hpp
+++ b/ndb/include/util/Bitmask.hpp
@@ -18,7 +18,6 @@
#define NDB_BITMASK_H
#include <ndb_global.h>
-#include <NdbConstant.hpp>
#ifndef NDB_ASSERT
#define NDB_ASSERT(x, s) \
diff --git a/ndb/include/util/File.hpp b/ndb/include/util/File.hpp
index 8418ea015bf..3ed0ad7a6f9 100644
--- a/ndb/include/util/File.hpp
+++ b/ndb/include/util/File.hpp
@@ -17,8 +17,7 @@
#ifndef FILE_H
#define FILE_H
-#include <NdbStdio.h>
-#include <NdbConstant.hpp>
+#include <ndb_global.h>
/**
* This class provides a file abstraction . It has operations
diff --git a/ndb/include/util/NdbString.h b/ndb/include/util/NdbString.h
deleted file mode 100644
index 9d910605e16..00000000000
--- a/ndb/include/util/NdbString.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (C) 2003 MySQL AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-#ifndef __NDBSTRING_H_INCLUDED__
-#define __NDBSTRING_H_INCLUDED__
-
-#include <ndb_global.h>
-#include <sys/types.h>
-#include <string.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef HAVE_STRDUP
-extern char * strdup(const char *s);
-#endif
-
-#ifndef HAVE_STRLCPY
-extern size_t strlcpy (char *dst, const char *src, size_t dst_sz);
-#endif
-
-#ifndef HAVE_STRLCAT
-extern size_t strlcat (char *dst, const char *src, size_t dst_sz);
-#endif
-
-#ifndef HAVE_STRCASECMP
-extern int strcasecmp(const char *s1, const char *s2);
-extern int strncasecmp(const char *s1, const char *s2, size_t n);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !__NDBSTRING_H_INCLUDED__ */
diff --git a/ndb/include/util/SimpleProperties.hpp b/ndb/include/util/SimpleProperties.hpp
index 37e28ea91d8..d5ebb16bb09 100644
--- a/ndb/include/util/SimpleProperties.hpp
+++ b/ndb/include/util/SimpleProperties.hpp
@@ -17,8 +17,7 @@
#ifndef SIMPLE_PROPERTIES_HPP
#define SIMPLE_PROPERTIES_HPP
-#include <ndb_types.h>
-#include <stddef.h> // offsetof
+#include <ndb_global.h>
#include <NdbOut.hpp>
/**
diff --git a/ndb/include/util/getarg.h b/ndb/include/util/getarg.h
index 713cf6e4b32..03ed25f6828 100644
--- a/ndb/include/util/getarg.h
+++ b/ndb/include/util/getarg.h
@@ -52,7 +52,7 @@
#ifndef __GETARG_H__
#define __GETARG_H__
-#include <stddef.h>
+#include <ndb_global.h>
#ifdef __cplusplus
extern "C" {
diff --git a/ndb/include/util/socket_io.h b/ndb/include/util/socket_io.h
index bbd1bf115ae..a0e6c4e369d 100644
--- a/ndb/include/util/socket_io.h
+++ b/ndb/include/util/socket_io.h
@@ -17,8 +17,9 @@
#ifndef _SOCKET_IO_H
#define _SOCKET_IO_H
+#include <ndb_global.h>
+
#include <NdbTCP.h>
-#include <stdarg.h>
#ifdef __cplusplus
extern "C" {