diff options
author | unknown <tomas@mc05.(none)> | 2004-05-07 08:39:42 +0200 |
---|---|---|
committer | unknown <tomas@mc05.(none)> | 2004-05-07 08:39:42 +0200 |
commit | eef6e474ad04f8f6c57735396a0d833bafeaa726 (patch) | |
tree | 3ab627029960d3dc4eecaa863f6cac3d29c87ac0 /ndb/src | |
parent | 789adced2bb4d72f3bf2cdf66870a11718d9cf95 (diff) | |
download | mariadb-git-eef6e474ad04f8f6c57735396a0d833bafeaa726.tar.gz |
introduced ndb_global.h/my_global.h to replace sytem lib includes e.g. stdio, stdlib
Diffstat (limited to 'ndb/src')
106 files changed, 220 insertions, 331 deletions
diff --git a/ndb/src/common/debugger/DebuggerNames.cpp b/ndb/src/common/debugger/DebuggerNames.cpp index fdee978ab54..ebe94a6059f 100644 --- a/ndb/src/common/debugger/DebuggerNames.cpp +++ b/ndb/src/common/debugger/DebuggerNames.cpp @@ -14,16 +14,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "DebuggerNames.hpp" #include <BlockNumbers.h> #include <GlobalSignalNumbers.h> #include <signaldata/SignalDataPrint.hpp> -#include <NdbStdio.h> -#include <stdlib.h> -#include <string.h> - static const char * localSignalNames[MAX_GSN+1]; static SignalDataPrintFunction localPrintFunctions[MAX_GSN+1]; static const char * localBlockNames[NO_OF_BLOCKS]; diff --git a/ndb/src/common/debugger/SignalLoggerManager.cpp b/ndb/src/common/debugger/SignalLoggerManager.cpp index ae6edd5ed71..35e49f3c1eb 100644 --- a/ndb/src/common/debugger/SignalLoggerManager.cpp +++ b/ndb/src/common/debugger/SignalLoggerManager.cpp @@ -14,14 +14,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "SignalLoggerManager.hpp" #include <LongSignal.hpp> -#include <stdlib.h> -#include <string.h> #include <assert.h> #include <time.h> -#include <NdbString.h> #include <DebuggerNames.hpp> diff --git a/ndb/src/common/editline/editline_internal.h b/ndb/src/common/editline/editline_internal.h index 93c13e55edc..5ed2b32a873 100644 --- a/ndb/src/common/editline/editline_internal.h +++ b/ndb/src/common/editline/editline_internal.h @@ -19,9 +19,8 @@ ** Internal header file for editline library. */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <ndb_global.h> + #if defined(SYS_UNIX) #include "unix.h" #endif /* defined(SYS_UNIX) */ diff --git a/ndb/src/common/editline/editline_win32.c b/ndb/src/common/editline/editline_win32.c index feef0108523..5083edb7fae 100644 --- a/ndb/src/common/editline/editline_win32.c +++ b/ndb/src/common/editline/editline_win32.c @@ -15,8 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdio.h> -#include <malloc.h> +#include <ndb_global.h> char* readline(const char* prompt) diff --git a/ndb/src/common/editline/test/testit.c b/ndb/src/common/editline/test/testit.c index 9a7dfb7bbdf..4058f8ae660 100644 --- a/ndb/src/common/editline/test/testit.c +++ b/ndb/src/common/editline/test/testit.c @@ -20,11 +20,7 @@ ** A "micro-shell" to test editline library. ** If given any arguments, commands aren't executed. */ -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> - -#include <NdbString.h> +#include <ndb_global.h> #include <editline/editline.h> int diff --git a/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp b/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp index 22f67d15659..36aac5d0e15 100644 --- a/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp +++ b/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp @@ -14,6 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <assert.h> + #include "LogHandlerListUnitTest.hpp" #include <ConsoleLogHandler.hpp> @@ -22,9 +25,6 @@ #include <NdbOut.hpp> -#include <stdio.h> -#include <assert.h> - typedef bool (*TESTFUNC)(const char*); typedef struct { diff --git a/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/ndb/src/common/mgmcommon/ConfigRetriever.cpp index a3f26454df6..ef6861ef291 100644 --- a/ndb/src/common/mgmcommon/ConfigRetriever.cpp +++ b/ndb/src/common/mgmcommon/ConfigRetriever.cpp @@ -14,6 +14,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <ndb_version.h> +#include <sys/stat.h> + #include <ConfigRetriever.hpp> #include "LocalConfig.hpp" @@ -21,21 +25,15 @@ #include <NdbOut.hpp> #include <NdbTCP.h> -#include <string.h> -#include <NdbStdio.h> #include <NdbEnv.h> #include "MgmtErrorReporter.hpp" #include <uucode.h> #include <Properties.hpp> -#include <stdio.h> -#include <NdbString.h> -#include <sys/stat.h> #include <socket_io.h> #include <NdbConfig.h> -#include <ndb_version.h> //**************************************************************************** //**************************************************************************** diff --git a/ndb/src/common/mgmcommon/InitConfigFileParser.hpp b/ndb/src/common/mgmcommon/InitConfigFileParser.hpp index 1e85067396c..f4f27abb055 100644 --- a/ndb/src/common/mgmcommon/InitConfigFileParser.hpp +++ b/ndb/src/common/mgmcommon/InitConfigFileParser.hpp @@ -17,7 +17,8 @@ #ifndef InitConfigFileParser_H #define InitConfigFileParser_H -#include <stdio.h> +#include <ndb_global.h> + #include <Properties.hpp> class Config; diff --git a/ndb/src/common/mgmcommon/LocalConfig.hpp b/ndb/src/common/mgmcommon/LocalConfig.hpp index ec7b572e92d..eb676bf9bed 100644 --- a/ndb/src/common/mgmcommon/LocalConfig.hpp +++ b/ndb/src/common/mgmcommon/LocalConfig.hpp @@ -17,10 +17,8 @@ #ifndef LocalConfig_H #define LocalConfig_H -#include <stdlib.h> -#include <string.h> +#include <ndb_global.h> #include <NdbOut.hpp> -#include <NdbStdio.h> //**************************************************************************** // Description: The class LocalConfig corresponds to the information possible diff --git a/ndb/src/common/mgmcommon/NdbConfig.c b/ndb/src/common/mgmcommon/NdbConfig.c index b12d9fcfaf9..827ef34a840 100644 --- a/ndb/src/common/mgmcommon/NdbConfig.c +++ b/ndb/src/common/mgmcommon/NdbConfig.c @@ -14,10 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <NdbConfig.h> #include <NdbEnv.h> -#include <stdlib.h> -#include <string.h> const char* NdbConfig_HomePath(char* buf, int buflen){ diff --git a/ndb/src/common/mgmcommon/printConfig/printConfig.cpp b/ndb/src/common/mgmcommon/printConfig/printConfig.cpp index 7260a84ce7a..daa287cc44d 100644 --- a/ndb/src/common/mgmcommon/printConfig/printConfig.cpp +++ b/ndb/src/common/mgmcommon/printConfig/printConfig.cpp @@ -15,10 +15,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include <NdbMain.h> #include <ConfigRetriever.hpp> #include <Properties.hpp> -#include <stdlib.h> #include <NdbOut.hpp> void usage(const char * prg){ diff --git a/ndb/src/common/portlib/memtest/memtest.c b/ndb/src/common/portlib/memtest/memtest.c index d23235b7aa2..fb525c2f19f 100644 --- a/ndb/src/common/portlib/memtest/memtest.c +++ b/ndb/src/common/portlib/memtest/memtest.c @@ -16,8 +16,7 @@ -#include <stdio.h> -#include <unistd.h> +#include <ndb_global.h> #include <sys/time.h> #include <sys/mman.h> long long getMilli(); diff --git a/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp b/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp index 9e396cd98ee..f5d0c6a0a4c 100644 --- a/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp +++ b/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp @@ -17,6 +17,9 @@ +#include <ndb_global.h> +#include <sys/mman.h> + #include <NdbOut.hpp> #include <NdbThread.h> #include <NdbMutex.h> @@ -27,13 +30,6 @@ #include <NdbHost.h> #include <NdbMain.h> #include <getarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <sys/time.h> -#include <sys/mman.h> - struct ThreadData { diff --git a/ndb/src/common/portlib/mmstest/mmslist.cpp b/ndb/src/common/portlib/mmstest/mmslist.cpp index bd00211445c..05538785293 100644 --- a/ndb/src/common/portlib/mmstest/mmslist.cpp +++ b/ndb/src/common/portlib/mmstest/mmslist.cpp @@ -14,14 +14,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_common.h> + #include <NdbOut.hpp> #include <NdbMain.h> #include <ose.h> #include <mms.sig> #include <mms_err.h> -#include <string.h> -#include <stdio.h> #include <NdbOut.hpp> /** diff --git a/ndb/src/common/portlib/mmstest/mmstest.cpp b/ndb/src/common/portlib/mmstest/mmstest.cpp index 6ebb5064aaf..9cc7d810985 100644 --- a/ndb/src/common/portlib/mmstest/mmstest.cpp +++ b/ndb/src/common/portlib/mmstest/mmstest.cpp @@ -14,13 +14,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include <NdbOut.hpp> #include "NdbThread.h" #include <NdbMem.h> #include <NdbMain.h> -#include <stdlib.h> - NDB_COMMAND(ndbmem, "ndbmem", "ndbmem", "Test the ndbmem functionality", 4096){ ndbout << "Starting test of NdbMem" << endl; diff --git a/ndb/src/common/portlib/test/NdbPortLibTest.cpp b/ndb/src/common/portlib/test/NdbPortLibTest.cpp index 8a5c8f4a878..55b9ccec5f2 100644 --- a/ndb/src/common/portlib/test/NdbPortLibTest.cpp +++ b/ndb/src/common/portlib/test/NdbPortLibTest.cpp @@ -20,7 +20,7 @@ * TODO - Add tests for NdbMem */ - +#include <ndb_global.h> #include "NdbOut.hpp" #include "NdbThread.h" @@ -32,11 +32,6 @@ #include "NdbHost.h" #include "NdbMain.h" -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <string.h> - int TestHasFailed; int verbose = 0; diff --git a/ndb/src/common/portlib/unix/NdbDaemon.c b/ndb/src/common/portlib/unix/NdbDaemon.c index fc114266c9d..eb3ca339fa4 100644 --- a/ndb/src/common/portlib/unix/NdbDaemon.c +++ b/ndb/src/common/portlib/unix/NdbDaemon.c @@ -14,28 +14,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "NdbDaemon.h" +#include <ndb_global.h> #include <assert.h> - -#ifdef NDB_LINUX -#include <sys/types.h> -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <stdio.h> #include <fcntl.h> -#include <errno.h> -#endif - -#ifdef NDB_SOLARIS -#include <sys/types.h> -#include <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include <fcntl.h> -#include <errno.h> -#endif +#include "NdbDaemon.h" #define NdbDaemon_ErrorSize 500 #if defined(NDB_LINUX) || defined(NDB_SOLARIS) diff --git a/ndb/src/common/transporter/Packer.cpp b/ndb/src/common/transporter/Packer.cpp index 77bd66d1ba9..fa72af12dac 100644 --- a/ndb/src/common/transporter/Packer.cpp +++ b/ndb/src/common/transporter/Packer.cpp @@ -14,13 +14,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "Packer.hpp" #include <TransporterRegistry.hpp> #include <TransporterCallback.hpp> #include <RefConvert.hpp> -#include <stdio.h> - Uint32 TransporterRegistry::unpack(Uint32 * readPtr, Uint32 sizeOfData, diff --git a/ndb/src/common/transporter/SCI_Transporter.cpp b/ndb/src/common/transporter/SCI_Transporter.cpp index 2be857e8115..c52c8a9d8c0 100644 --- a/ndb/src/common/transporter/SCI_Transporter.cpp +++ b/ndb/src/common/transporter/SCI_Transporter.cpp @@ -14,17 +14,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "SCI_Transporter.hpp" -#include <NdbStdio.h> #include <NdbOut.hpp> #include <NdbSleep.h> #include <NdbTick.h> -#include <stdlib.h> #include <NdbTick.h> -#if 0 -#include <malloc.h> -#include <sys/time.h> -#endif + #include "TransporterInternalDefinitions.hpp" #include <TransporterCallback.hpp> diff --git a/ndb/src/common/transporter/SHM_Buffer.hpp b/ndb/src/common/transporter/SHM_Buffer.hpp index 43250853fee..6dd6b4672a1 100644 --- a/ndb/src/common/transporter/SHM_Buffer.hpp +++ b/ndb/src/common/transporter/SHM_Buffer.hpp @@ -17,11 +17,11 @@ #ifndef SHM_BUFFER_HPP #define SHM_BUFFER_HPP -#include <stdio.h> -#include <ndb_types.h> -#include <NdbSleep.h> +#include <ndb_global.h> #include <assert.h> +#include <NdbSleep.h> + /** * These classes implement a circular buffer * diff --git a/ndb/src/common/transporter/SHM_Transporter.cpp b/ndb/src/common/transporter/SHM_Transporter.cpp index f18b775efa4..525194db3a6 100644 --- a/ndb/src/common/transporter/SHM_Transporter.cpp +++ b/ndb/src/common/transporter/SHM_Transporter.cpp @@ -15,15 +15,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "SHM_Transporter.hpp" #include "TransporterInternalDefinitions.hpp" #include <TransporterCallback.hpp> #include <NdbSleep.h> #include <NdbOut.hpp> -#include <stdio.h> -#include <stdlib.h> - #ifdef NDB_WIN32 #include <windows.h> #else diff --git a/ndb/src/common/transporter/SHM_Transporter.unix.cpp b/ndb/src/common/transporter/SHM_Transporter.unix.cpp index 975c1191aea..afbf124432e 100644 --- a/ndb/src/common/transporter/SHM_Transporter.unix.cpp +++ b/ndb/src/common/transporter/SHM_Transporter.unix.cpp @@ -15,15 +15,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "SHM_Transporter.hpp" #include "TransporterInternalDefinitions.hpp" #include <TransporterCallback.hpp> #include <NdbSleep.h> #include <NdbOut.hpp> -#include <stdio.h> - - #include <sys/ipc.h> #include <sys/shm.h> diff --git a/ndb/src/common/transporter/SHM_Transporter.win32.cpp b/ndb/src/common/transporter/SHM_Transporter.win32.cpp index 4ba52c9179d..c289a85da0e 100644 --- a/ndb/src/common/transporter/SHM_Transporter.win32.cpp +++ b/ndb/src/common/transporter/SHM_Transporter.win32.cpp @@ -15,14 +15,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "SHM_Transporter.hpp" #include "TransporterInternalDefinitions.hpp" #include <TransporterCallback.hpp> #include <NdbSleep.h> #include <NdbOut.hpp> -#include <stdio.h> - #include <windows.h> diff --git a/ndb/src/common/transporter/SendBuffer.hpp b/ndb/src/common/transporter/SendBuffer.hpp index 75ef0708e83..63a01f3de24 100644 --- a/ndb/src/common/transporter/SendBuffer.hpp +++ b/ndb/src/common/transporter/SendBuffer.hpp @@ -33,10 +33,9 @@ #include "TransporterDefinitions.hpp" #include <TransporterCallback.hpp> -#include <stdlib.h> #ifdef DEBUG_TRANSPORTER -#include <stdio.h> +#include <ndb_global.h> #endif class SendBuffer { diff --git a/ndb/src/common/transporter/TCP_Transporter.cpp b/ndb/src/common/transporter/TCP_Transporter.cpp index 8a7d1741636..99b6a137797 100644 --- a/ndb/src/common/transporter/TCP_Transporter.cpp +++ b/ndb/src/common/transporter/TCP_Transporter.cpp @@ -14,6 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include <NdbTCP.h> #include "TCP_Transporter.hpp" #include <NdbOut.hpp> @@ -23,13 +25,9 @@ #if defined NDB_OSE || defined NDB_SOFTOSE #define inet_send inet_send #else -#include <NdbStdio.h> #define inet_send send #endif -#include <stdlib.h> - - #ifdef NDB_WIN32 class ndbstrerror { diff --git a/ndb/src/common/transporter/TransporterRegistry.cpp b/ndb/src/common/transporter/TransporterRegistry.cpp index dcd957f40ce..482e8d40b9b 100644 --- a/ndb/src/common/transporter/TransporterRegistry.cpp +++ b/ndb/src/common/transporter/TransporterRegistry.cpp @@ -14,14 +14,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <assert.h> + #include "TransporterRegistry.hpp" #include "TransporterInternalDefinitions.hpp" #include "Transporter.hpp" -#include <assert.h> -#include <stdlib.h> - #ifdef NDB_TCP_TRANSPORTER #include "TCP_Transporter.hpp" #endif diff --git a/ndb/src/common/transporter/basictest/basicTransporterTest.cpp b/ndb/src/common/transporter/basictest/basicTransporterTest.cpp index 5d8186badb8..c0a437c4907 100644 --- a/ndb/src/common/transporter/basictest/basicTransporterTest.cpp +++ b/ndb/src/common/transporter/basictest/basicTransporterTest.cpp @@ -14,18 +14,17 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "TransporterRegistry.hpp" #include "TransporterDefinitions.hpp" #include "TransporterCallback.hpp" #include <RefConvert.hpp> -#include <NdbStdio.h> -#include <stdlib.h> #include <NdbTick.h> #include <NdbMain.h> #include <NdbOut.hpp> #include <NdbSleep.h> -#include <NdbString.h> int basePortTCP = 17000; diff --git a/ndb/src/common/transporter/buddy.cpp b/ndb/src/common/transporter/buddy.cpp index c65aad1df2c..dc25e2dc66c 100644 --- a/ndb/src/common/transporter/buddy.cpp +++ b/ndb/src/common/transporter/buddy.cpp @@ -15,9 +15,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "buddy.hpp" -#include <stdlib.h> -#include <math.h> - void Chunk256::setFree(bool free){ // Bit 0 of allocationTimeStamp represents if the segment is free or not diff --git a/ndb/src/common/transporter/buddy.hpp b/ndb/src/common/transporter/buddy.hpp index 7272ac884ec..f720e9e61a1 100644 --- a/ndb/src/common/transporter/buddy.hpp +++ b/ndb/src/common/transporter/buddy.hpp @@ -17,8 +17,7 @@ #ifndef BUDDY_H #define BUDDY_H -#include <stdlib.h> -#include <stdio.h> +#include <ndb_global.h> typedef unsigned int Uint32; typedef unsigned short Uint16; diff --git a/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp b/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp index 03ce7ea6df3..803029ee565 100644 --- a/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp +++ b/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp @@ -14,17 +14,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdio.h> -#include <string.h> -#include <stdlib.h> +#include <ndb_global.h> + #include "sisci_types.h" #include "sisci_api.h" #include "sisci_error.h" //#include "sisci_demolib.h" -#include <strings.h> -#include <ndb_types.h> #include <NdbTick.h> -#include "NdbSleep.h" +#include <NdbSleep.h> #define NO_CALLBACK NULL #define NO_FLAGS 0 #define DATA_TRANSFER_READY 8 diff --git a/ndb/src/common/transporter/perftest/perfTransporterTest.cpp b/ndb/src/common/transporter/perftest/perfTransporterTest.cpp index 6d7f7083a48..d33221c2835 100644 --- a/ndb/src/common/transporter/perftest/perfTransporterTest.cpp +++ b/ndb/src/common/transporter/perftest/perfTransporterTest.cpp @@ -14,18 +14,17 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "TransporterRegistry.hpp" #include "TransporterDefinitions.hpp" #include "TransporterCallback.hpp" #include <RefConvert.hpp> -#include <NdbStdio.h> -#include <stdlib.h> #include <NdbTick.h> #include <NdbMain.h> #include <NdbOut.hpp> #include <NdbSleep.h> -#include <NdbString.h> int basePortTCP = 17000; diff --git a/ndb/src/common/transporter/priotest/prioTransporterTest.cpp b/ndb/src/common/transporter/priotest/prioTransporterTest.cpp index 919cc9d7511..0fce6aaad39 100644 --- a/ndb/src/common/transporter/priotest/prioTransporterTest.cpp +++ b/ndb/src/common/transporter/priotest/prioTransporterTest.cpp @@ -14,6 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "TransporterRegistry.hpp" #include "TransporterDefinitions.hpp" #include "TransporterCallback.hpp" @@ -21,8 +23,6 @@ #include "prioTransporterTest.hpp" -#include <NdbStdio.h> -#include <stdlib.h> #include <NdbTick.h> #include <NdbMain.h> #include <NdbOut.hpp> diff --git a/ndb/src/common/util/Base64.cpp b/ndb/src/common/util/Base64.cpp index 5f4bbc8645a..482d0b10ad2 100644 --- a/ndb/src/common/util/Base64.cpp +++ b/ndb/src/common/util/Base64.cpp @@ -14,8 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdio.h> -#include <string.h> +#include <ndb_global.h> #include <Base64.hpp> static char base64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" diff --git a/ndb/src/common/util/BaseString.cpp b/ndb/src/common/util/BaseString.cpp index 1b0eaa1b83c..186642cbfa8 100644 --- a/ndb/src/common/util/BaseString.cpp +++ b/ndb/src/common/util/BaseString.cpp @@ -15,11 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* -*- c-basic-offset: 4; -*- */ -#include <string.h> -#include <NdbStdio.h> +#include <ndb_global.h> +#include <BaseString.hpp> #include <stdarg.h> -#include "BaseString.hpp" -#include <stdlib.h> BaseString::BaseString() { diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp index bbd2067f424..ccd6ba24916 100644 --- a/ndb/src/common/util/File.cpp +++ b/ndb/src/common/util/File.cpp @@ -16,8 +16,6 @@ #include <File.hpp> -#include <errno.h> -#include <string.h> #include <sys/stat.h> #if defined NDB_OSE || defined NDB_SOFTOSE diff --git a/ndb/src/common/util/Parser.cpp b/ndb/src/common/util/Parser.cpp index d5c23fe14c1..ff6d290ae52 100644 --- a/ndb/src/common/util/Parser.cpp +++ b/ndb/src/common/util/Parser.cpp @@ -15,12 +15,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <assert.h> + #include "Parser.hpp" -#include <stdio.h> #include <NdbOut.hpp> -#include <string.h> #include <Properties.hpp> -#include <assert.h> #include <Base64.hpp> #define DEBUG(x) ndbout << x << endl; diff --git a/ndb/src/common/util/Properties.cpp b/ndb/src/common/util/Properties.cpp index 4841d6e5e9e..05d8b56329b 100644 --- a/ndb/src/common/util/Properties.cpp +++ b/ndb/src/common/util/Properties.cpp @@ -14,14 +14,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <assert.h> + #include <Properties.hpp> #include <NdbTCP.h> -#include <string.h> -#include <stdlib.h> -#include <assert.h> -#include <NdbString.h> - #include <NdbOut.hpp> /** diff --git a/ndb/src/common/util/SimpleProperties.cpp b/ndb/src/common/util/SimpleProperties.cpp index a118478ba6c..34a9d2719b6 100644 --- a/ndb/src/common/util/SimpleProperties.cpp +++ b/ndb/src/common/util/SimpleProperties.cpp @@ -14,9 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <SimpleProperties.hpp> -#include <stdlib.h> -#include <NdbString.h> #include <NdbOut.hpp> #include <NdbTCP.h> #include <assert.h> diff --git a/ndb/src/common/util/SocketServer.cpp b/ndb/src/common/util/SocketServer.cpp index 39f46eceed9..21f4cd513b9 100644 --- a/ndb/src/common/util/SocketServer.cpp +++ b/ndb/src/common/util/SocketServer.cpp @@ -15,17 +15,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <assert.h> + #include "SocketServer.hpp" #include <NdbTCP.h> -#include <string.h> #include <NdbOut.hpp> #include <NdbThread.h> #include <NdbSleep.h> -#include <stdio.h> -#include <assert.h> - #define DEBUG(x) ndbout << x << endl; SocketServer::SocketServer(int maxSessions) : diff --git a/ndb/src/common/util/getarg.c b/ndb/src/common/util/getarg.c index 7d627a92d18..131d6a8b3d9 100644 --- a/ndb/src/common/util/getarg.c +++ b/ndb/src/common/util/getarg.c @@ -33,11 +33,7 @@ */ #include <ndb_global.h> -#include <ndb_types.h> -#include <NdbStdio.h> -#include <stdlib.h> -#include <string.h> #include <time.h> #include <ctype.h> #include "getarg.h" diff --git a/ndb/src/common/util/new.cpp b/ndb/src/common/util/new.cpp index a0709a3fa13..889e83edf6f 100644 --- a/ndb/src/common/util/new.cpp +++ b/ndb/src/common/util/new.cpp @@ -1,6 +1,5 @@ -#include <malloc.h> -#include <stdlib.h> +#include <ndb_global.h> extern "C" { void (* ndb_new_handler)() = 0; diff --git a/ndb/src/common/util/random.c b/ndb/src/common/util/random.c index 91da19572e2..286ab093a26 100644 --- a/ndb/src/common/util/random.c +++ b/ndb/src/common/util/random.c @@ -18,16 +18,8 @@ * I N C L U D E D F I L E S * ***************************************************************/ -#include <stdio.h> -#include <stdlib.h> -#include <limits.h> -#include <sys/types.h> +#include <ndb_global.h> -#ifndef NDB_WIN32 -#include <sys/time.h> -#endif - -#include <ndb_types.h> #include <NdbOut.hpp> #include <random.h> diff --git a/ndb/src/common/util/strdup.c b/ndb/src/common/util/strdup.c index c7fb8002ff0..afe2306427e 100644 --- a/ndb/src/common/util/strdup.c +++ b/ndb/src/common/util/strdup.c @@ -16,7 +16,6 @@ #include <ndb_global.h> -#include <stdlib.h> #ifndef HAVE_STRDUP char * diff --git a/ndb/src/common/util/testProperties/testProperties.cpp b/ndb/src/common/util/testProperties/testProperties.cpp index 4a2999b89c1..3aa2af92c5b 100644 --- a/ndb/src/common/util/testProperties/testProperties.cpp +++ b/ndb/src/common/util/testProperties/testProperties.cpp @@ -14,10 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include "Properties.hpp" #include <NdbOut.hpp> -#include <stdlib.h> -#include <string.h> #include "uucode.h" diff --git a/ndb/src/common/util/testSimpleProperties/sp_test.cpp b/ndb/src/common/util/testSimpleProperties/sp_test.cpp index d6dbe2a1502..22b92c9a80c 100644 --- a/ndb/src/common/util/testSimpleProperties/sp_test.cpp +++ b/ndb/src/common/util/testSimpleProperties/sp_test.cpp @@ -14,10 +14,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <assert.h> + #include "SimpleProperties.hpp" #include <NdbOut.hpp> -#include <assert.h> -#include <stdio.h> Uint32 page[8192]; diff --git a/ndb/src/common/util/uucode.c b/ndb/src/common/util/uucode.c index f862d982204..da34d565153 100644 --- a/ndb/src/common/util/uucode.c +++ b/ndb/src/common/util/uucode.c @@ -15,8 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdio.h> -#include <string.h> +#include <ndb_global.h> /* ENC is the basic 1 character encoding function to make a char printing */ /* DEC is single character decode */ diff --git a/ndb/src/common/util/version.c b/ndb/src/common/util/version.c index 2ff10f51932..91aba6404d4 100644 --- a/ndb/src/common/util/version.c +++ b/ndb/src/common/util/version.c @@ -14,9 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdio.h> -#include <string.h> -#include <ndb_types.h> +#include <ndb_global.h> #include <ndb_version.h> #include <version.h> diff --git a/ndb/src/cw/cpcc-win32/C++/StdAfx.h b/ndb/src/cw/cpcc-win32/C++/StdAfx.h index d84b5811f8d..370d04fb466 100644 --- a/ndb/src/cw/cpcc-win32/C++/StdAfx.h +++ b/ndb/src/cw/cpcc-win32/C++/StdAfx.h @@ -48,15 +48,12 @@ #include <afxtempl.h> // C RunTime Header Files -#include <stdlib.h> -#include <malloc.h> +#include <ndb_global.h> #include <memory.h> #include <tchar.h> #include <commctrl.h> #include <shlwapi.h> #include <crtdbg.h> -#include <string.h> -#include <stdio.h> // Local Header Files #include "resource.h" diff --git a/ndb/src/cw/cpcd/Process.cpp b/ndb/src/cw/cpcd/Process.cpp index a54c6b8e475..e35f9d6037a 100644 --- a/ndb/src/cw/cpcd/Process.cpp +++ b/ndb/src/cw/cpcd/Process.cpp @@ -14,13 +14,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <sys/types.h> +#include <ndb_global.h> #include <signal.h> #include <assert.h> -#include <stdlib.h> -#include <NdbUnistd.h> #include <BaseString.hpp> #include <InputStream.hpp> @@ -28,8 +26,6 @@ #include "CPCD.hpp" #include <pwd.h> -#include <sys/types.h> -#include <unistd.h> #include <sys/stat.h> #include <sys/resource.h> diff --git a/ndb/src/cw/cpcd/common.hpp b/ndb/src/cw/cpcd/common.hpp index 65fcce05f66..c3d87b8b9f5 100644 --- a/ndb/src/cw/cpcd/common.hpp +++ b/ndb/src/cw/cpcd/common.hpp @@ -17,7 +17,7 @@ #ifndef __CPCD_COMMON_HPP_INCLUDED__ #define __CPCD_COMMON_HPP_INCLUDED__ -#include <stdio.h> +#include <ndb_global.h> #include <logger/Logger.hpp> #include <getarg.h> diff --git a/ndb/src/cw/test/socketclient/socketClientTest.cpp b/ndb/src/cw/test/socketclient/socketClientTest.cpp index a4a0ed1e933..423c196aa43 100644 --- a/ndb/src/cw/test/socketclient/socketClientTest.cpp +++ b/ndb/src/cw/test/socketclient/socketClientTest.cpp @@ -15,11 +15,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <NdbOut.hpp> #include <Properties.hpp> #include <socket_io.h> -#include <NdbStdio.h> -#include <stdlib.h> #include <NdbTick.h> #include <NdbMain.h> #include <NdbSleep.h> diff --git a/ndb/src/cw/util/ClientInterface.hpp b/ndb/src/cw/util/ClientInterface.hpp index 764705afacd..66ecfe05197 100644 --- a/ndb/src/cw/util/ClientInterface.hpp +++ b/ndb/src/cw/util/ClientInterface.hpp @@ -16,6 +16,7 @@ #ifndef CLIENT_IF_HPP #define CLIENT_IF_HPP +#include <ndb_global.h> #include <Parser.hpp> #include <InputStream.hpp> #include <Parser.hpp> @@ -23,9 +24,6 @@ #include <Properties.hpp> #include "SocketRegistry.hpp" #include "SocketService.hpp" -#include "string.h" -#include <stdio.h> -#include <stdlib.h> class ClientInterface { private: diff --git a/ndb/src/kernel/blocks/backup/FsBuffer.hpp b/ndb/src/kernel/blocks/backup/FsBuffer.hpp index 4b5d95a19a5..cbc03ffd11b 100644 --- a/ndb/src/kernel/blocks/backup/FsBuffer.hpp +++ b/ndb/src/kernel/blocks/backup/FsBuffer.hpp @@ -17,10 +17,8 @@ #ifndef FS_BUFFER_HPP #define FS_BUFFER_HPP +#include <ndb_global.h> #include <assert.h> -#include <stdlib.h> -#include <string.h> -#include <ndb_types.h> #define DEBUG(x) diff --git a/ndb/src/kernel/blocks/backup/read.cpp b/ndb/src/kernel/blocks/backup/read.cpp index 8300c74ab43..921c352ea13 100644 --- a/ndb/src/kernel/blocks/backup/read.cpp +++ b/ndb/src/kernel/blocks/backup/read.cpp @@ -15,9 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <ndb_global.h> #include <NdbTCP.h> #include <NdbOut.hpp> diff --git a/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp b/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp index b16990bda6c..51f05ae1d6e 100644 --- a/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp +++ b/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp @@ -15,13 +15,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <NdbStdio.h> +#include <ndb_global.h> +#include <sys/stat.h> + #include <NdbMain.h> #include <NdbOut.hpp> #include <SchemaFile.hpp> -#include <stdlib.h> -#include <string.h> -#include <sys/stat.h> void usage(const char * prg){ diff --git a/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp b/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp index 4c55425bdd7..90bb1ded490 100644 --- a/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp +++ b/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp @@ -15,13 +15,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <NdbStdio.h> +#include <ndb_global.h> +#include <sys/stat.h> + #include <NdbMain.h> #include <NdbOut.hpp> #include <Sysfile.hpp> -#include <stdlib.h> -#include <string.h> -#include <sys/stat.h> void usage(const char * prg){ diff --git a/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp b/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp index d2d166fa03e..540df7b507e 100644 --- a/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp +++ b/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp @@ -25,11 +25,10 @@ //---------------------------------------------------------------- +#include <ndb_global.h> + #include "records.hpp" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> + #define RETURN_ERROR 1 #define RETURN_OK 0 diff --git a/ndb/src/kernel/blocks/ndbfs/Filename.cpp b/ndb/src/kernel/blocks/ndbfs/Filename.cpp index c0bc52b4501..494c9c74eb9 100644 --- a/ndb/src/kernel/blocks/ndbfs/Filename.cpp +++ b/ndb/src/kernel/blocks/ndbfs/Filename.cpp @@ -14,10 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdlib.h> -#include <string.h> -#include <NdbStdio.h> -#include <NdbUnistd.h> +#include <ndb_global.h> + #include <NdbOut.hpp> #include "Filename.hpp" diff --git a/ndb/src/kernel/error/ErrorReporter.hpp b/ndb/src/kernel/error/ErrorReporter.hpp index f1428821ab0..20340a9602f 100644 --- a/ndb/src/kernel/error/ErrorReporter.hpp +++ b/ndb/src/kernel/error/ErrorReporter.hpp @@ -17,9 +17,10 @@ #ifndef ERRORREPORTER_H #define ERRORREPORTER_H +#include <ndb_global.h> + #include "TimeModule.hpp" #include "Error.hpp" -#include <stdio.h> #include <Emulator.hpp> diff --git a/ndb/src/kernel/vm/Emulator.cpp b/ndb/src/kernel/vm/Emulator.cpp index a852e045c6e..7eae1f519c0 100644 --- a/ndb/src/kernel/vm/Emulator.cpp +++ b/ndb/src/kernel/vm/Emulator.cpp @@ -14,6 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "Emulator.hpp" #include <FastScheduler.hpp> #include <SignalLoggerManager.hpp> @@ -31,7 +33,6 @@ #include <NdbOut.hpp> #include <NdbMutex.h> #include <NdbSleep.h> -#include <stdlib.h> #include <new> extern "C" { diff --git a/ndb/src/kernel/vm/GlobalData.hpp b/ndb/src/kernel/vm/GlobalData.hpp index ca7dd467750..3d312154c35 100644 --- a/ndb/src/kernel/vm/GlobalData.hpp +++ b/ndb/src/kernel/vm/GlobalData.hpp @@ -17,11 +17,11 @@ #ifndef GLOBAL_DATA_H #define GLOBAL_DATA_H +#include <ndb_global.h> #include <kernel_types.h> +#include <assert.h> #include "Prio.hpp" #include "VMSignal.hpp" -#include <stdlib.h> -#include <assert.h> #include <BlockNumbers.h> #include <NodeState.hpp> diff --git a/ndb/src/kernel/vm/TransporterCallback.cpp b/ndb/src/kernel/vm/TransporterCallback.cpp index 1fec4ea86bd..3798e4040c8 100644 --- a/ndb/src/kernel/vm/TransporterCallback.cpp +++ b/ndb/src/kernel/vm/TransporterCallback.cpp @@ -14,12 +14,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include <TransporterCallback.hpp> #include <TransporterRegistry.hpp> #include <FastScheduler.hpp> #include <Emulator.hpp> #include <ErrorHandlingMacros.hpp> -#include <stdio.h> #include "LongSignal.hpp" diff --git a/ndb/src/kernel/vm/VMSignal.hpp b/ndb/src/kernel/vm/VMSignal.hpp index d436143c055..45e731f2079 100644 --- a/ndb/src/kernel/vm/VMSignal.hpp +++ b/ndb/src/kernel/vm/VMSignal.hpp @@ -17,14 +17,15 @@ #ifndef VMSignal_H #define VMSignal_H +#include <ndb_global.h> +#include <ndb_limits.h> +#include <kernel_types.h> + #include <ErrorReporter.hpp> #include <NodeBitmask.hpp> -#include <ndb_limits.h> -#include <kernel_types.h> #include <RefConvert.hpp> #include <TransporterDefinitions.hpp> -#include <stdlib.h> /** * Struct used when sending to multiple blocks diff --git a/ndb/src/kernel/vm/al_test/arrayListTest.cpp b/ndb/src/kernel/vm/al_test/arrayListTest.cpp index 39d8170cfc5..6f2bb7fc312 100644 --- a/ndb/src/kernel/vm/al_test/arrayListTest.cpp +++ b/ndb/src/kernel/vm/al_test/arrayListTest.cpp @@ -16,11 +16,12 @@ +#include <ndb_global.hpp> +#include <assert.h> + #include <ArrayList.hpp> -#include <stdlib.h> #include <NdbOut.hpp> #include <NdbTick.h> -#include <assert.h> struct A_Listable_Object { Uint32 next; diff --git a/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp b/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp index 8b554d5bb41..01cc5ede5f7 100644 --- a/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp +++ b/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp @@ -16,12 +16,12 @@ +#include <ndb_global.h> +#include <assert.h> + #include <ArrayList.hpp> -#include <stdlib.h> #include <NdbOut.hpp> #include <NdbTick.h> -#include <assert.h> -#include <string.h> struct A_Poolable_Object { Uint32 next; diff --git a/ndb/src/kernel/vm/al_test/main.cpp b/ndb/src/kernel/vm/al_test/main.cpp index 42c36173b56..48f6d71f4cf 100644 --- a/ndb/src/kernel/vm/al_test/main.cpp +++ b/ndb/src/kernel/vm/al_test/main.cpp @@ -14,11 +14,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <assert.h> + #include <ArrayList.hpp> -#include <stdlib.h> #include <NdbOut.hpp> #include <NdbTick.h> -#include <assert.h> #include <NdbMain.h> #include "arrayListTest.cpp" diff --git a/ndb/src/kernel/vm/testCopy/rr.cpp b/ndb/src/kernel/vm/testCopy/rr.cpp index 2da8383f523..1e8305dfe4c 100644 --- a/ndb/src/kernel/vm/testCopy/rr.cpp +++ b/ndb/src/kernel/vm/testCopy/rr.cpp @@ -15,10 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include <sched.h> -#include <sys/types.h> -#include <unistd.h> -#include <stdio.h> int main(int argc, char * const argv[]){ diff --git a/ndb/src/kernel/vm/testCopy/testCopy.cpp b/ndb/src/kernel/vm/testCopy/testCopy.cpp index 1b4b24f5934..78a1dab2619 100644 --- a/ndb/src/kernel/vm/testCopy/testCopy.cpp +++ b/ndb/src/kernel/vm/testCopy/testCopy.cpp @@ -15,11 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <NdbOut.hpp> #include <NdbTick.h> -#include <ndb_types.h> -#include <string.h> -#include <stdlib.h> #ifdef __NDB_FORTE6 #define HAND diff --git a/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp b/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp index def8387e343..5ba59418223 100644 --- a/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp +++ b/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp @@ -14,10 +14,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <ndb_global.h> #include <NdbTick.h> #include <DataBuffer.hpp> -#include <stdlib.h> -#include <string.h> + +#undef test struct Buffer { Buffer(Uint32 size){ m_sz = size; buffer = new Uint32[m_sz]; m_len = 0;} diff --git a/ndb/src/kernel/vm/testLongSig/testLongSig.cpp b/ndb/src/kernel/vm/testLongSig/testLongSig.cpp index 6d421268a0a..7a1e6a3e93d 100644 --- a/ndb/src/kernel/vm/testLongSig/testLongSig.cpp +++ b/ndb/src/kernel/vm/testLongSig/testLongSig.cpp @@ -15,10 +15,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <assert.h> #include <editline/editline.h> #include <SignalSender.hpp> -#include <assert.h> -#include <stdlib.h> void print_help(){ diff --git a/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp b/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp index 20a5d5230fb..e16870edf11 100644 --- a/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp +++ b/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp @@ -14,12 +14,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <NdbTick.h> #include <TransporterDefinitions.hpp> #include <SimpleProperties.hpp> #include <LongSignal.hpp> -#include <stdlib.h> -#include <string.h> + +#undef test struct Buffer { Buffer(Uint32 size){ m_sz = size; buffer = new Uint32[m_sz]; m_len = 0;} diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp index 4c1355e8e46..fcdfe943fb1 100644 --- a/ndb/src/mgmapi/mgmapi.cpp +++ b/ndb/src/mgmapi/mgmapi.cpp @@ -14,17 +14,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include <NdbTCP.h> #include "mgmapi.h" #include "mgmapi_debug.h" #include <socket_io.h> -#include <stdlib.h> - -#include <string.h> -#include <NdbStdio.h> -#include <NdbString.h> -#include <errno.h> #include <NdbOut.hpp> #include <SocketServer.hpp> #include <Parser.hpp> diff --git a/ndb/src/mgmapi/test/keso.c b/ndb/src/mgmapi/test/keso.c index f4b192e3db8..8a9a8e88d66 100644 --- a/ndb/src/mgmapi/test/keso.c +++ b/ndb/src/mgmapi/test/keso.c @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include <mgmapi.h> #ifdef VM_TRACE @@ -22,9 +24,6 @@ #endif #include <NdbOut.hpp> -#include <NdbStdio.h> - -#include <stdlib.h> static int testConnect(NdbMgmHandle h, struct ndb_mgm_reply* reply); static int testDisconnect(NdbMgmHandle h, struct ndb_mgm_reply* reply); diff --git a/ndb/src/mgmapi/test/mgmSrvApi.cpp b/ndb/src/mgmapi/test/mgmSrvApi.cpp index e93c54ae5a7..4a8e38c9ba5 100644 --- a/ndb/src/mgmapi/test/mgmSrvApi.cpp +++ b/ndb/src/mgmapi/test/mgmSrvApi.cpp @@ -25,11 +25,9 @@ * Server API" document * *****************************************************/ +#include <ndb_global.h> #include "mgmapi.h" #include "mgmapi_commands.h" -#include <stdlib.h> -#include <string.h> -#include <stdio.h> #include <NdbMain.h> #include <NdbOut.hpp> diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 29d25ebf7d3..fba5fda32dd 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -14,13 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <errno.h> -#include <string.h> -#include <ctype.h> -#include <stdlib.h> -#include <limits.h> - -#include <ndb_version.h> +#include "CommandInterpreter.hpp" #include <mgmapi.h> #include <mgmapi_debug.h> @@ -34,7 +28,6 @@ #endif // HAVE_GLOBAL_REPLICATION #include "MgmtErrorReporter.hpp" -#include "CommandInterpreter.hpp" #include "CpcClient.hpp" #ifdef NDB_SOLARIS // XXX fix me diff --git a/ndb/src/mgmclient/CommandInterpreter.hpp b/ndb/src/mgmclient/CommandInterpreter.hpp index 9049ef39915..104da3ce254 100644 --- a/ndb/src/mgmclient/CommandInterpreter.hpp +++ b/ndb/src/mgmclient/CommandInterpreter.hpp @@ -22,9 +22,8 @@ // Author: Peter Lind //***************************************************************************** +#include <ndb_global.h> #include <NdbStdio.h> -#include <ndb_types.h> -#include <stdlib.h> #include <Vector.hpp> #include <editline/editline.h> diff --git a/ndb/src/mgmclient/CpcClient.cpp b/ndb/src/mgmclient/CpcClient.cpp index 24eab7194e9..74fa1a828ed 100644 --- a/ndb/src/mgmclient/CpcClient.cpp +++ b/ndb/src/mgmclient/CpcClient.cpp @@ -14,14 +14,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <ndb_types.h> +#include <ndb_global.h> #include <editline/editline.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> #include <netdb.h> -#include <errno.h> #include <NdbOut.hpp> #include <NdbTCP.h> diff --git a/ndb/src/mgmclient/main.cpp b/ndb/src/mgmclient/main.cpp index bbadaeb5206..2dcadf9369d 100644 --- a/ndb/src/mgmclient/main.cpp +++ b/ndb/src/mgmclient/main.cpp @@ -14,9 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdio.h> -#include <stdlib.h> -#include <sys/param.h> +#include <ndb_global.h> #include <NdbMain.h> #include <NdbHost.h> diff --git a/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp b/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp index 6b6dc9f1077..b8429c6b7d7 100644 --- a/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp +++ b/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp @@ -15,10 +15,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include "../CpcClient.hpp" #include <Vector.hpp> #include <assert.h> -#include <stdlib.h> SimpleCpcClient g_client("localhost", 1234); Vector<SimpleCpcClient::Process> g_procs; diff --git a/ndb/src/mgmsrv/CommandInterpreter.hpp b/ndb/src/mgmsrv/CommandInterpreter.hpp index e68aa7da084..2989f31bd36 100644 --- a/ndb/src/mgmsrv/CommandInterpreter.hpp +++ b/ndb/src/mgmsrv/CommandInterpreter.hpp @@ -21,9 +21,8 @@ // Author: Peter Lind //***************************************************************************** +#include <ndb_global.h> #include <NdbStdio.h> -#include <ndb_types.h> -#include <stdlib.h> #include <Vector.hpp> #include <editline/editline.h> #include <BaseString.hpp> diff --git a/ndb/src/mgmsrv/convertStrToInt.cpp b/ndb/src/mgmsrv/convertStrToInt.cpp index 82bdb8e4f2f..e5216047d10 100644 --- a/ndb/src/mgmsrv/convertStrToInt.cpp +++ b/ndb/src/mgmsrv/convertStrToInt.cpp @@ -14,9 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <errno.h> -#include <stdlib.h> -#include <string.h> +#include <ndb_global.h> bool convert(const char* s, int& val) { diff --git a/ndb/src/mgmsrv/mkconfig/mkconfig.cpp b/ndb/src/mgmsrv/mkconfig/mkconfig.cpp index 0e9397e43c0..c3f247bced6 100644 --- a/ndb/src/mgmsrv/mkconfig/mkconfig.cpp +++ b/ndb/src/mgmsrv/mkconfig/mkconfig.cpp @@ -14,15 +14,15 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <ndb_version.h> + #include <NdbMain.h> #include <Properties.hpp> -#include <stdlib.h> #include "InitConfigFileParser.hpp" -#include "Config.hpp" +#include <Config.hpp> #include <assert.h> -#include <NdbUnistd.h> -#include <ndb_version.h> void usage(const char * prg){ ndbout << "Usage " << prg << ": <Init config> <Binary file>" << endl; diff --git a/ndb/src/ndbapi/ClusterMgr.cpp b/ndb/src/ndbapi/ClusterMgr.cpp index 93fb0109669..744dec62881 100644 --- a/ndb/src/ndbapi/ClusterMgr.cpp +++ b/ndb/src/ndbapi/ClusterMgr.cpp @@ -14,6 +14,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <ndb_limits.h> +#include <ndb_version.h> + #include "TransporterFacade.hpp" #include "ClusterMgr.hpp" #include <IPCConfig.hpp> @@ -23,12 +27,9 @@ #include <NdbSleep.h> #include <NdbOut.hpp> #include <NdbTick.h> -#include <ndb_limits.h> -#include <stdio.h> #include <assert.h> -#include <ndb_version.h> #include <signaldata/NodeFailRep.hpp> #include <signaldata/NFCompleteRep.hpp> #include <signaldata/ApiRegSignalData.hpp> diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index 36fbc85a875..f6f2106f2aa 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -14,12 +14,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include "DictCache.hpp" #include "NdbDictionaryImpl.hpp" #include <NdbTick.h> #include <NdbCondition.h> #include <NdbSleep.h> -#include <stdlib.h> LocalDictCache::LocalDictCache(){ m_tableHash.createHashTable(); diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index d7930f32d72..c45c43b2638 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -25,10 +25,10 @@ Name: Ndb.cpp #include "NdbImpl.hpp" #include "NdbSchemaOp.hpp" #include "NdbSchemaCon.hpp" -#include "NdbOperation.hpp" -#include "NdbConnection.hpp" -#include "NdbEventOperation.hpp" -#include "NdbRecAttr.hpp" +#include <NdbOperation.hpp> +#include <NdbConnection.hpp> +#include <NdbEventOperation.hpp> +#include <NdbRecAttr.hpp> #include <md5_hash.hpp> #include <NdbSleep.h> #include <NdbOut.hpp> diff --git a/ndb/src/ndbapi/NdbConnectionScan.cpp b/ndb/src/ndbapi/NdbConnectionScan.cpp index 67f07d2a8c0..5810dd8942a 100644 --- a/ndb/src/ndbapi/NdbConnectionScan.cpp +++ b/ndb/src/ndbapi/NdbConnectionScan.cpp @@ -27,10 +27,13 @@ * Documentation: * Adjust: 2000-06-12 UABRONM First version. ****************************************************************************/ -#include "Ndb.hpp" -#include "NdbConnection.hpp" -#include "NdbOperation.hpp" -#include "NdbScanOperation.hpp" +#include <ndb_global.h> +#include <assert.h> + +#include <Ndb.hpp> +#include <NdbConnection.hpp> +#include <NdbOperation.hpp> +#include <NdbScanOperation.hpp> #include "NdbScanReceiver.hpp" #include "NdbApiSignal.hpp" #include "TransporterFacade.hpp" @@ -41,7 +44,6 @@ #include <signaldata/ScanTab.hpp> #include <NdbOut.hpp> -#include <assert.h> // time out for next scan result (-1 is infinite) // XXX should change default only if non-trivial interpreted program is used diff --git a/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/ndb/src/ndbapi/NdbEventOperationImpl.cpp index d167b8205a2..acc726e28c5 100644 --- a/ndb/src/ndbapi/NdbEventOperationImpl.cpp +++ b/ndb/src/ndbapi/NdbEventOperationImpl.cpp @@ -15,8 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdio.h> - +#include <ndb_global.h> +#include <kernel_types.h> #include "NdbDictionaryImpl.hpp" #include "API.hpp" @@ -24,21 +24,12 @@ #include <AttrType.hpp> #include "NdbApiSignal.hpp" #include "TransporterFacade.hpp" -#include <signaldata/GetTabInfo.hpp> -#include <signaldata/DictTabInfo.hpp> -#include <signaldata/CreateTable.hpp> -#include <signaldata/CreateIndx.hpp> #include <signaldata/CreateEvnt.hpp> #include <signaldata/SumaImpl.hpp> -#include <signaldata/DropTable.hpp> -#include <signaldata/DropIndx.hpp> -#include <signaldata/ListTables.hpp> #include <SimpleProperties.hpp> #include <Bitmask.hpp> #include <AttributeHeader.hpp> #include <AttributeList.hpp> -#include <ndb_types.h> -#include <kernel_types.h> #include <NdbError.hpp> #include <BaseString.hpp> #include <UtilBuffer.hpp> diff --git a/ndb/src/ndbapi/NdbOperationExec.cpp b/ndb/src/ndbapi/NdbOperationExec.cpp index 1b0ad68b1eb..c0ec1b0aeb9 100644 --- a/ndb/src/ndbapi/NdbOperationExec.cpp +++ b/ndb/src/ndbapi/NdbOperationExec.cpp @@ -25,11 +25,13 @@ Version: 1.2 Description: Documentation: ***************************************************************************/ -#include "NdbOperation.hpp" -#include "NdbConnection.hpp" +#include <assert.h> + +#include <NdbOperation.hpp> +#include <NdbConnection.hpp> #include "NdbApiSignal.hpp" -#include "Ndb.hpp" -#include "NdbRecAttr.hpp" +#include <Ndb.hpp> +#include <NdbRecAttr.hpp> #include "NdbUtil.hpp" #include "Interpreter.hpp" diff --git a/ndb/src/ndbapi/NdbRecAttr.cpp b/ndb/src/ndbapi/NdbRecAttr.cpp index 11f36fbd2c4..0f7baeac4f5 100644 --- a/ndb/src/ndbapi/NdbRecAttr.cpp +++ b/ndb/src/ndbapi/NdbRecAttr.cpp @@ -26,8 +26,8 @@ Description: Interface between TIS and NDB Documentation: Adjust: 971206 UABRONM First version ************************************************************************************************/ +#include <ndb_global.h> #include "NdbRecAttr.hpp" -#include <stdlib.h> #include "NdbDictionaryImpl.hpp" NdbRecAttr::NdbRecAttr() : diff --git a/ndb/src/ndbapi/NdbScanOperation.cpp b/ndb/src/ndbapi/NdbScanOperation.cpp index f753d2f6b34..0f2154edec3 100644 --- a/ndb/src/ndbapi/NdbScanOperation.cpp +++ b/ndb/src/ndbapi/NdbScanOperation.cpp @@ -26,6 +26,7 @@ * Adjust: 2002-04-01 UABMASD First version. ****************************************************************************/ +#include <ndb_global.h> #include <Ndb.hpp> #include <NdbScanOperation.hpp> #include <NdbConnection.hpp> @@ -36,8 +37,6 @@ #include <NdbString.h> #ifndef NDB_MACOSX #include <malloc.h> -#else -#include <stdlib.h> #endif NdbScanOperation::NdbScanOperation(Ndb* aNdb) : @@ -637,6 +636,24 @@ SetValueRecList::callSetValueFn(SetValueRec& aSetValueRec, NdbOperation& oper) } } +SetValueRec::~SetValueRec() +{ + if ((stype == SET_STRING_ATTR1) || + (stype == SET_INT32_ATTR1) || + (stype == SET_UINT32_ATTR1) || + (stype == SET_INT64_ATTR1) || + (stype == SET_UINT64_ATTR1) || + (stype == SET_FLOAT_ATTR1) || + (stype == SET_DOUBLE_ATTR1)) + free(anAttrName); + + if ((stype == SET_STRING_ATTR1) || + (stype == SET_STRING_ATTR2)) + free(stringStruct.aStringValue); + if (next) delete next; + next = 0; +} + int NdbScanOperation::equal_impl(const NdbColumnImpl* anAttrObject, const char* aValue, diff --git a/ndb/src/ndbapi/NdbUtil.hpp b/ndb/src/ndbapi/NdbUtil.hpp index eeee087d548..6a82af85987 100644 --- a/ndb/src/ndbapi/NdbUtil.hpp +++ b/ndb/src/ndbapi/NdbUtil.hpp @@ -29,8 +29,7 @@ Comment: #ifndef NdbUtil_H #define NdbUtil_H -#include <stdlib.h> -#include <ndb_types.h> +#include <ndb_global.h> #include "AttrType.hpp" class NdbApiSignal; diff --git a/ndb/src/ndbapi/ObjectMap.hpp b/ndb/src/ndbapi/ObjectMap.hpp index a2a8d00b48f..4abb54b5081 100644 --- a/ndb/src/ndbapi/ObjectMap.hpp +++ b/ndb/src/ndbapi/ObjectMap.hpp @@ -17,10 +17,8 @@ #ifndef NDB_OBJECT_ID_MAP_HPP #define NDB_OBJECT_ID_MAP_HPP -#include <ndb_types.h> +#include <ndb_global.h> //#include <NdbMutex.h> -#include <stdlib.h> -#include <string.h> #include <NdbOut.hpp> //#define DEBUG_OBJECTMAP diff --git a/ndb/src/ndbapi/TransporterFacade.cpp b/ndb/src/ndbapi/TransporterFacade.cpp index 746ab169b41..843eab133bb 100644 --- a/ndb/src/ndbapi/TransporterFacade.cpp +++ b/ndb/src/ndbapi/TransporterFacade.cpp @@ -14,8 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <ndb_limits.h> -#include "AttrType.hpp" +#include <AttrType.hpp> #include "TransporterFacade.hpp" #include "ClusterMgr.hpp" #include <IPCConfig.hpp> @@ -32,7 +33,6 @@ #include <NdbConfig.h> #include <ndb_version.h> #include <SignalLoggerManager.hpp> -#include <stdlib.h> #if !defined NDB_OSE && !defined NDB_SOFTOSE #include <signal.h> diff --git a/ndb/src/ndbapi/ndberror.c b/ndb/src/ndbapi/ndberror.c index 4e5281ccfcf..6e732272bcf 100644 --- a/ndb/src/ndbapi/ndberror.c +++ b/ndb/src/ndbapi/ndberror.c @@ -15,11 +15,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <ndberror.h> -#include <stdio.h> +#include <ndb_global.h> #include <stdarg.h> #include <assert.h> +#include <ndberror.h> + typedef struct ErrorBundle { int code; ndberror_classification classification; @@ -575,10 +576,10 @@ const char *ndberror_classification_message(ndberror_classification classificati return empty_string; } -int ndb_error_string(int err_no, char *str, size_t size) +int ndb_error_string(int err_no, char *str, unsigned int size) { ndberror_struct error; - size_t len; + unsigned int len; error.code = err_no; ndberror_update(&error); diff --git a/ndb/src/ndbapi/signal-sender/SignalSender.hpp b/ndb/src/ndbapi/signal-sender/SignalSender.hpp index fffe027dbdd..e4e6c1931d2 100644 --- a/ndb/src/ndbapi/signal-sender/SignalSender.hpp +++ b/ndb/src/ndbapi/signal-sender/SignalSender.hpp @@ -17,11 +17,11 @@ #ifndef SIGNAL_SENDER_HPP #define SIGNAL_SENDER_HPP +#include <ndb_global.h> #include <TransporterDefinitions.hpp> #include <TransporterFacade.hpp> #include <ClusterMgr.hpp> #include <Vector.hpp> -#include <stdio.h> struct SimpleSignal { public: diff --git a/ndb/src/newtonapi/dba_internal.hpp b/ndb/src/newtonapi/dba_internal.hpp index a021db40a7d..84ae7ba222b 100644 --- a/ndb/src/newtonapi/dba_internal.hpp +++ b/ndb/src/newtonapi/dba_internal.hpp @@ -17,17 +17,16 @@ #ifndef DBA_INTERNAL_HPP #define DBA_INTERNAL_HPP +#include <ndb_global.h> + extern "C" { #include "dba.h" } #include <NdbApi.hpp> #include <NdbMutex.h> -#include <string.h> #include <NdbOut.hpp> -#include <stdlib.h> - #ifndef INT_MAX #define INT_MAX 2147483647 #endif diff --git a/ndb/src/rep/RepMain.cpp b/ndb/src/rep/RepMain.cpp index e00f6c0040c..f454832bda8 100644 --- a/ndb/src/rep/RepMain.cpp +++ b/ndb/src/rep/RepMain.cpp @@ -14,8 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <assert.h> -#include <stdlib.h> #include <NdbApiSignal.hpp> #include <getarg.h> diff --git a/ndb/src/rep/Requestor.hpp b/ndb/src/rep/Requestor.hpp index ba753be60f2..735d2094bde 100644 --- a/ndb/src/rep/Requestor.hpp +++ b/ndb/src/rep/Requestor.hpp @@ -17,12 +17,13 @@ #ifndef REQUESTOR_HPP #define REQUESTOR_HPP +#include <ndb_global.h> + #include <TransporterDefinitions.hpp> #include <TransporterFacade.hpp> #include <ClusterMgr.hpp> #include <API.hpp> #include <Vector.hpp> -#include <stdio.h> #include <GrepError.hpp> #include <rep/storage/GCIContainer.hpp> diff --git a/ndb/src/rep/adapters/ExtNDB.hpp b/ndb/src/rep/adapters/ExtNDB.hpp index c69f94d9a7e..bcbf51393aa 100644 --- a/ndb/src/rep/adapters/ExtNDB.hpp +++ b/ndb/src/rep/adapters/ExtNDB.hpp @@ -17,12 +17,13 @@ #ifndef EXTNDB_HPP #define EXTNDB_HPP +#include <ndb_global.h> + #include <TransporterDefinitions.hpp> #include <TransporterFacade.hpp> #include <ClusterMgr.hpp> #include <API.hpp> #include <Vector.hpp> -#include <stdio.h> #include <signaldata/RepImpl.hpp> #include <signaldata/GrepImpl.hpp> diff --git a/ndb/src/rep/dbug_hack.cpp b/ndb/src/rep/dbug_hack.cpp index 364325b55ae..794852a3a23 100644 --- a/ndb/src/rep/dbug_hack.cpp +++ b/ndb/src/rep/dbug_hack.cpp @@ -25,6 +25,7 @@ int replogEnabled; /** * @todo This should be implemented using MySQLs dbug library */ +#if 0 extern "C" void DBUG_PRINT(const char * fmt, ...) @@ -40,6 +41,7 @@ DBUG_PRINT(const char * fmt, ...) va_end(ap); #endif } +#endif extern "C" void diff --git a/ndb/src/rep/repapi/repapi.cpp b/ndb/src/rep/repapi/repapi.cpp index 80274896004..d34ab098c9c 100644 --- a/ndb/src/rep/repapi/repapi.cpp +++ b/ndb/src/rep/repapi/repapi.cpp @@ -14,17 +14,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <NdbTCP.h> #include "repapi.h" //#include "mgmapi_debug.h" #include <socket_io.h> -#include <stdlib.h> - -#include <string.h> -#include <NdbStdio.h> -#include <NdbString.h> -#include <errno.h> #include <NdbOut.hpp> #include <SocketServer.hpp> #include <Parser.hpp> diff --git a/ndb/src/rep/state/Interval.cpp b/ndb/src/rep/state/Interval.cpp index 75697fa7548..8266f19c58d 100644 --- a/ndb/src/rep/state/Interval.cpp +++ b/ndb/src/rep/state/Interval.cpp @@ -16,6 +16,8 @@ #include "Interval.hpp" +#undef min +#undef max Uint32 max(Uint32 a, Uint32 b) { return a > b ? a : b; } Uint32 min(Uint32 a, Uint32 b) { return a < b ? a : b; } diff --git a/ndb/src/rep/storage/GCIBuffer.cpp b/ndb/src/rep/storage/GCIBuffer.cpp index 5049e47ea66..5073e62c550 100644 --- a/ndb/src/rep/storage/GCIBuffer.cpp +++ b/ndb/src/rep/storage/GCIBuffer.cpp @@ -14,8 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include "GCIBuffer.hpp" -#include <stdlib.h> #include <assert.h> /***************************************************************************** diff --git a/ndb/src/rep/storage/GCIBuffer.hpp b/ndb/src/rep/storage/GCIBuffer.hpp index 5a07b149f81..8a8473d1d49 100644 --- a/ndb/src/rep/storage/GCIBuffer.hpp +++ b/ndb/src/rep/storage/GCIBuffer.hpp @@ -18,7 +18,7 @@ #define GCI_BUFFER_HPP #include "GCIPage.hpp" -#include "Vector.hpp" +#include <Vector.hpp> #include <TransporterDefinitions.hpp> #include <signaldata/RepImpl.hpp> diff --git a/ndb/src/rep/storage/GCIContainer.hpp b/ndb/src/rep/storage/GCIContainer.hpp index bcea11aae0f..48cbc66bfbd 100644 --- a/ndb/src/rep/storage/GCIContainer.hpp +++ b/ndb/src/rep/storage/GCIContainer.hpp @@ -17,13 +17,12 @@ #ifndef GCI_CONTAINER_HPP #define GCI_CONTAINER_HPP -#undef swap - #include <Vector.hpp> #include "LogRecord.hpp" #include "GCIBuffer.hpp" +#undef swap #include <list> #include <iterator> diff --git a/ndb/src/rep/storage/LogRecord.hpp b/ndb/src/rep/storage/LogRecord.hpp index ba2632e23c7..a0bf3d52372 100644 --- a/ndb/src/rep/storage/LogRecord.hpp +++ b/ndb/src/rep/storage/LogRecord.hpp @@ -17,8 +17,7 @@ #ifndef LOG_RECORD_HPP #define LOG_RECORD_HPP -#include <ndb_types.h> -#include <stdlib.h> +#include <ndb_global.h> #include <portlib/NdbMem.h> /** |