summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ndb/include/kernel/signaldata/SignalData.hpp3
-rw-r--r--ndb/include/mgmcommon/MgmtErrorReporter.hpp2
-rw-r--r--ndb/include/ndb_global.h7
-rw-r--r--ndb/include/ndb_types.h2
-rw-r--r--ndb/include/ndb_version.h3
-rw-r--r--ndb/include/ndbapi/Ndb.hpp6
-rw-r--r--ndb/include/ndbapi/NdbConnection.hpp3
-rw-r--r--ndb/include/ndbapi/NdbEventOperation.hpp6
-rw-r--r--ndb/include/ndbapi/NdbOperation.hpp17
-rw-r--r--ndb/include/ndbapi/NdbRecAttr.hpp17
-rw-r--r--ndb/include/ndbapi/NdbReceiver.hpp2
-rw-r--r--ndb/include/ndbapi/NdbScanOperation.hpp19
-rw-r--r--ndb/include/ndbapi/NdbSchemaOp.hpp4
-rw-r--r--ndb/include/ndbapi/ndberror.h4
-rw-r--r--ndb/include/newtonapi/dba.h4
-rw-r--r--ndb/include/portlib/NdbStdio.h2
-rw-r--r--ndb/include/transporter/TransporterDefinitions.hpp2
-rw-r--r--ndb/include/util/BaseString.hpp4
-rw-r--r--ndb/include/util/Bitmask.hpp4
-rw-r--r--ndb/include/util/InputStream.hpp2
-rw-r--r--ndb/include/util/NdbAutoPtr.hpp2
-rw-r--r--ndb/include/util/OutputStream.hpp2
-rw-r--r--ndb/include/util/Properties.hpp5
-rw-r--r--ndb/include/util/UtilBuffer.hpp4
-rw-r--r--ndb/include/util/Vector.hpp3
-rw-r--r--ndb/include/util/uucode.h2
-rw-r--r--ndb/src/common/debugger/DebuggerNames.cpp6
-rw-r--r--ndb/src/common/debugger/SignalLoggerManager.cpp5
-rw-r--r--ndb/src/common/editline/editline_internal.h5
-rw-r--r--ndb/src/common/editline/editline_win32.c3
-rw-r--r--ndb/src/common/editline/test/testit.c6
-rw-r--r--ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp6
-rw-r--r--ndb/src/common/mgmcommon/ConfigRetriever.cpp10
-rw-r--r--ndb/src/common/mgmcommon/InitConfigFileParser.hpp3
-rw-r--r--ndb/src/common/mgmcommon/LocalConfig.hpp4
-rw-r--r--ndb/src/common/mgmcommon/NdbConfig.c3
-rw-r--r--ndb/src/common/mgmcommon/printConfig/printConfig.cpp3
-rw-r--r--ndb/src/common/portlib/memtest/memtest.c3
-rw-r--r--ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp10
-rw-r--r--ndb/src/common/portlib/mmstest/mmslist.cpp4
-rw-r--r--ndb/src/common/portlib/mmstest/mmstest.cpp4
-rw-r--r--ndb/src/common/portlib/test/NdbPortLibTest.cpp7
-rw-r--r--ndb/src/common/portlib/unix/NdbDaemon.c22
-rw-r--r--ndb/src/common/transporter/Packer.cpp4
-rw-r--r--ndb/src/common/transporter/SCI_Transporter.cpp9
-rw-r--r--ndb/src/common/transporter/SHM_Buffer.hpp6
-rw-r--r--ndb/src/common/transporter/SHM_Transporter.cpp5
-rw-r--r--ndb/src/common/transporter/SHM_Transporter.unix.cpp5
-rw-r--r--ndb/src/common/transporter/SHM_Transporter.win32.cpp4
-rw-r--r--ndb/src/common/transporter/SendBuffer.hpp3
-rw-r--r--ndb/src/common/transporter/TCP_Transporter.cpp6
-rw-r--r--ndb/src/common/transporter/TransporterRegistry.cpp6
-rw-r--r--ndb/src/common/transporter/basictest/basicTransporterTest.cpp5
-rw-r--r--ndb/src/common/transporter/buddy.cpp3
-rw-r--r--ndb/src/common/transporter/buddy.hpp3
-rw-r--r--ndb/src/common/transporter/failoverSCI/failoverSCI.cpp9
-rw-r--r--ndb/src/common/transporter/perftest/perfTransporterTest.cpp5
-rw-r--r--ndb/src/common/transporter/priotest/prioTransporterTest.cpp4
-rw-r--r--ndb/src/common/util/Base64.cpp3
-rw-r--r--ndb/src/common/util/BaseString.cpp6
-rw-r--r--ndb/src/common/util/File.cpp2
-rw-r--r--ndb/src/common/util/Parser.cpp6
-rw-r--r--ndb/src/common/util/Properties.cpp8
-rw-r--r--ndb/src/common/util/SimpleProperties.cpp3
-rw-r--r--ndb/src/common/util/SocketServer.cpp7
-rw-r--r--ndb/src/common/util/getarg.c4
-rw-r--r--ndb/src/common/util/new.cpp3
-rw-r--r--ndb/src/common/util/random.c10
-rw-r--r--ndb/src/common/util/strdup.c1
-rw-r--r--ndb/src/common/util/testProperties/testProperties.cpp3
-rw-r--r--ndb/src/common/util/testSimpleProperties/sp_test.cpp5
-rw-r--r--ndb/src/common/util/uucode.c3
-rw-r--r--ndb/src/common/util/version.c4
-rw-r--r--ndb/src/cw/cpcc-win32/C++/StdAfx.h5
-rw-r--r--ndb/src/cw/cpcd/Process.cpp6
-rw-r--r--ndb/src/cw/cpcd/common.hpp2
-rw-r--r--ndb/src/cw/test/socketclient/socketClientTest.cpp3
-rw-r--r--ndb/src/cw/util/ClientInterface.hpp4
-rw-r--r--ndb/src/kernel/blocks/backup/FsBuffer.hpp4
-rw-r--r--ndb/src/kernel/blocks/backup/read.cpp4
-rw-r--r--ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp7
-rw-r--r--ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp7
-rw-r--r--ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp7
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Filename.cpp6
-rw-r--r--ndb/src/kernel/error/ErrorReporter.hpp3
-rw-r--r--ndb/src/kernel/vm/Emulator.cpp3
-rw-r--r--ndb/src/kernel/vm/GlobalData.hpp4
-rw-r--r--ndb/src/kernel/vm/TransporterCallback.cpp3
-rw-r--r--ndb/src/kernel/vm/VMSignal.hpp7
-rw-r--r--ndb/src/kernel/vm/al_test/arrayListTest.cpp5
-rw-r--r--ndb/src/kernel/vm/al_test/arrayPoolTest.cpp6
-rw-r--r--ndb/src/kernel/vm/al_test/main.cpp5
-rw-r--r--ndb/src/kernel/vm/testCopy/rr.cpp5
-rw-r--r--ndb/src/kernel/vm/testCopy/testCopy.cpp4
-rw-r--r--ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp6
-rw-r--r--ndb/src/kernel/vm/testLongSig/testLongSig.cpp4
-rw-r--r--ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp5
-rw-r--r--ndb/src/mgmapi/mgmapi.cpp8
-rw-r--r--ndb/src/mgmapi/test/keso.c5
-rw-r--r--ndb/src/mgmapi/test/mgmSrvApi.cpp4
-rw-r--r--ndb/src/mgmclient/CommandInterpreter.cpp9
-rw-r--r--ndb/src/mgmclient/CommandInterpreter.hpp3
-rw-r--r--ndb/src/mgmclient/CpcClient.cpp6
-rw-r--r--ndb/src/mgmclient/main.cpp4
-rw-r--r--ndb/src/mgmclient/test_cpcd/test_cpcd.cpp2
-rw-r--r--ndb/src/mgmsrv/CommandInterpreter.hpp3
-rw-r--r--ndb/src/mgmsrv/convertStrToInt.cpp4
-rw-r--r--ndb/src/mgmsrv/mkconfig/mkconfig.cpp8
-rw-r--r--ndb/src/ndbapi/ClusterMgr.cpp7
-rw-r--r--ndb/src/ndbapi/DictCache.cpp2
-rw-r--r--ndb/src/ndbapi/Ndb.cpp8
-rw-r--r--ndb/src/ndbapi/NdbConnectionScan.cpp12
-rw-r--r--ndb/src/ndbapi/NdbEventOperationImpl.cpp13
-rw-r--r--ndb/src/ndbapi/NdbOperationExec.cpp10
-rw-r--r--ndb/src/ndbapi/NdbRecAttr.cpp2
-rw-r--r--ndb/src/ndbapi/NdbScanOperation.cpp21
-rw-r--r--ndb/src/ndbapi/NdbUtil.hpp3
-rw-r--r--ndb/src/ndbapi/ObjectMap.hpp4
-rw-r--r--ndb/src/ndbapi/TransporterFacade.cpp4
-rw-r--r--ndb/src/ndbapi/ndberror.c9
-rw-r--r--ndb/src/ndbapi/signal-sender/SignalSender.hpp2
-rw-r--r--ndb/src/newtonapi/dba_internal.hpp5
-rw-r--r--ndb/src/rep/RepMain.cpp2
-rw-r--r--ndb/src/rep/Requestor.hpp3
-rw-r--r--ndb/src/rep/adapters/ExtNDB.hpp3
-rw-r--r--ndb/src/rep/dbug_hack.cpp2
-rw-r--r--ndb/src/rep/repapi/repapi.cpp7
-rw-r--r--ndb/src/rep/state/Interval.cpp2
-rw-r--r--ndb/src/rep/storage/GCIBuffer.cpp2
-rw-r--r--ndb/src/rep/storage/GCIBuffer.hpp2
-rw-r--r--ndb/src/rep/storage/GCIContainer.hpp3
-rw-r--r--ndb/src/rep/storage/LogRecord.hpp3
-rw-r--r--ndb/test/include/NDBT_Table.hpp5
-rw-r--r--ndb/test/ndbapi/bank/bankCreator/bankCreator.cpp3
-rw-r--r--ndb/test/ndbapi/bank/bankMakeGL/bankMakeGL.cpp3
-rw-r--r--ndb/test/ndbapi/bank/bankSumAccounts/bankSumAccounts.cpp3
-rw-r--r--ndb/test/ndbapi/bank/bankTimer/bankTimer.cpp4
-rw-r--r--ndb/test/ndbapi/bank/bankTransactionMaker/bankTransactionMaker.cpp4
-rw-r--r--ndb/test/ndbapi/bank/bankValidateAllGLs/bankValidateAllGLs.cpp4
-rw-r--r--ndb/test/ndbapi/create_all_tabs/create_all_tabs.cpp2
-rw-r--r--ndb/test/ndbapi/create_tab/create_tab.cpp2
-rw-r--r--ndb/test/ndbapi/drop_all_tabs/drop_all_tabs.cpp2
-rw-r--r--ndb/test/ndbapi/flexTT/flexTT.cpp7
-rw-r--r--ndb/test/ndbapi/indexTest/index.cpp5
-rw-r--r--ndb/test/ndbapi/indexTest2/index2.cpp5
-rw-r--r--ndb/test/ndbapi/lmc-bench/async-src/generator/asyncGenerator.cpp3
-rw-r--r--ndb/test/ndbapi/lmc-bench/async-src/generator/mainAsyncGenerator.cpp5
-rw-r--r--ndb/test/ndbapi/lmc-bench/async-src/user/macros.h3
-rw-r--r--ndb/test/ndbapi/lmc-bench/async-src/user/ndb_error.hpp2
-rw-r--r--ndb/test/ndbapi/lmc-bench/async-src/user/userInterface.cpp5
-rw-r--r--ndb/test/ndbapi/lmc-bench/include/testDefinitions.h22
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.c3
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/generator/mainGenerator.c6
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.c4
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/populator/mainPopulate.c4
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/user/localDbPrepare.c2
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/user/macros.h3
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/user/ndb_error.hpp1
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/user/ndb_user_populate.cpp2
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/user/old/userInterface.c5
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/user/old/userTransaction.c3
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/user/userInterface.cpp4
-rw-r--r--ndb/test/ndbapi/lmc-bench/src/user/userTransaction.c3
-rw-r--r--ndb/test/ndbapi/ronja/benchronja/benchronja.cpp7
-rw-r--r--ndb/test/ndbapi/testBlobs/testBlobs.cpp8
-rw-r--r--ndb/test/ndbapi/testDataBuffers/testDataBuffers.cpp5
-rw-r--r--ndb/test/ndbapi/testOIBasic/testOIBasic.cpp5
-rw-r--r--ndb/test/ndbapi/vw_test/bcd.h3
-rw-r--r--ndb/test/ndbapi/vw_test/cdrserver.cpp12
-rw-r--r--ndb/test/ndbapi/vw_test/size.cpp2
-rw-r--r--ndb/test/newtonapi/basic_test/common.cpp4
-rw-r--r--ndb/test/newtonapi/basic_test/common.hpp3
-rw-r--r--ndb/test/newtonapi/basic_test/too_basic.cpp10
-rw-r--r--ndb/test/newtonapi/perf_test/perf.cpp10
-rw-r--r--ndb/test/run-test/main.cpp2
-rw-r--r--ndb/test/run-test/run-test.hpp2
-rw-r--r--ndb/test/src/NDBT_ResultRow.cpp5
-rw-r--r--ndb/test/src/NDBT_ReturnCodes.cpp6
-rw-r--r--ndb/test/tools/hugoCalculator/hugoCalculator.cpp4
-rw-r--r--ndb/test/tools/hugoFill/hugoFill.cpp2
-rw-r--r--ndb/test/tools/hugoLockRecords/hugoLockRecords.cpp4
-rw-r--r--ndb/test/tools/hugoPkDelete/hugoPkDel.cpp4
-rw-r--r--ndb/test/tools/hugoPkRead/hugoPkRead.cpp4
-rw-r--r--ndb/test/tools/hugoPkReadRecord/hugoPkReadRecord.cpp3
-rw-r--r--ndb/test/tools/hugoPkUpdate/hugoPkUpd.cpp4
-rw-r--r--ndb/test/tools/hugoScanRead/hugoScanRead.cpp4
-rw-r--r--ndb/test/tools/hugoScanUpdate/hugoScanUpd.cpp4
-rw-r--r--ndb/tools/copy_tab/copy_tab.cpp2
-rw-r--r--ndb/tools/create_index/create_index.cpp2
-rw-r--r--ndb/tools/delete_all/delete_all.cpp2
-rw-r--r--ndb/tools/drop_index/drop_index.cpp2
-rw-r--r--ndb/tools/drop_tab/drop_tab.cpp2
-rw-r--r--ndb/tools/select_all/select_all.cpp4
-rw-r--r--ndb/tools/select_count/select_count.cpp4
-rw-r--r--ndb/tools/transproxy/transproxy.cpp8
-rw-r--r--ndb/tools/verify_index/verify_index.cpp3
196 files changed, 372 insertions, 585 deletions
diff --git a/ndb/include/kernel/signaldata/SignalData.hpp b/ndb/include/kernel/signaldata/SignalData.hpp
index 071bd9b9104..8237d7ffad0 100644
--- a/ndb/include/kernel/signaldata/SignalData.hpp
+++ b/ndb/include/kernel/signaldata/SignalData.hpp
@@ -17,11 +17,10 @@
#ifndef SIGNAL_DATA_H
#define SIGNAL_DATA_H
+#include <ndb_global.h>
#include <ndb_limits.h>
#include <kernel_types.h>
-#include <NdbStdio.h>
#include <NdbConstant.hpp>
-#include <stdlib.h>
#ifndef NDB_ASSERT
#ifdef VM_TRACE
diff --git a/ndb/include/mgmcommon/MgmtErrorReporter.hpp b/ndb/include/mgmcommon/MgmtErrorReporter.hpp
index acc44b14d8e..925d9e6407a 100644
--- a/ndb/include/mgmcommon/MgmtErrorReporter.hpp
+++ b/ndb/include/mgmcommon/MgmtErrorReporter.hpp
@@ -22,8 +22,8 @@
//******************************************************************************
+#include <ndb_global.h> // exit
#include <NdbOut.hpp>
-#include <stdlib.h> // exit
#define REPORT_WARNING(message) \
ndbout << "WARNING: " << message << endl
diff --git a/ndb/include/ndb_global.h b/ndb/include/ndb_global.h
index eb52ea4268f..a1aa292a2f6 100644
--- a/ndb/include/ndb_global.h
+++ b/ndb/include/ndb_global.h
@@ -1,3 +1,6 @@
#include <my_global.h>
-/*#include <my_config.h>*/
-
+#include <m_string.h>
+#include <m_ctype.h>
+#include <ndb_types.h>
+#include <ctype.h>
+#include <sys/param.h>
diff --git a/ndb/include/ndb_types.h b/ndb/include/ndb_types.h
index 40d73b0f230..697d5f73473 100644
--- a/ndb/include/ndb_types.h
+++ b/ndb/include/ndb_types.h
@@ -21,8 +21,10 @@
#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;
diff --git a/ndb/include/ndb_version.h b/ndb/include/ndb_version.h
index 958dd339f74..7a23cec1a47 100644
--- a/ndb/include/ndb_version.h
+++ b/ndb/include/ndb_version.h
@@ -17,9 +17,6 @@
#ifndef NDB_VERSION_H
#define NDB_VERSION_H
-#include <stdio.h>
-#include <string.h>
-
#include <version.h>
#define MAKE_VERSION(A,B,C) (((A) << 16) | ((B) << 8) | ((C) << 0))
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index 59bdd212919..fd6e827ceb4 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -860,9 +860,9 @@
#include <ndb_types.h>
#include <ndbapi_limits.h>
-#include "AttrType.hpp"
+#include <AttrType.hpp>
#include <NdbError.hpp>
-#include "NdbDictionary.hpp"
+#include <NdbDictionary.hpp>
class NdbObjectIdMap;
class NdbOperation;
@@ -1673,7 +1673,7 @@ private:
*/
struct StartTransactionNodeSelectionData {
StartTransactionNodeSelectionData():
- fragment2PrimaryNodeMap(NULL) {};
+ fragment2PrimaryNodeMap(0) {};
Uint32 kValue;
Uint32 hashValueMask;
Uint32 hashpointerValue;
diff --git a/ndb/include/ndbapi/NdbConnection.hpp b/ndb/include/ndbapi/NdbConnection.hpp
index a1532bb2f0e..c775dd5e33d 100644
--- a/ndb/include/ndbapi/NdbConnection.hpp
+++ b/ndb/include/ndbapi/NdbConnection.hpp
@@ -18,9 +18,8 @@
#define NdbConnection_H
#include <ndb_types.h>
-#include "AttrType.hpp"
+#include <AttrType.hpp>
#include <NdbError.hpp>
-#include <stdlib.h>
class NdbConnection;
class NdbOperation;
diff --git a/ndb/include/ndbapi/NdbEventOperation.hpp b/ndb/include/ndbapi/NdbEventOperation.hpp
index 911b00b02c4..056e9a58c74 100644
--- a/ndb/include/ndbapi/NdbEventOperation.hpp
+++ b/ndb/include/ndbapi/NdbEventOperation.hpp
@@ -157,8 +157,8 @@ public:
* the attribute, or a NULL pointer
* (indicating error).
*/
- NdbRecAttr *getValue(const char *anAttrName, char *aValue = NULL);
- NdbRecAttr *getPreValue(const char *anAttrName, char *aValue = NULL);
+ NdbRecAttr *getValue(const char *anAttrName, char *aValue = 0);
+ NdbRecAttr *getPreValue(const char *anAttrName, char *aValue = 0);
/**
* Retrieves event resultset if available, inserted into the NdbRecAttrs
@@ -172,7 +172,7 @@ public:
* overflow and *pOverRun will indicate the number of events that have
* overwritten.
*/
- int next(int *pOverRun=NULL);
+ int next(int *pOverRun=0);
/**
* In the current implementation a nodefailiure may cause loss of events,
diff --git a/ndb/include/ndbapi/NdbOperation.hpp b/ndb/include/ndbapi/NdbOperation.hpp
index 4f5f4597937..3c515fe84ef 100644
--- a/ndb/include/ndbapi/NdbOperation.hpp
+++ b/ndb/include/ndbapi/NdbOperation.hpp
@@ -17,14 +17,11 @@
#ifndef NdbOperation_H
#define NdbOperation_H
-#include <stdlib.h>
-#include <assert.h>
-
#include <ndb_types.h>
-#include "AttrType.hpp"
-#include "NdbError.hpp"
-#include "NdbReceiver.hpp"
-#include <stdlib.h>
+
+#include <AttrType.hpp>
+#include <NdbError.hpp>
+#include <NdbReceiver.hpp>
class Ndb;
class NdbApiSignal;
@@ -480,8 +477,8 @@ public:
* the attribute, or a NULL pointer
* (indicating error).
*/
- NdbRecAttr* getValue(const char* anAttrName, char* aValue = NULL);
- NdbRecAttr* getValue(Uint32 anAttrId, char* aValue = NULL);
+ NdbRecAttr* getValue(const char* anAttrName, char* aValue = 0);
+ NdbRecAttr* getValue(Uint32 anAttrId, char* aValue = 0);
/**
* Define an attribute to set or update in query.
@@ -925,7 +922,7 @@ protected:
virtual int equal_impl(const NdbColumnImpl* anAttrObject,
const char* aValue,
Uint32 len);
- NdbRecAttr* getValue(const NdbColumnImpl* anAttrObject, char* aValue = NULL);
+ NdbRecAttr* getValue(const NdbColumnImpl* anAttrObject, char* aValue = 0);
int setValue(const NdbColumnImpl* anAttrObject, const char* aValue, Uint32 len);
int incValue(const NdbColumnImpl* anAttrObject, Uint32 aValue);
int incValue(const NdbColumnImpl* anAttrObject, Uint64 aValue);
diff --git a/ndb/include/ndbapi/NdbRecAttr.hpp b/ndb/include/ndbapi/NdbRecAttr.hpp
index a5595096bf6..7eeff88671d 100644
--- a/ndb/include/ndbapi/NdbRecAttr.hpp
+++ b/ndb/include/ndbapi/NdbRecAttr.hpp
@@ -17,9 +17,6 @@
#ifndef NdbRecAttr_H
#define NdbRecAttr_H
-#include <stdlib.h>
-
-#include <ndb_types.h>
#include <NdbDictionary.hpp>
#include "AttrType.hpp"
@@ -427,9 +424,9 @@ inline
void
NdbRecAttr::release()
{
- if (theStorageX != NULL) {
+ if (theStorageX != 0) {
delete [] theStorageX;
- theStorageX = NULL;
+ theStorageX = 0;
}
}
@@ -437,10 +434,10 @@ inline
void
NdbRecAttr::init()
{
- theStorageX = NULL;
- theValue = NULL;
- theRef = NULL;
- theNext = NULL;
+ theStorageX = 0;
+ theValue = 0;
+ theRef = 0;
+ theNext = 0;
theAttrId = 0xFFFF;
theNULLind = -1;
}
@@ -470,7 +467,7 @@ inline
bool
NdbRecAttr::copyoutRequired() const
{
- return theRef != theValue && theValue != NULL;
+ return theRef != theValue && theValue != 0;
}
inline
diff --git a/ndb/include/ndbapi/NdbReceiver.hpp b/ndb/include/ndbapi/NdbReceiver.hpp
index 952803f8e70..bc11207a112 100644
--- a/ndb/include/ndbapi/NdbReceiver.hpp
+++ b/ndb/include/ndbapi/NdbReceiver.hpp
@@ -18,7 +18,7 @@
#define NdbReceiver_H
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL // Not part of public interface
-#include <stdlib.h>
+#include <ndb_types.h>
class Ndb;
class NdbReceiver
diff --git a/ndb/include/ndbapi/NdbScanOperation.hpp b/ndb/include/ndbapi/NdbScanOperation.hpp
index e041c79d96f..f83669fb616 100644
--- a/ndb/include/ndbapi/NdbScanOperation.hpp
+++ b/ndb/include/ndbapi/NdbScanOperation.hpp
@@ -172,25 +172,6 @@ SetValueRec::SetValueRec() :
{
}
-inline
-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;
-}
-
class SetValueRecList {
public:
SetValueRecList();
diff --git a/ndb/include/ndbapi/NdbSchemaOp.hpp b/ndb/include/ndbapi/NdbSchemaOp.hpp
index 90837bbc66b..c3a3827a6b4 100644
--- a/ndb/include/ndbapi/NdbSchemaOp.hpp
+++ b/ndb/include/ndbapi/NdbSchemaOp.hpp
@@ -18,11 +18,9 @@
#define NdbSchemaOp_H
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
-#include <ndb_types.h>
+#include "NdbDictionary.hpp"
#include "AttrType.hpp"
#include "NdbSchemaCon.hpp"
-#include <stdlib.h>
-#include "NdbDictionary.hpp"
class NdbApiSignal;
class Ndb;
diff --git a/ndb/include/ndbapi/ndberror.h b/ndb/include/ndbapi/ndberror.h
index 3d950ddaa8d..5c2d85b82a6 100644
--- a/ndb/include/ndbapi/ndberror.h
+++ b/ndb/include/ndbapi/ndberror.h
@@ -17,8 +17,6 @@
#ifndef NDBERROR_H
#define NDBERROR_H
-#include <stdlib.h>
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -91,7 +89,7 @@ typedef ndberror_classification_enum ndberror_classification;
const char *ndberror_status_message(ndberror_status);
const char *ndberror_classification_message(ndberror_classification);
void ndberror_update(ndberror_struct *);
-int ndb_error_string(int err_no, char *str, size_t size);
+int ndb_error_string(int err_no, char *str, unsigned int size);
#ifdef __cplusplus
}
diff --git a/ndb/include/newtonapi/dba.h b/ndb/include/newtonapi/dba.h
index eb5b3f9b5c2..4cfc0ec8eb9 100644
--- a/ndb/include/newtonapi/dba.h
+++ b/ndb/include/newtonapi/dba.h
@@ -102,11 +102,9 @@
/* --- Include files ---- */
+#include <ndb_global.h>
#include <defs/pcn_types.h>
-#include <stdio.h>
-
-
/* --- Types and definitions --- */
/**
diff --git a/ndb/include/portlib/NdbStdio.h b/ndb/include/portlib/NdbStdio.h
index 163b7eeef6f..2b01e4d4dc8 100644
--- a/ndb/include/portlib/NdbStdio.h
+++ b/ndb/include/portlib/NdbStdio.h
@@ -26,7 +26,7 @@
#include <outfmt.h>
#endif
-#include <stdio.h>
+#include <ndb_global.h>
#ifdef NDB_WIN32
#define snprintf _snprintf
diff --git a/ndb/include/transporter/TransporterDefinitions.hpp b/ndb/include/transporter/TransporterDefinitions.hpp
index 5bbf7c79491..cb859e310db 100644
--- a/ndb/include/transporter/TransporterDefinitions.hpp
+++ b/ndb/include/transporter/TransporterDefinitions.hpp
@@ -17,8 +17,8 @@
#ifndef TransporterDefinitions_H
#define TransporterDefinitions_H
+#include <ndb_global.h>
#include <kernel_types.h>
-#include <string.h>
#include <NdbOut.hpp>
/**
diff --git a/ndb/include/util/BaseString.hpp b/ndb/include/util/BaseString.hpp
index a88bd97ffc5..75a1c291594 100644
--- a/ndb/include/util/BaseString.hpp
+++ b/ndb/include/util/BaseString.hpp
@@ -17,9 +17,7 @@
#ifndef __UTIL_BASESTRING_HPP_INCLUDED__
#define __UTIL_BASESTRING_HPP_INCLUDED__
-#include <ctype.h>
-#include <stdlib.h>
-
+#include <ndb_global.h>
#include <Vector.hpp>
/**
diff --git a/ndb/include/util/Bitmask.hpp b/ndb/include/util/Bitmask.hpp
index 1f95d62bcb6..7a7d140ffe8 100644
--- a/ndb/include/util/Bitmask.hpp
+++ b/ndb/include/util/Bitmask.hpp
@@ -17,12 +17,10 @@
#ifndef NDB_BITMASK_H
#define NDB_BITMASK_H
-#include <ndb_types.h>
+#include <ndb_global.h>
#include <NdbConstant.hpp>
#ifndef NDB_ASSERT
-#include <stdio.h>
-#include <stdlib.h>
#define NDB_ASSERT(x, s) \
do { if (!(x)) { printf("%s\n", s); abort(); } } while (0)
#endif
diff --git a/ndb/include/util/InputStream.hpp b/ndb/include/util/InputStream.hpp
index 6b4cf262db4..b2a56b1e433 100644
--- a/ndb/include/util/InputStream.hpp
+++ b/ndb/include/util/InputStream.hpp
@@ -17,7 +17,7 @@
#ifndef INPUT_STREAM_HPP
#define INPUT_STREAM_HPP
-#include <stdio.h>
+#include <ndb_global.h>
#include <NdbTCP.h>
/**
diff --git a/ndb/include/util/NdbAutoPtr.hpp b/ndb/include/util/NdbAutoPtr.hpp
index 2078714d98d..c01650ffc7e 100644
--- a/ndb/include/util/NdbAutoPtr.hpp
+++ b/ndb/include/util/NdbAutoPtr.hpp
@@ -17,7 +17,7 @@
#ifndef __NDB_AUTO_PTR_HPP
#define __NDB_AUTO_PTR_HPP
-#include <stdlib.h>
+#include <ndb_global.h>
template<typename T>
class NdbAutoPtr {
diff --git a/ndb/include/util/OutputStream.hpp b/ndb/include/util/OutputStream.hpp
index 9d33ead7eb9..c7e009d4537 100644
--- a/ndb/include/util/OutputStream.hpp
+++ b/ndb/include/util/OutputStream.hpp
@@ -17,7 +17,7 @@
#ifndef OUTPUT_STREAM_HPP
#define OUTPUT_STREAM_HPP
-#include <stdio.h>
+#include <ndb_global.h>
#include <NdbTCP.h>
/**
diff --git a/ndb/include/util/Properties.hpp b/ndb/include/util/Properties.hpp
index dbdc5f2b480..ff5d1338c79 100644
--- a/ndb/include/util/Properties.hpp
+++ b/ndb/include/util/Properties.hpp
@@ -17,10 +17,7 @@
#ifndef PROPERTIES_HPP
#define PROPERTIES_HPP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ndb_types.h>
+#include <ndb_global.h>
#include <BaseString.hpp>
#include <UtilBuffer.hpp>
diff --git a/ndb/include/util/UtilBuffer.hpp b/ndb/include/util/UtilBuffer.hpp
index 97821ee3f9b..b357fa0fdf2 100644
--- a/ndb/include/util/UtilBuffer.hpp
+++ b/ndb/include/util/UtilBuffer.hpp
@@ -17,9 +17,7 @@
#ifndef __BUFFER_HPP_INCLUDED__
#define __BUFFER_HPP_INCLUDED__
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
+#include <ndb_global.h>
/* This class represents a buffer of binary data, where you can append
* data at the end, and later read the entire bunch.
diff --git a/ndb/include/util/Vector.hpp b/ndb/include/util/Vector.hpp
index a717dfecd7e..f60817dab67 100644
--- a/ndb/include/util/Vector.hpp
+++ b/ndb/include/util/Vector.hpp
@@ -17,9 +17,8 @@
#ifndef NDB_VECTOR_HPP
#define NDB_VECTOR_HPP
-#include <stdlib.h>
+#include <ndb_global.h>
#include <NdbMutex.h>
-#include <string.h>
template<class T>
struct Vector {
diff --git a/ndb/include/util/uucode.h b/ndb/include/util/uucode.h
index 138a79fa3ae..f5569d033a5 100644
--- a/ndb/include/util/uucode.h
+++ b/ndb/include/util/uucode.h
@@ -17,7 +17,7 @@
#ifndef UUCODE_H
#define UUCODE_H
-#include <stdio.h>
+#include <ndb_global.h>
#ifdef __cplusplus
extern "C" {
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>
/**
diff --git a/ndb/test/include/NDBT_Table.hpp b/ndb/test/include/NDBT_Table.hpp
index a4482fa8084..597cd0d55d6 100644
--- a/ndb/test/include/NDBT_Table.hpp
+++ b/ndb/test/include/NDBT_Table.hpp
@@ -17,11 +17,12 @@
#ifndef NDBT_TABLE_HPP
#define NDBT_TABLE_HPP
+#include <ndb_global.h>
+#include <assert.h>
+
#include <NdbApi.hpp>
#include <NdbOut.hpp>
-#include <string.h>
-
class NDBT_Attribute : public NdbDictionary::Column {
friend class NdbOut& operator <<(class NdbOut&, const NDBT_Attribute &);
public:
diff --git a/ndb/test/ndbapi/bank/bankCreator/bankCreator.cpp b/ndb/test/ndbapi/bank/bankCreator/bankCreator.cpp
index ee724236855..d84818baf24 100644
--- a/ndb/test/ndbapi/bank/bankCreator/bankCreator.cpp
+++ b/ndb/test/ndbapi/bank/bankCreator/bankCreator.cpp
@@ -15,8 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <NdbStdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/bank/bankMakeGL/bankMakeGL.cpp b/ndb/test/ndbapi/bank/bankMakeGL/bankMakeGL.cpp
index 0b6fc9c1f97..55e9081a598 100644
--- a/ndb/test/ndbapi/bank/bankMakeGL/bankMakeGL.cpp
+++ b/ndb/test/ndbapi/bank/bankMakeGL/bankMakeGL.cpp
@@ -15,8 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <NdbStdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/bank/bankSumAccounts/bankSumAccounts.cpp b/ndb/test/ndbapi/bank/bankSumAccounts/bankSumAccounts.cpp
index 7071de9f63e..ab3e862e8d2 100644
--- a/ndb/test/ndbapi/bank/bankSumAccounts/bankSumAccounts.cpp
+++ b/ndb/test/ndbapi/bank/bankSumAccounts/bankSumAccounts.cpp
@@ -15,8 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <NdbStdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/bank/bankTimer/bankTimer.cpp b/ndb/test/ndbapi/bank/bankTimer/bankTimer.cpp
index cfb2c93e4ad..ba8de9e4af1 100644
--- a/ndb/test/ndbapi/bank/bankTimer/bankTimer.cpp
+++ b/ndb/test/ndbapi/bank/bankTimer/bankTimer.cpp
@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <NdbStdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/bank/bankTransactionMaker/bankTransactionMaker.cpp b/ndb/test/ndbapi/bank/bankTransactionMaker/bankTransactionMaker.cpp
index 155a35998bb..0c7d5d72473 100644
--- a/ndb/test/ndbapi/bank/bankTransactionMaker/bankTransactionMaker.cpp
+++ b/ndb/test/ndbapi/bank/bankTransactionMaker/bankTransactionMaker.cpp
@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <NdbStdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/bank/bankValidateAllGLs/bankValidateAllGLs.cpp b/ndb/test/ndbapi/bank/bankValidateAllGLs/bankValidateAllGLs.cpp
index cc8e2792cbf..13136755de8 100644
--- a/ndb/test/ndbapi/bank/bankValidateAllGLs/bankValidateAllGLs.cpp
+++ b/ndb/test/ndbapi/bank/bankValidateAllGLs/bankValidateAllGLs.cpp
@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <NdbStdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/create_all_tabs/create_all_tabs.cpp b/ndb/test/ndbapi/create_all_tabs/create_all_tabs.cpp
index eaa99e8a79d..55d04888144 100644
--- a/ndb/test/ndbapi/create_all_tabs/create_all_tabs.cpp
+++ b/ndb/test/ndbapi/create_all_tabs/create_all_tabs.cpp
@@ -14,7 +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 <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/create_tab/create_tab.cpp b/ndb/test/ndbapi/create_tab/create_tab.cpp
index 2f2911b4ef4..8bb1e7a9572 100644
--- a/ndb/test/ndbapi/create_tab/create_tab.cpp
+++ b/ndb/test/ndbapi/create_tab/create_tab.cpp
@@ -14,7 +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 <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/drop_all_tabs/drop_all_tabs.cpp b/ndb/test/ndbapi/drop_all_tabs/drop_all_tabs.cpp
index 8e67493c003..59c57396acd 100644
--- a/ndb/test/ndbapi/drop_all_tabs/drop_all_tabs.cpp
+++ b/ndb/test/ndbapi/drop_all_tabs/drop_all_tabs.cpp
@@ -14,7 +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 <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/flexTT/flexTT.cpp b/ndb/test/ndbapi/flexTT/flexTT.cpp
index 1705f20b706..c45cbd95762 100644
--- a/ndb/test/ndbapi/flexTT/flexTT.cpp
+++ b/ndb/test/ndbapi/flexTT/flexTT.cpp
@@ -15,7 +15,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include "NdbApi.hpp"
+#include <ndb_global.h>
+
+#include <NdbApi.hpp>
#include <NdbMain.h>
#include <md5_hash.hpp>
@@ -24,9 +26,6 @@
#include <NdbTick.h>
#include <NdbOut.hpp>
#include <NdbTimer.hpp>
-#include <string.h>
-#include <NdbStdio.h>
-#include <stdlib.h>
#include <NdbTest.hpp>
#include <NDBT_Error.hpp>
diff --git a/ndb/test/ndbapi/indexTest/index.cpp b/ndb/test/ndbapi/indexTest/index.cpp
index d0eb490e1a0..508186de529 100644
--- a/ndb/test/ndbapi/indexTest/index.cpp
+++ b/ndb/test/ndbapi/indexTest/index.cpp
@@ -37,9 +37,8 @@
1 - Invalid arguments
* *************************************************** */
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbApi.hpp>
#include <NdbOut.hpp>
#include <NdbTick.h>
diff --git a/ndb/test/ndbapi/indexTest2/index2.cpp b/ndb/test/ndbapi/indexTest2/index2.cpp
index 5a3674f0bbf..e49113d2f1b 100644
--- a/ndb/test/ndbapi/indexTest2/index2.cpp
+++ b/ndb/test/ndbapi/indexTest2/index2.cpp
@@ -37,9 +37,8 @@
1 - Invalid arguments
* *************************************************** */
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbApi.hpp>
#include <NdbOut.hpp>
#include <NdbTick.h>
diff --git a/ndb/test/ndbapi/lmc-bench/async-src/generator/asyncGenerator.cpp b/ndb/test/ndbapi/lmc-bench/async-src/generator/asyncGenerator.cpp
index 25eb1830de9..84a93414712 100644
--- a/ndb/test/ndbapi/lmc-bench/async-src/generator/asyncGenerator.cpp
+++ b/ndb/test/ndbapi/lmc-bench/async-src/generator/asyncGenerator.cpp
@@ -18,8 +18,7 @@
* I N C L U D E D F I L E S *
***************************************************************/
-#include <stdio.h>
-#include <string.h>
+#include <ndb_global.h>
#include "dbGenerator.h"
#include <NdbApi.hpp>
diff --git a/ndb/test/ndbapi/lmc-bench/async-src/generator/mainAsyncGenerator.cpp b/ndb/test/ndbapi/lmc-bench/async-src/generator/mainAsyncGenerator.cpp
index d7506c9dd2c..f613c66d07b 100644
--- a/ndb/test/ndbapi/lmc-bench/async-src/generator/mainAsyncGenerator.cpp
+++ b/ndb/test/ndbapi/lmc-bench/async-src/generator/mainAsyncGenerator.cpp
@@ -14,10 +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 <string.h>
-#include <NdbUnistd.h>
+#include <ndb_global.h>
#include <NdbHost.h>
#include <NdbSleep.h>
diff --git a/ndb/test/ndbapi/lmc-bench/async-src/user/macros.h b/ndb/test/ndbapi/lmc-bench/async-src/user/macros.h
index c049cdbad33..22b7f564490 100644
--- a/ndb/test/ndbapi/lmc-bench/async-src/user/macros.h
+++ b/ndb/test/ndbapi/lmc-bench/async-src/user/macros.h
@@ -17,8 +17,7 @@
#ifndef MACROS_H
#define MACROS_H
-#include <stdlib.h>
-#include <stdio.h>
+#include <ndb_global.h>
#include <NdbOut.hpp>
#define ERROR(x) {ndbout_c((x));}
diff --git a/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_error.hpp b/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_error.hpp
index 91a061c7cf4..9e6c5e55e73 100644
--- a/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_error.hpp
+++ b/ndb/test/ndbapi/lmc-bench/async-src/user/ndb_error.hpp
@@ -17,7 +17,7 @@
#ifndef NDB_ERROR_H
#define NDB_ERROR_H
-#include <stdio.h>
+#include <ndb_global.h>
#include <NdbOut.hpp>
#include "userInterface.h"
#include <NdbError.hpp>
diff --git a/ndb/test/ndbapi/lmc-bench/async-src/user/userInterface.cpp b/ndb/test/ndbapi/lmc-bench/async-src/user/userInterface.cpp
index ece82628ba7..fdbc229cc98 100644
--- a/ndb/test/ndbapi/lmc-bench/async-src/user/userInterface.cpp
+++ b/ndb/test/ndbapi/lmc-bench/async-src/user/userInterface.cpp
@@ -18,9 +18,7 @@
* I N C L U D E D F I L E S *
***************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
+#include <ndb_global.h>
#include <time.h>
#include "ndb_schema.hpp"
@@ -31,7 +29,6 @@
#include <NdbTick.h>
#include <NdbApi.hpp>
#include <NdbOut.hpp>
-#include <NdbStdio.h>
/***************************************************************
* L O C A L C O N S T A N T S *
diff --git a/ndb/test/ndbapi/lmc-bench/include/testDefinitions.h b/ndb/test/ndbapi/lmc-bench/include/testDefinitions.h
index c6ad11016b2..2f4aeb30975 100644
--- a/ndb/test/ndbapi/lmc-bench/include/testDefinitions.h
+++ b/ndb/test/ndbapi/lmc-bench/include/testDefinitions.h
@@ -23,12 +23,6 @@
#include <ndb_types.h>
-/***************************************************************
-* M A C R O S *
-***************************************************************/
-
-typedef Uint32 uint32;
-
/***************************************************************/
/* C O N S T A N T S */
/***************************************************************/
@@ -62,14 +56,14 @@ typedef char GroupName[GROUP_NAME_LENGTH];
typedef char ChangedBy[CHANGED_BY_LENGTH];
typedef char ChangedTime[CHANGED_TIME_LENGTH];
typedef char SessionDetails[SESSION_DETAILS_LENGTH];
-typedef uint32 ServerId;
-typedef uint32 ServerBit;
-typedef uint32 GroupId;
-typedef uint32 Location;
-typedef uint32 Permission;
-
-typedef uint32 Counter;
-typedef uint32 ActiveSessions;
+typedef Uint32 ServerId;
+typedef Uint32 ServerBit;
+typedef Uint32 GroupId;
+typedef Uint32 Location;
+typedef Uint32 Permission;
+
+typedef Uint32 Counter;
+typedef Uint32 ActiveSessions;
typedef unsigned int BranchExecuted;
typedef unsigned int DoRollback;
diff --git a/ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.c b/ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.c
index eedcd914d85..7484c7647f5 100644
--- a/ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.c
+++ b/ndb/test/ndbapi/lmc-bench/src/generator/dbGenerator.c
@@ -18,8 +18,7 @@
* I N C L U D E D F I L E S *
***************************************************************/
-#include <stdio.h>
-#include <string.h>
+#include <ndb_global.h>
#include "dbGenerator.h"
/***************************************************************
diff --git a/ndb/test/ndbapi/lmc-bench/src/generator/mainGenerator.c b/ndb/test/ndbapi/lmc-bench/src/generator/mainGenerator.c
index 6ddf0a47775..4a31db0b4e9 100644
--- a/ndb/test/ndbapi/lmc-bench/src/generator/mainGenerator.c
+++ b/ndb/test/ndbapi/lmc-bench/src/generator/mainGenerator.c
@@ -14,11 +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 <string.h>
-#include <unistd.h>
-#include <pthread.h>
+#include <ndb_global.h>
#include <NdbHost.h>
#include <NdbSleep.h>
diff --git a/ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.c b/ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.c
index 9f8629ec1f0..42fbb52f3b2 100644
--- a/ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.c
+++ b/ndb/test/ndbapi/lmc-bench/src/populator/dbPopulate.c
@@ -18,9 +18,7 @@
* I N C L U D E D F I L E S *
***************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <ndb_global.h>
#include "userInterface.h"
diff --git a/ndb/test/ndbapi/lmc-bench/src/populator/mainPopulate.c b/ndb/test/ndbapi/lmc-bench/src/populator/mainPopulate.c
index 9dde902d006..838ac8a7196 100644
--- a/ndb/test/ndbapi/lmc-bench/src/populator/mainPopulate.c
+++ b/ndb/test/ndbapi/lmc-bench/src/populator/mainPopulate.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 <stdlib.h>
-#include <string.h>
+#include <ndb_global.h>
#include "userInterface.h"
#include "dbPopulate.h"
diff --git a/ndb/test/ndbapi/lmc-bench/src/user/localDbPrepare.c b/ndb/test/ndbapi/lmc-bench/src/user/localDbPrepare.c
index ca8a64ab59c..dd100507016 100644
--- a/ndb/test/ndbapi/lmc-bench/src/user/localDbPrepare.c
+++ b/ndb/test/ndbapi/lmc-bench/src/user/localDbPrepare.c
@@ -18,7 +18,7 @@
* I N C L U D E D F I L E S *
***************************************************************/
-#include <stdio.h>
+#include <ndb_global.h>
#include "userInterface.h"
#include "userHandle.h"
diff --git a/ndb/test/ndbapi/lmc-bench/src/user/macros.h b/ndb/test/ndbapi/lmc-bench/src/user/macros.h
index beb4352c269..363f247b93f 100644
--- a/ndb/test/ndbapi/lmc-bench/src/user/macros.h
+++ b/ndb/test/ndbapi/lmc-bench/src/user/macros.h
@@ -17,8 +17,7 @@
#ifndef MACROS_H
#define MACROS_H
-#include <stdlib.h>
-#include <stdio.h>
+#include <ndb_global.h>
#include <NdbOut.hpp>
#define ERROR(x) {ndbout_c((x)); }
diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_error.hpp b/ndb/test/ndbapi/lmc-bench/src/user/ndb_error.hpp
index 5f792342ed9..b3aaeac822e 100644
--- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_error.hpp
+++ b/ndb/test/ndbapi/lmc-bench/src/user/ndb_error.hpp
@@ -17,7 +17,6 @@
#ifndef NDB_ERROR_H
#define NDB_ERROR_H
-#include <stdio.h>
#include <NdbOut.hpp>
#define error_handler(x,y, z) { \
diff --git a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_populate.cpp b/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_populate.cpp
index 6a35bccd064..ce3a76cdd59 100644
--- a/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_populate.cpp
+++ b/ndb/test/ndbapi/lmc-bench/src/user/ndb_user_populate.cpp
@@ -19,7 +19,7 @@ extern "C" {
#include "user_populate.h"
}
-#include <stdio.h>
+#include <ndb_global.h>
#include <NdbApi.hpp>
#include "ndb_schema.hpp"
diff --git a/ndb/test/ndbapi/lmc-bench/src/user/old/userInterface.c b/ndb/test/ndbapi/lmc-bench/src/user/old/userInterface.c
index c68f287f5dd..bacf1861dde 100644
--- a/ndb/test/ndbapi/lmc-bench/src/user/old/userInterface.c
+++ b/ndb/test/ndbapi/lmc-bench/src/user/old/userInterface.c
@@ -18,10 +18,7 @@
* I N C L U D E D F I L E S *
***************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/time.h>
+#include <ndb_global.h>
#include "userInterface.h"
#include "userHandle.h"
diff --git a/ndb/test/ndbapi/lmc-bench/src/user/old/userTransaction.c b/ndb/test/ndbapi/lmc-bench/src/user/old/userTransaction.c
index 17069b0a042..a2f4787bb0c 100644
--- a/ndb/test/ndbapi/lmc-bench/src/user/old/userTransaction.c
+++ b/ndb/test/ndbapi/lmc-bench/src/user/old/userTransaction.c
@@ -18,8 +18,7 @@
* I N C L U D E D F I L E S *
***************************************************************/
-#include <stdio.h>
-#include <string.h>
+#include <ndb_global.h>
#include <time.h>
#include "sql.h"
diff --git a/ndb/test/ndbapi/lmc-bench/src/user/userInterface.cpp b/ndb/test/ndbapi/lmc-bench/src/user/userInterface.cpp
index fc3f6955a47..67c4e037215 100644
--- a/ndb/test/ndbapi/lmc-bench/src/user/userInterface.cpp
+++ b/ndb/test/ndbapi/lmc-bench/src/user/userInterface.cpp
@@ -18,9 +18,7 @@
* I N C L U D E D F I L E S *
***************************************************************/
-#include <NdbStdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
+#include <ndb_global.h>
#ifndef NDB_WIN32
#include <sys/time.h>
#endif
diff --git a/ndb/test/ndbapi/lmc-bench/src/user/userTransaction.c b/ndb/test/ndbapi/lmc-bench/src/user/userTransaction.c
index 17069b0a042..a2f4787bb0c 100644
--- a/ndb/test/ndbapi/lmc-bench/src/user/userTransaction.c
+++ b/ndb/test/ndbapi/lmc-bench/src/user/userTransaction.c
@@ -18,8 +18,7 @@
* I N C L U D E D F I L E S *
***************************************************************/
-#include <stdio.h>
-#include <string.h>
+#include <ndb_global.h>
#include <time.h>
#include "sql.h"
diff --git a/ndb/test/ndbapi/ronja/benchronja/benchronja.cpp b/ndb/test/ndbapi/ronja/benchronja/benchronja.cpp
index 71fa286a21b..ce0aee35e8f 100644
--- a/ndb/test/ndbapi/ronja/benchronja/benchronja.cpp
+++ b/ndb/test/ndbapi/ronja/benchronja/benchronja.cpp
@@ -26,6 +26,8 @@
* *************************************************** */
+#include <ndb_global.h>
+
#include <NdbApi.hpp>
#include <NdbTest.hpp>
#include <NdbOut.hpp>
@@ -36,11 +38,6 @@
#include <NdbTick.h>
#include <random.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-
#define MAX_TIMERS 4
#define MAXSTRLEN 16
#define MAXATTR 64
diff --git a/ndb/test/ndbapi/testBlobs/testBlobs.cpp b/ndb/test/ndbapi/testBlobs/testBlobs.cpp
index b8fe51dc1e4..461c7e22092 100644
--- a/ndb/test/ndbapi/testBlobs/testBlobs.cpp
+++ b/ndb/test/ndbapi/testBlobs/testBlobs.cpp
@@ -18,13 +18,11 @@
* testBlobs
*/
-#include <new>
-#include <stdlib.h>
+#include <ndb_global.h>
#include <stdarg.h>
#include <assert.h>
-#include <NdbUnistd.h>
-#include <NdbString.h>
-#include <NdbStdio.h>
+
+#include <new>
#include <NdbMain.h>
#include <NdbOut.hpp>
#include <NdbThread.h>
diff --git a/ndb/test/ndbapi/testDataBuffers/testDataBuffers.cpp b/ndb/test/ndbapi/testDataBuffers/testDataBuffers.cpp
index fd6570fad0a..051e5ff702e 100644
--- a/ndb/test/ndbapi/testDataBuffers/testDataBuffers.cpp
+++ b/ndb/test/ndbapi/testDataBuffers/testDataBuffers.cpp
@@ -28,14 +28,13 @@
* Creates tables TB00 to TB15
*/
-#include <stdlib.h>
-#include <string.h>
+#include <ndb_global.h>
#include <stdarg.h>
+
#include <NdbMain.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
#include <NdbTest.hpp>
-#include <NdbStdio.h>
// limits
static int const MaxAttr = 64;
diff --git a/ndb/test/ndbapi/testOIBasic/testOIBasic.cpp b/ndb/test/ndbapi/testOIBasic/testOIBasic.cpp
index 68fa6ec5474..ad63bc1cc6f 100644
--- a/ndb/test/ndbapi/testOIBasic/testOIBasic.cpp
+++ b/ndb/test/ndbapi/testOIBasic/testOIBasic.cpp
@@ -18,9 +18,7 @@
* testOIBasic - ordered index test
*/
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
+#include <ndb_global.h>
#include <stdarg.h>
#include <assert.h>
#include <new>
@@ -28,7 +26,6 @@
#include <NdbOut.hpp>
#include <NdbApi.hpp>
#include <NdbTest.hpp>
-#include <NdbStdio.h>
#include <NdbMutex.h>
#include <NdbCondition.h>
#include <NdbThread.h>
diff --git a/ndb/test/ndbapi/vw_test/bcd.h b/ndb/test/ndbapi/vw_test/bcd.h
index ce1309693c8..d0aaffbd8b7 100644
--- a/ndb/test/ndbapi/vw_test/bcd.h
+++ b/ndb/test/ndbapi/vw_test/bcd.h
@@ -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 <math.h>
-#include <stdio.h>
+#include <ndb_global.h>
struct bcdtab {
char tab[3];
diff --git a/ndb/test/ndbapi/vw_test/cdrserver.cpp b/ndb/test/ndbapi/vw_test/cdrserver.cpp
index 3c3f32e8886..8354d28f53f 100644
--- a/ndb/test/ndbapi/vw_test/cdrserver.cpp
+++ b/ndb/test/ndbapi/vw_test/cdrserver.cpp
@@ -31,28 +31,22 @@
/* must also have the same entry (same port number) in its */
/* ./etc/services file. */
/* **************************************************************** */
+
+#include <ndb_global.h>
+
/******** NDB INCLUDE ******/
#include <NdbApi.hpp>
/***************************/
/*#include <sys/shm.h>*/
-#include <unistd.h>
-#include <stdlib.h>
-#include <strings.h>
#include <pthread.h>
#include <sys/sem.h>
-#include <sys/types.h>
#include <sys/shm.h>
-#include <sys/socket.h>
-#include <errno.h>
#include <netinet/in.h>
#include <signal.h>
-#include <stdio.h>
#include <netdb.h>
#include <time.h>
#include <synch.h>
#include <sched.h>
-#include <limits.h>
-#include <math.h>
extern "C" {
#include "utv.h"
diff --git a/ndb/test/ndbapi/vw_test/size.cpp b/ndb/test/ndbapi/vw_test/size.cpp
index 397cc02f4f6..c506771ebde 100644
--- a/ndb/test/ndbapi/vw_test/size.cpp
+++ b/ndb/test/ndbapi/vw_test/size.cpp
@@ -14,7 +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 <ndb_global.h>
#include "utv.h"
int main(void)
diff --git a/ndb/test/newtonapi/basic_test/common.cpp b/ndb/test/newtonapi/basic_test/common.cpp
index 6fd63730832..d4c4e6a74a7 100644
--- a/ndb/test/newtonapi/basic_test/common.cpp
+++ b/ndb/test/newtonapi/basic_test/common.cpp
@@ -16,10 +16,6 @@
#include "common.hpp"
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
NdbOut &
operator << (NdbOut & out, const Employee_t & emp){
diff --git a/ndb/test/newtonapi/basic_test/common.hpp b/ndb/test/newtonapi/basic_test/common.hpp
index e081df723ef..0df8f7e078d 100644
--- a/ndb/test/newtonapi/basic_test/common.hpp
+++ b/ndb/test/newtonapi/basic_test/common.hpp
@@ -17,12 +17,13 @@
#ifndef COMMON_H
#define COMMON_H
+#include <ndb_global.h>
+
extern "C" {
#include <dba.h>
}
#include <NdbOut.hpp>
-#include <stdlib.h>
typedef struct Employee {
UInt32_t EmpNo;
diff --git a/ndb/test/newtonapi/basic_test/too_basic.cpp b/ndb/test/newtonapi/basic_test/too_basic.cpp
index 9099f0d9154..883aacf8841 100644
--- a/ndb/test/newtonapi/basic_test/too_basic.cpp
+++ b/ndb/test/newtonapi/basic_test/too_basic.cpp
@@ -18,6 +18,9 @@
/****** THIS LINE IS 80 CHARACTERS WIDE - DO *NOT* EXCEED 80 CHARACTERS! ****/
+#include <ndb_global.h>
+#include <NdbOut.hpp>
+
//#include <cfg/cfg_db.h>
//#include <init/init_start_restart.h>
//#include "pcn_types.h"
@@ -27,13 +30,6 @@ extern "C" {
#include <cfg_db.h>
}
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <NdbOut.hpp>
-
-
-
typedef struct Employee {
UInt32_t EmpNo;
diff --git a/ndb/test/newtonapi/perf_test/perf.cpp b/ndb/test/newtonapi/perf_test/perf.cpp
index 81d4cc5fd08..2edad572d11 100644
--- a/ndb/test/newtonapi/perf_test/perf.cpp
+++ b/ndb/test/newtonapi/perf_test/perf.cpp
@@ -15,14 +15,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <ndb_global.h>
+#include <assert.h>
+
extern "C" {
#include <dba.h>
}
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
#include <NdbOut.hpp>
#include <NdbSleep.h>
#include <NdbTimer.hpp>
@@ -31,6 +30,9 @@ extern "C" {
#include <NdbMain.h>
#include <time.h>
+#undef min
+#undef max
+
static const int NP_Insert = 0;
static const int NP_Update = 1;
static const int NP_WriteUpdate = 2;
diff --git a/ndb/test/run-test/main.cpp b/ndb/test/run-test/main.cpp
index 1ce9124431c..eb8a626dc2b 100644
--- a/ndb/test/run-test/main.cpp
+++ b/ndb/test/run-test/main.cpp
@@ -15,7 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <stdio.h>
+#include <ndb_global.h>
#include <getarg.h>
#include <BaseString.hpp>
#include <Parser.hpp>
diff --git a/ndb/test/run-test/run-test.hpp b/ndb/test/run-test/run-test.hpp
index 8387f8638ed..8d00a7b6a55 100644
--- a/ndb/test/run-test/run-test.hpp
+++ b/ndb/test/run-test/run-test.hpp
@@ -24,6 +24,8 @@
#include <mgmapi.h>
#include <CpcClient.hpp>
+#undef MYSQL_CLIENT
+
enum ErrorCodes {
ERR_OK = 0,
ERR_NDB_FAILED = 101,
diff --git a/ndb/test/src/NDBT_ResultRow.cpp b/ndb/test/src/NDBT_ResultRow.cpp
index 098e4cfb796..d8965dad8aa 100644
--- a/ndb/test/src/NDBT_ResultRow.cpp
+++ b/ndb/test/src/NDBT_ResultRow.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 "NDBT_ResultRow.hpp"
+#include <ndb_global.h>
#include <assert.h>
-#include <stdio.h>
-#include <string.h>
+#include "NDBT_ResultRow.hpp"
#include <NdbOut.hpp>
NDBT_ResultRow::NDBT_ResultRow(const NdbDictionary::Table& tab,
diff --git a/ndb/test/src/NDBT_ReturnCodes.cpp b/ndb/test/src/NDBT_ReturnCodes.cpp
index 542547c7a48..5bffc00177f 100644
--- a/ndb/test/src/NDBT_ReturnCodes.cpp
+++ b/ndb/test/src/NDBT_ReturnCodes.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 */
+/* System include files */
+#include <ndb_global.h>
+
#include "NDBT_ReturnCodes.h"
/* Ndb include files */
#include <NdbOut.hpp>
-/* System include files */
-#include <stdlib.h>
-
const char* rcodeToChar(int rcode){
switch (rcode){
case NDBT_OK:
diff --git a/ndb/test/tools/hugoCalculator/hugoCalculator.cpp b/ndb/test/tools/hugoCalculator/hugoCalculator.cpp
index 4cb801d3d73..7f2751be2ba 100644
--- a/ndb/test/tools/hugoCalculator/hugoCalculator.cpp
+++ b/ndb/test/tools/hugoCalculator/hugoCalculator.cpp
@@ -14,8 +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 <NdbOut.hpp>
-#include <stdlib.h>
#include <NdbSleep.h>
#include <NDBT_Tables.hpp>
#include <getarg.h>
diff --git a/ndb/test/tools/hugoFill/hugoFill.cpp b/ndb/test/tools/hugoFill/hugoFill.cpp
index 748623cb253..dee6ce2e6c8 100644
--- a/ndb/test/tools/hugoFill/hugoFill.cpp
+++ b/ndb/test/tools/hugoFill/hugoFill.cpp
@@ -14,7 +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 <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/tools/hugoLockRecords/hugoLockRecords.cpp b/ndb/test/tools/hugoLockRecords/hugoLockRecords.cpp
index 90c08649ec2..e2c2cd13f00 100644
--- a/ndb/test/tools/hugoLockRecords/hugoLockRecords.cpp
+++ b/ndb/test/tools/hugoLockRecords/hugoLockRecords.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 <stdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/tools/hugoPkDelete/hugoPkDel.cpp b/ndb/test/tools/hugoPkDelete/hugoPkDel.cpp
index f77dc21bd0b..1855f19796f 100644
--- a/ndb/test/tools/hugoPkDelete/hugoPkDel.cpp
+++ b/ndb/test/tools/hugoPkDelete/hugoPkDel.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 <stdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/tools/hugoPkRead/hugoPkRead.cpp b/ndb/test/tools/hugoPkRead/hugoPkRead.cpp
index 2e9c2c35260..50351f08195 100644
--- a/ndb/test/tools/hugoPkRead/hugoPkRead.cpp
+++ b/ndb/test/tools/hugoPkRead/hugoPkRead.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 <stdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/tools/hugoPkReadRecord/hugoPkReadRecord.cpp b/ndb/test/tools/hugoPkReadRecord/hugoPkReadRecord.cpp
index 6335c391bc3..ac17ffffee8 100644
--- a/ndb/test/tools/hugoPkReadRecord/hugoPkReadRecord.cpp
+++ b/ndb/test/tools/hugoPkReadRecord/hugoPkReadRecord.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 <NdbOut.hpp>
-#include <stdlib.h>
#include <NdbSleep.h>
#include <NDBT_Tables.hpp>
#include <getarg.h>
diff --git a/ndb/test/tools/hugoPkUpdate/hugoPkUpd.cpp b/ndb/test/tools/hugoPkUpdate/hugoPkUpd.cpp
index 141d01e3aee..e7edc3a991d 100644
--- a/ndb/test/tools/hugoPkUpdate/hugoPkUpd.cpp
+++ b/ndb/test/tools/hugoPkUpdate/hugoPkUpd.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 <stdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/tools/hugoScanRead/hugoScanRead.cpp b/ndb/test/tools/hugoScanRead/hugoScanRead.cpp
index 2376280d004..47ea8f4a8a7 100644
--- a/ndb/test/tools/hugoScanRead/hugoScanRead.cpp
+++ b/ndb/test/tools/hugoScanRead/hugoScanRead.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 <stdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/test/tools/hugoScanUpdate/hugoScanUpd.cpp b/ndb/test/tools/hugoScanUpdate/hugoScanUpd.cpp
index 56cd3b8c969..3e2255ca0f3 100644
--- a/ndb/test/tools/hugoScanUpdate/hugoScanUpd.cpp
+++ b/ndb/test/tools/hugoScanUpdate/hugoScanUpd.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 <stdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/tools/copy_tab/copy_tab.cpp b/ndb/tools/copy_tab/copy_tab.cpp
index 32cfb0b35ff..33ce8e01d9a 100644
--- a/ndb/tools/copy_tab/copy_tab.cpp
+++ b/ndb/tools/copy_tab/copy_tab.cpp
@@ -14,7 +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 <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/tools/create_index/create_index.cpp b/ndb/tools/create_index/create_index.cpp
index 32da39a5208..dc9e6c606d6 100644
--- a/ndb/tools/create_index/create_index.cpp
+++ b/ndb/tools/create_index/create_index.cpp
@@ -14,7 +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 <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/tools/delete_all/delete_all.cpp b/ndb/tools/delete_all/delete_all.cpp
index e78ad4a2e1e..9cbba503e68 100644
--- a/ndb/tools/delete_all/delete_all.cpp
+++ b/ndb/tools/delete_all/delete_all.cpp
@@ -14,7 +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 <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/tools/drop_index/drop_index.cpp b/ndb/tools/drop_index/drop_index.cpp
index 146f01113b2..327f15741c9 100644
--- a/ndb/tools/drop_index/drop_index.cpp
+++ b/ndb/tools/drop_index/drop_index.cpp
@@ -14,7 +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 <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/tools/drop_tab/drop_tab.cpp b/ndb/tools/drop_tab/drop_tab.cpp
index 5946ada5956..70e5d85aabe 100644
--- a/ndb/tools/drop_tab/drop_tab.cpp
+++ b/ndb/tools/drop_tab/drop_tab.cpp
@@ -14,7 +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 <ndb_global.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/tools/select_all/select_all.cpp b/ndb/tools/select_all/select_all.cpp
index 32e9d1c6872..34f63a095bb 100644
--- a/ndb/tools/select_all/select_all.cpp
+++ b/ndb/tools/select_all/select_all.cpp
@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <NdbStdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/tools/select_count/select_count.cpp b/ndb/tools/select_count/select_count.cpp
index 4d281b9bdd5..b1513ad4135 100644
--- a/ndb/tools/select_count/select_count.cpp
+++ b/ndb/tools/select_count/select_count.cpp
@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <NdbStdio.h>
-#include <stdlib.h>
+#include <ndb_global.h>
+
#include <NdbOut.hpp>
#include <NdbApi.hpp>
diff --git a/ndb/tools/transproxy/transproxy.cpp b/ndb/tools/transproxy/transproxy.cpp
index 4c1308e63e7..a9046737d37 100644
--- a/ndb/tools/transproxy/transproxy.cpp
+++ b/ndb/tools/transproxy/transproxy.cpp
@@ -14,14 +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 <unistd.h>
+#include <ndb_global.h>
#include <stdarg.h>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#include <NdbTCP.h>
#include <NdbOut.hpp>
diff --git a/ndb/tools/verify_index/verify_index.cpp b/ndb/tools/verify_index/verify_index.cpp
index 324bb11cfe4..1295b657e9b 100644
--- a/ndb/tools/verify_index/verify_index.cpp
+++ b/ndb/tools/verify_index/verify_index.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 <NdbStdio.h>
-#include <stdlib.h>
#include <NdbOut.hpp>
#include <NdbApi.hpp>