List:Commits« Previous MessageNext Message »
From:stewart Date:August 29 2007 6:55am
Subject:[patch 2/2] bk commit into 5.0 tree (antony:1.2489)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of antony. When antony does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-08-09 01:26:26-07:00, antony@stripped +97 -0
  changes for NDB on Windows

  CMakeLists.txt@stripped, 2007-08-09 01:26:02-07:00, antony@stripped +35 -20
    Include NDBCluster into build

  config.cmake@stripped, 2007-08-09 01:26:18-07:00, antony@stripped +95 -0
    New BitKeeper file ``config.cmake''

  config.cmake@stripped, 2007-08-09 01:26:18-07:00, antony@stripped +0 -0

  extra/CMakeLists.txt@stripped, 2007-08-09 01:26:02-07:00, antony@stripped +5 -0
    Include NDBCluster into build

  extra/perror.c@stripped, 2007-08-09 01:26:03-07:00, antony@stripped +3 -0
    Include NDBCluster into build

  include/config-win.h@stripped, 2007-08-09 01:26:03-07:00, antony@stripped +5 -0
    edits for Windows

  libmysql/CMakeLists.txt@stripped, 2007-08-09 01:26:03-07:00, antony@stripped +2 -2
    fix some dependencies

  ndb/CMakeLists.txt@stripped, 2007-08-09 01:26:17-07:00, antony@stripped +22 -0
    New BitKeeper file ``ndb/CMakeLists.txt''

  ndb/CMakeLists.txt@stripped, 2007-08-09 01:26:17-07:00, antony@stripped +0 -0

  ndb/config/type_kernel.cmake@stripped, 2007-08-09 01:26:17-07:00, antony@stripped
+33 -0
    New BitKeeper file ``ndb/config/type_kernel.cmake''

  ndb/config/type_kernel.cmake@stripped, 2007-08-09 01:26:17-07:00, antony@stripped
+0 -0

  ndb/config/type_mgmapiclient.cmake@stripped, 2007-08-09 01:26:17-07:00,
antony@stripped +16 -0
    New BitKeeper file ``ndb/config/type_mgmapiclient.cmake''

  ndb/config/type_mgmapiclient.cmake@stripped, 2007-08-09 01:26:17-07:00,
antony@stripped +0 -0

  ndb/config/type_ndbapi.cmake@stripped, 2007-08-09 01:26:17-07:00, antony@stripped
+30 -0
    New BitKeeper file ``ndb/config/type_ndbapi.cmake''

  ndb/config/type_ndbapi.cmake@stripped, 2007-08-09 01:26:17-07:00, antony@stripped
+0 -0

  ndb/config/type_ndbapiclient.cmake@stripped, 2007-08-09 01:26:17-07:00,
antony@stripped +16 -0
    New BitKeeper file ``ndb/config/type_ndbapiclient.cmake''

  ndb/config/type_ndbapiclient.cmake@stripped, 2007-08-09 01:26:17-07:00,
antony@stripped +0 -0

  ndb/config/type_ndbapitest.cmake@stripped, 2007-08-09 01:26:17-07:00,
antony@stripped +32 -0
    New BitKeeper file ``ndb/config/type_ndbapitest.cmake''

  ndb/config/type_ndbapitest.cmake@stripped, 2007-08-09 01:26:17-07:00,
antony@stripped +0 -0

  ndb/config/type_ndbapitools.cmake@stripped, 2007-08-09 01:26:17-07:00,
antony@stripped +33 -0
    New BitKeeper file ``ndb/config/type_ndbapitools.cmake''

  ndb/config/type_ndbapitools.cmake@stripped, 2007-08-09 01:26:17-07:00,
antony@stripped +0 -0

  ndb/config/type_util.cmake@stripped, 2007-08-09 01:26:18-07:00, antony@stripped +24
-0
    New BitKeeper file ``ndb/config/type_util.cmake''

  ndb/config/type_util.cmake@stripped, 2007-08-09 01:26:18-07:00, antony@stripped +0
-0

  ndb/include/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00, antony@stripped +33
-0
    New BitKeeper file ``ndb/include/CMakeLists.txt''

  ndb/include/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00, antony@stripped +0
-0

  ndb/include/ndb_types.h.in@stripped, 2007-08-09 01:26:03-07:00, antony@stripped
+14 -10
    edits for Windows

  ndb/include/ndbapi/NdbOperation.hpp@stripped, 2007-08-09 01:26:03-07:00,
antony@stripped +1 -1
    change order because msc++ gets confused easily

  ndb/src/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00, antony@stripped +67 -0
    New BitKeeper file ``ndb/src/CMakeLists.txt''

  ndb/src/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00, antony@stripped +0 -0

  ndb/src/common/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00, antony@stripped
+23 -0
    New BitKeeper file ``ndb/src/common/CMakeLists.txt''

  ndb/src/common/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00, antony@stripped
+0 -0

  ndb/src/common/debugger/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00,
antony@stripped +27 -0
    New BitKeeper file ``ndb/src/common/debugger/CMakeLists.txt''

  ndb/src/common/debugger/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00,
antony@stripped +0 -0

  ndb/src/common/debugger/signaldata/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00,
antony@stripped +43 -0
    New BitKeeper file ``ndb/src/common/debugger/signaldata/CMakeLists.txt''

  ndb/src/common/debugger/signaldata/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00,
antony@stripped +0 -0

  ndb/src/common/debugger/signaldata/CntrStart.cpp@stripped, 2007-08-09 01:26:03-07:00,
antony@stripped +1 -0
    pick up ndb_global values first

  ndb/src/common/debugger/signaldata/ReadNodesConf.cpp@stripped, 2007-08-09 01:26:04-07:00,
antony@stripped +1 -0
    pick up ndb_global values first

  ndb/src/common/logger/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00,
antony@stripped +24 -0
    New BitKeeper file ``ndb/src/common/logger/CMakeLists.txt''

  ndb/src/common/logger/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00,
antony@stripped +0 -0

  ndb/src/common/logger/Logger.cpp@stripped, 2007-08-09 01:26:04-07:00,
antony@stripped +1 -1
    snprintf() --> BaseString::snprintf()

  ndb/src/common/mgmcommon/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00,
antony@stripped +25 -0
    New BitKeeper file ``ndb/src/common/mgmcommon/CMakeLists.txt''

  ndb/src/common/mgmcommon/CMakeLists.txt@stripped, 2007-08-09 01:26:16-07:00,
antony@stripped +0 -0

  ndb/src/common/portlib/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +41 -0
    New BitKeeper file ``ndb/src/common/portlib/CMakeLists.txt''

  ndb/src/common/portlib/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +0 -0

  ndb/src/common/portlib/NdbCondition.c@stripped, 2007-08-09 01:26:04-07:00,
antony@stripped +108 -1
    roll in code for windows

  ndb/src/common/portlib/NdbConfig.c@stripped, 2007-08-09 01:26:04-07:00,
antony@stripped +2 -1
    getpid() --> NdbHost_GetProcessId()

  ndb/src/common/portlib/NdbDaemon.c@stripped, 2007-08-09 01:26:04-07:00,
antony@stripped +31 -13
    edits for Windows

  ndb/src/common/portlib/NdbHost.c@stripped, 2007-08-09 01:26:04-07:00,
antony@stripped +27 -0
    edits for Windows

  ndb/src/common/portlib/NdbMutex.c@stripped, 2007-08-09 01:26:05-07:00,
antony@stripped +24 -0
    edits for Windows

  ndb/src/common/portlib/NdbPortLibTest.cpp@stripped, 2007-08-09 01:26:05-07:00,
antony@stripped +2 -2
    MSVC++ has stricter type checks

  ndb/src/common/portlib/NdbSleep.c@stripped, 2007-08-09 01:26:05-07:00,
antony@stripped +4 -0
    edits for Windows

  ndb/src/common/portlib/NdbTCP.cpp@stripped, 2007-08-09 01:26:05-07:00,
antony@stripped +0 -2
    edits for Windows

  ndb/src/common/portlib/NdbThread.c@stripped, 2007-08-09 01:26:05-07:00,
antony@stripped +67 -2
    edits for Windows

  ndb/src/common/portlib/NdbTick.c@stripped, 2007-08-09 01:26:05-07:00,
antony@stripped +21 -1
    edits for Windows

  ndb/src/common/transporter/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +28 -0
    New BitKeeper file ``ndb/src/common/transporter/CMakeLists.txt''

  ndb/src/common/transporter/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +0 -0

  ndb/src/common/util/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +50 -0
    New BitKeeper file ``ndb/src/common/util/CMakeLists.txt''

  ndb/src/common/util/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +0 -0

  ndb/src/common/util/Properties.cpp@stripped, 2007-08-09 01:26:05-07:00,
antony@stripped +1 -1
    MSVC++ has stricter type casting

  ndb/src/common/util/SocketClient.cpp@stripped, 2007-08-09 01:26:06-07:00,
antony@stripped +15 -1
    edits for Windows

  ndb/src/common/util/basestring_vsnprintf.c@stripped, 2007-08-09 01:26:06-07:00,
antony@stripped +4 -0
    edits for Windows

  ndb/src/kernel/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00, antony@stripped
+75 -0
    New BitKeeper file ``ndb/src/kernel/CMakeLists.txt''

  ndb/src/kernel/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00, antony@stripped
+0 -0

  ndb/src/kernel/blocks/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +32 -0
    New BitKeeper file ``ndb/src/kernel/blocks/CMakeLists.txt''

  ndb/src/kernel/blocks/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/backup/Backup.hpp@stripped, 2007-08-09 01:26:06-07:00,
antony@stripped +1 -0
    pick up values from ndb_global.h first

  ndb/src/kernel/blocks/backup/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +20 -0
    New BitKeeper file ``ndb/src/kernel/blocks/backup/CMakeLists.txt''

  ndb/src/kernel/blocks/backup/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/cmvmi/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +20 -0
    New BitKeeper file ``ndb/src/kernel/blocks/cmvmi/CMakeLists.txt''

  ndb/src/kernel/blocks/cmvmi/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/dbacc/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +21 -0
    New BitKeeper file ``ndb/src/kernel/blocks/dbacc/CMakeLists.txt''

  ndb/src/kernel/blocks/dbacc/CMakeLists.txt@stripped, 2007-08-09 01:26:15-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/dbdict/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +30 -0
    New BitKeeper file ``ndb/src/kernel/blocks/dbdict/CMakeLists.txt''

  ndb/src/kernel/blocks/dbdict/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-08-09 01:26:06-07:00,
antony@stripped +1 -1
    snprintf() --> BaseString::snprintf()

  ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp@stripped, 2007-08-09 01:26:06-07:00,
antony@stripped +10 -0
    edits for Windows

  ndb/src/kernel/blocks/dbdih/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +28 -0
    New BitKeeper file ``ndb/src/kernel/blocks/dbdih/CMakeLists.txt''

  ndb/src/kernel/blocks/dbdih/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/dbdih/Dbdih.hpp@stripped, 2007-08-09 01:26:07-07:00,
antony@stripped +1 -0
    pick up values from ndb_global.h first

  ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-08-09 01:26:07-07:00,
antony@stripped +3 -2
    pick up values from ndb_global.h first
    snprintf() --> BaseString::snprintf()

  ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp@stripped, 2007-08-09
01:26:07-07:00, antony@stripped +10 -0
    edits for Windows

  ndb/src/kernel/blocks/dblqh/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +28 -0
    New BitKeeper file ``ndb/src/kernel/blocks/dblqh/CMakeLists.txt''

  ndb/src/kernel/blocks/dblqh/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/dbtc/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +21 -0
    New BitKeeper file ``ndb/src/kernel/blocks/dbtc/CMakeLists.txt''

  ndb/src/kernel/blocks/dbtc/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/dbtc/Dbtc.hpp@stripped, 2007-08-09 01:26:07-07:00,
antony@stripped +1 -0
    pick up values from ndb_global.h first

  ndb/src/kernel/blocks/dbtup/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +38 -0
    New BitKeeper file ``ndb/src/kernel/blocks/dbtup/CMakeLists.txt''

  ndb/src/kernel/blocks/dbtup/CMakeLists.txt@stripped, 2007-08-09 01:26:14-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/dbtux/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +30 -0
    New BitKeeper file ``ndb/src/kernel/blocks/dbtux/CMakeLists.txt''

  ndb/src/kernel/blocks/dbtux/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/dbtux/Dbtux.hpp@stripped, 2007-08-09 01:26:07-07:00,
antony@stripped +1 -0
    pick up values from ndb_global.h first

  ndb/src/kernel/blocks/dbutil/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +20 -0
    New BitKeeper file ``ndb/src/kernel/blocks/dbutil/CMakeLists.txt''

  ndb/src/kernel/blocks/dbutil/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/ndbcntr/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +22 -0
    New BitKeeper file ``ndb/src/kernel/blocks/ndbcntr/CMakeLists.txt''

  ndb/src/kernel/blocks/ndbcntr/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp@stripped, 2007-08-09 01:26:07-07:00,
antony@stripped +10 -1
    edits for Windows

  ndb/src/kernel/blocks/ndbfs/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +24 -0
    New BitKeeper file ``ndb/src/kernel/blocks/ndbfs/CMakeLists.txt''

  ndb/src/kernel/blocks/ndbfs/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/qmgr/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +20 -0
    New BitKeeper file ``ndb/src/kernel/blocks/qmgr/CMakeLists.txt''

  ndb/src/kernel/blocks/qmgr/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/suma/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00,
antony@stripped +20 -0
    New BitKeeper file ``ndb/src/kernel/blocks/suma/CMakeLists.txt''

  ndb/src/kernel/blocks/suma/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00,
antony@stripped +0 -0

  ndb/src/kernel/blocks/suma/Suma.hpp@stripped, 2007-08-09 01:26:08-07:00,
antony@stripped +1 -0
    pick up values from ndb_global.h first

  ndb/src/kernel/blocks/trix/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00,
antony@stripped +20 -0
    New BitKeeper file ``ndb/src/kernel/blocks/trix/CMakeLists.txt''

  ndb/src/kernel/blocks/trix/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00,
antony@stripped +0 -0

  ndb/src/kernel/error/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +22 -0
    New BitKeeper file ``ndb/src/kernel/error/CMakeLists.txt''

  ndb/src/kernel/error/CMakeLists.txt@stripped, 2007-08-09 01:26:13-07:00,
antony@stripped +0 -0

  ndb/src/kernel/main.cpp@stripped, 2007-08-09 01:26:06-07:00, antony@stripped +3 -0
    edits for Windows

  ndb/src/kernel/vm/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00,
antony@stripped +35 -0
    New BitKeeper file ``ndb/src/kernel/vm/CMakeLists.txt''

  ndb/src/kernel/vm/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00,
antony@stripped +0 -0

  ndb/src/kernel/vm/Emulator.cpp@stripped, 2007-08-09 01:26:08-07:00,
antony@stripped +2 -0
    edits for Windows

  ndb/src/kernel/vm/MetaData.hpp@stripped, 2007-08-09 01:26:08-07:00, antony@stripped
+1 -0
    pick up values from ndb_global.h first

  ndb/src/kernel/vm/SimulatedBlock.cpp@stripped, 2007-08-09 01:26:08-07:00,
antony@stripped +1 -1
    snprintf() --> BaseString::snprintf()

  ndb/src/kernel/vm/TransporterCallback.cpp@stripped, 2007-08-09 01:26:08-07:00,
antony@stripped +3 -3
    snprintf() --> BaseString::snprintf()

  ndb/src/kernel/vm/WatchDog.cpp@stripped, 2007-08-09 01:26:08-07:00, antony@stripped
+4 -0
    edits for Windows

  ndb/src/mgmapi/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00, antony@stripped
+25 -0
    New BitKeeper file ``ndb/src/mgmapi/CMakeLists.txt''

  ndb/src/mgmapi/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00, antony@stripped
+0 -0

  ndb/src/mgmapi/LocalConfig.cpp@stripped, 2007-08-09 01:26:09-07:00,
antony@stripped +1 -1
    snprintf() --> BaseString::snprintf()

  ndb/src/mgmapi/ndb_logevent.cpp@stripped, 2007-08-09 01:26:09-07:00,
antony@stripped +16 -0
    edits for Windows

  ndb/src/mgmclient/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00,
antony@stripped +34 -0
    New BitKeeper file ``ndb/src/mgmclient/CMakeLists.txt''

  ndb/src/mgmclient/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00,
antony@stripped +0 -0

  ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2007-08-09 01:26:09-07:00,
antony@stripped +12 -0
    edits for Windows

  ndb/src/mgmclient/main.cpp@stripped, 2007-08-09 01:26:09-07:00, antony@stripped +4
-0
    edits for Windows

  ndb/src/mgmsrv/CMakeLists.txt@stripped, 2007-08-09 01:26:10-07:00, antony@stripped
+42 -0
    New BitKeeper file ``ndb/src/mgmsrv/CMakeLists.txt''

  ndb/src/mgmsrv/CMakeLists.txt@stripped, 2007-08-09 01:26:10-07:00, antony@stripped
+0 -0

  ndb/src/mgmsrv/MgmtSrvr.cpp@stripped, 2007-08-09 01:26:09-07:00, antony@stripped
+1 -1
    snprintf() --> BaseString::snprintf()

  ndb/src/mgmsrv/main.cpp@stripped, 2007-08-09 01:26:09-07:00, antony@stripped +10
-0
    edits for Windows

  ndb/src/ndbapi/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00, antony@stripped
+53 -0
    New BitKeeper file ``ndb/src/ndbapi/CMakeLists.txt''

  ndb/src/ndbapi/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00, antony@stripped
+0 -0

  ndb/test/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00, antony@stripped +19 -0
    New BitKeeper file ``ndb/test/CMakeLists.txt''

  ndb/test/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00, antony@stripped +0 -0

  ndb/test/ndbapi/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00, antony@stripped
+70 -0
    New BitKeeper file ``ndb/test/ndbapi/CMakeLists.txt''

  ndb/test/ndbapi/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00, antony@stripped
+0 -0

  ndb/test/ndbapi/bank/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00,
antony@stripped +34 -0
    New BitKeeper file ``ndb/test/ndbapi/bank/CMakeLists.txt''

  ndb/test/ndbapi/bank/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00,
antony@stripped +0 -0

  ndb/test/ndbapi/old_dirs/flexBench/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00,
antony@stripped +21 -0
    New BitKeeper file ``ndb/test/ndbapi/old_dirs/flexBench/CMakeLists.txt''

  ndb/test/ndbapi/old_dirs/flexBench/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00,
antony@stripped +0 -0

  ndb/test/src/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00, antony@stripped
+45 -0
    New BitKeeper file ``ndb/test/src/CMakeLists.txt''

  ndb/test/src/CMakeLists.txt@stripped, 2007-08-09 01:26:11-07:00, antony@stripped +0
-0

  ndb/test/tools/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00, antony@stripped
+33 -0
    New BitKeeper file ``ndb/test/tools/CMakeLists.txt''

  ndb/test/tools/CMakeLists.txt@stripped, 2007-08-09 01:26:12-07:00, antony@stripped
+0 -0

  ndb/tools/CMakeLists.txt@stripped, 2007-08-09 01:26:10-07:00, antony@stripped +69
-0
    New BitKeeper file ``ndb/tools/CMakeLists.txt''

  ndb/tools/CMakeLists.txt@stripped, 2007-08-09 01:26:10-07:00, antony@stripped +0 -0

  ndb/tools/ndb_config.cpp@stripped, 2007-08-09 01:26:09-07:00, antony@stripped +4
-0
    define strncasecmp() for windows

  sql/CMakeLists.txt@stripped, 2007-08-09 01:26:10-07:00, antony@stripped +13 -2
    Include NDBCluster storage engine into build

  sql/ha_ndbcluster.cc@stripped, 2007-08-09 01:26:10-07:00, antony@stripped +18 -36
    MSVC++ has stricter type checks.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	antony
# Host:	pcg5ppc.xiphis.org
# Root:	/private/Network/Servers/anubis.xiphis.org/home/antony/work/ndb-5.0

Index: main/extra/perror.c
===================================================================
--- main.orig/extra/perror.c	2007-08-13 11:11:50.667197944 +1000
+++ main/extra/perror.c	2007-08-13 11:17:37.510963444 +1000
@@ -17,6 +17,9 @@
 
 #define PERROR_VERSION "2.10"
 
+#ifdef HAVE_NDBCLUSTER_DB
+#include <ndb_global.h>
+#endif
 #include <my_global.h>
 #include <my_sys.h>
 #include <m_string.h>
Index: main/include/config-win.h
===================================================================
--- main.orig/include/config-win.h	2007-08-13 11:11:50.683198856 +1000
+++ main/include/config-win.h	2007-08-13 11:17:37.514963672 +1000
@@ -153,7 +153,11 @@ typedef uint rf_SetTimer;
 
 #define Socket_defined
 #define my_socket SOCKET
+#ifndef __cplusplus
 #define bool BOOL
+#define true ((BOOL)1)
+#define false ((BOOL)0)
+#endif
 #define SIGPIPE SIGINT
 #define RETQSORTTYPE void
 #define QSORT_TYPE_IS_VOID
@@ -172,6 +176,7 @@ typedef uint rf_SetTimer;
 #endif
 #define VOID_SIGHANDLER
 #define SIZEOF_CHAR		1
+#define SIZEOF_INT		4
 #define SIZEOF_LONG		4
 #define SIZEOF_LONG_LONG	8
 #define SIZEOF_OFF_T		8
Index: main/config.cmake
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/config.cmake	2007-08-13 11:17:37.858983277 +1000
@@ -0,0 +1,96 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ FILE(READ "configure.in" CONFIGURE_IN)
+ 
+ STRING(REGEX REPLACE ".*AM_INIT_AUTOMAKE\\(mysql, ([^)]+)\\).*"
+         "\\1" PARSE_VERSION "${CONFIGURE_IN}")
+ 
+ STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
+         "\\1.\\2" PARSE_BASE_VERSION "${VERSION}")
+ STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
+         "\\1" PARSE_VERSION_MAJOR "${VERSION}")
+ STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
+         "\\2" PARSE_VERSION_MINOR "${VERSION}")
+ STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
+         "\\3" PARSE_VERSION_BUILD "${VERSION}")
+ IF(PARSE_VERSION_MINOR LESS 10)
+   SET(PARSE_VERSION_ID "${PARSE_VERSION_MAJOR}0${PARSE_VERSION_MINOR}")
+ ELSE(PARSE_VERSION_MINOR LESS 10)
+   SET(PARSE_VERSION_ID "${PARSE_VERSION_MAJOR}${PARSE_VERSION_MINOR}")
+ ENDIF(PARSE_VERSION_MINOR LESS 10)
+ IF(PARSE_VERSION_BUILD LESS 10)
+   SET(PARSE_VERSION_ID "${PARSE_VERSION_ID}0${PARSE_VERSION_BUILD}")
+ ELSE(PARSE_VERSION_BUILD LESS 10)
+   SET(PARSE_VERSION_ID "${PARSE_VERSION_ID}${PARSE_VERSION_BUILD}")
+ ENDIF(PARSE_VERSION_BUILD LESS 10)
+ 
+ STRING(REGEX REPLACE ".*PROTOCOL_VERSION=([0-9]+).*"
+         "\\1" PARSE_PROTOCOL "${CONFIGURE_IN}")
+ STRING(REGEX REPLACE ".*DOT_FRM_VERSION=([0-9]+).*"
+         "\\1" PARSE_FRM_VERSION "${CONFIGURE_IN}")
+ STRING(REGEX REPLACE ".*MYSQL_TCP_PORT_DEFAULT=([0-9]+).*"
+         "\\1" PARSE_TCP_PORT "${CONFIGURE_IN}")
+ STRING(REGEX REPLACE ".*MYSQL_UNIX_ADDR_DEFAULT=([^\r\n]+).*"
+         "\\1" PARSE_UNIX_ADDR "${CONFIGURE_IN}")
+ 
+ # Set some constant values
+ SET(PROTOCOL_VERSION "${PARSE_PROTOCOL}" CACHE STRING 
+         "MySQL Protocol Version" FORCE)
+ SET(DOT_FRM_VERSION "${PARSE_FRM_VERSION}" CACHE STRING 
+         "MySQL FRM Version" FORCE)
+ SET(MYSQL_TCP_PORT_DEFAULT "${PARSE_TCP_PORT}" CACHE STRING 
+         "Default port for TCP connections" FORCE)
+ SET(MYSQL_UNIX_ADDR_DEFAULT "${PARSE_UNIX_ADDR}" CACHE STRING 
+         "Default path for PIPE connections" FORCE)
+ SET(VERSION "${PARSE_VERSION}" CACHE STRING 
+         "MySQL version" FORCE)
+ SET(MYSQL_BASE_VERSION "${PARSE_BASE_VERSION}" CACHE STRING 
+         "Base MySQL version" FORCE)
+ SET(MYSQL_VERSION_ID "${PARSE_VERSION_ID}" CACHE STRING 
+         "MySQL version identifier" FORCE)
+ 
+ 
+ # Set some default configuration values
+ SET(MYSQL_SERVER_SUFFIX "" CACHE STRING 
+         "MySQL Server suffix")
+ SET(COMPILATION_COMMENT "Source distribution" CACHE STRING 
+         "Source compilation comment")
+ SET(MYSQL_TCP_PORT "${MYSQL_TCP_PORT_DEFAULT}" CACHE STRING 
+         "Port for TCP connections")
+ SET(MYSQL_UNIX_ADDR "${MYSQL_UNIX_ADDR_DEFAULT}" CACHE STRING 
+         "Path for PIPE connections")
+ 
+ SET(EMBED_MANIFESTS FALSE CACHE BOOL "Embed manifests")
+ SET(DISABLE_GRANT_OPTIONS FALSE CACHE BOOL "Disable grant options")
+ 
+ SET(WITH_ARCHIVE_STORAGE_ENGINE FALSE CACHE BOOL "Include Archive engine")
+ SET(WITH_BERKELEY_STORAGE_ENGINE FALSE CACHE BOOL "Include Berkeley engine")
+ SET(WITH_BLACKHOLE_STORAGE_ENGINE FALSE CACHE BOOL "Include Blackhole engine")
+ SET(WITH_EXAMPLE_STORAGE_ENGINE FALSE CACHE BOOL "Include Example engine")
+ SET(WITH_FEDERATED_STORAGE_ENGINE FALSE CACHE BOOL "Include Federated")
+ SET(WITH_INNOBASE_STORAGE_ENGINE FALSE CACHE BOOL "Include InnoDB engine")
+ SET(WITH_NDBCLUSTER_STORAGE_ENGINE FALSE CACHE BOOL "Include NDB Cluster")
+ SET(WITH_PARTITION_STORAGE_ENGINE FALSE CACHE BOOL "Include Partitioning")
+ 
+ SET(NDB_SCI_INCLUDES "" CACHE STRING "")
+ SET(NDB_SCI_LIBS "" CACHE STRING "")
+ SET(NDB_TEST TRUE CACHE BOOL "Include the NDB Cluster ndbapi test programs")
+ SET(ndb_port "1186" CACHE STRING "Port for NDB Cluster management server")
+ SET(ndb_port_base "default" CACHE STRING "Base port for NDB Cluster transporters")
+ SET(NDB_VERSION_MAJOR "${PARSE_VERSION_MAJOR}" CACHE STRING "NDB Major Version" FORCE)
+ SET(NDB_VERSION_MINOR "${PARSE_VERSION_MINOR}" CACHE STRING "NDB Minor Version" FORCE)
+ SET(NDB_VERSION_BUILD "${PARSE_VERSION_BUILD}" CACHE STRING "NDB Build Version" FORCE)
+ 
Index: main/ndb/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/CMakeLists.txt	2007-08-13 11:17:37.910986240 +1000
@@ -0,0 +1,23 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ ADD_SUBDIRECTORY(include)
+ ADD_SUBDIRECTORY(src)
+ ADD_SUBDIRECTORY(tools)
+ IF(NDB_TEST)
+ ADD_SUBDIRECTORY(test)
+ ENDIF(NDB_TEST)
+ ADD_SUBDIRECTORY(docs)
+ 
Index: main/ndb/config/type_kernel.cmake
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/config/type_kernel.cmake	2007-08-13 11:17:37.934987608 +1000
@@ -0,0 +1,34 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
+                     ${CMAKE_BINARY_DIR}/include
+                     ${CMAKE_BINARY_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/ndb/src/kernel/vm
+                     ${CMAKE_SOURCE_DIR}/ndb/src/kernel/error
+                     ${CMAKE_SOURCE_DIR}/ndb/src/kernel
+                     ${CMAKE_SOURCE_DIR}/ndb/include/kernel
+                     ${CMAKE_SOURCE_DIR}/ndb/include/transporter
+                     ${CMAKE_SOURCE_DIR}/ndb/include/debugger
+                     ${CMAKE_SOURCE_DIR}/ndb/include/mgmapi
+                     ${CMAKE_SOURCE_DIR}/ndb/include/mgmcommon
+                     ${CMAKE_SOURCE_DIR}/ndb/include/ndbapi
+                     ${CMAKE_SOURCE_DIR}/ndb/include/util
+                     ${CMAKE_SOURCE_DIR}/ndb/include/portlib
+                     ${CMAKE_SOURCE_DIR}/ndb/include/logger)
+ 
+ 
Index: main/ndb/config/type_mgmapiclient.cmake
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/config/type_mgmapiclient.cmake	2007-08-13 11:17:37.954988748 +1000
@@ -0,0 +1,17 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}//ndb/include/mgmapi)
+ 
Index: main/ndb/config/type_ndbapi.cmake
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/config/type_ndbapi.cmake	2007-08-13 11:17:37.978990115 +1000
@@ -0,0 +1,31 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
+                     ${CMAKE_BINARY_DIR}/include
+                     ${CMAKE_BINARY_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/include
+                     ${CMAKE_SOURCE_DIR}/mysys
+                     ${CMAKE_SOURCE_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include/kernel
+                     ${CMAKE_SOURCE_DIR}/ndb/include/transporter
+                     ${CMAKE_SOURCE_DIR}/ndb/include/debugger
+                     ${CMAKE_SOURCE_DIR}/ndb/include/mgmapi
+                     ${CMAKE_SOURCE_DIR}/ndb/include/mgmcommon
+                     ${CMAKE_SOURCE_DIR}/ndb/include/ndbapi
+                     ${CMAKE_SOURCE_DIR}/ndb/include/util
+                     ${CMAKE_SOURCE_DIR}/ndb/include/portlib
+                     ${CMAKE_SOURCE_DIR}/ndb/include/logger)
+ 
Index: main/ndb/config/type_ndbapiclient.cmake
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/config/type_ndbapiclient.cmake	2007-08-13 11:17:38.058994675 +1000
@@ -0,0 +1,17 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/include/ndbapi)
+ 
Index: main/ndb/config/type_ndbapitest.cmake
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/config/type_ndbapitest.cmake	2007-08-13 11:17:38.098996954 +1000
@@ -0,0 +1,33 @@
+ # Copyright (C) 2004, 2006 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ LINK_LIBRARIES(ndbNDBT
+                ndbclient
+                dbug
+                mysys
+                strings
+                ${NDB_SCI_LIBS})
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
+                     ${CMAKE_BINARY_DIR}/include
+                     ${CMAKE_BINARY_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include/ndbapi
+                     ${CMAKE_SOURCE_DIR}/ndb/include/util
+                     ${CMAKE_SOURCE_DIR}/ndb/include/portlib
+                     ${CMAKE_SOURCE_DIR}/ndb/test/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include/mgmapi)
+ 
Index: main/ndb/config/type_ndbapitools.cmake
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/config/type_ndbapitools.cmake	2007-08-13 11:17:38.155000146 +1000
@@ -0,0 +1,34 @@
+ # Copyright (C) 2004, 2006 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ LINK_LIBRARIES(ndbclient
+                dbug
+                mysys
+                strings
+                ${NDB_SCI_LIBS}
+                wsock32)
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
+                     ${CMAKE_BINARY_DIR}/include
+                     ${CMAKE_BINARY_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include/ndbapi
+                     ${CMAKE_SOURCE_DIR}/ndb/include/util
+                     ${CMAKE_SOURCE_DIR}/ndb/include/portlib
+                     ${CMAKE_SOURCE_DIR}/ndb/test/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include/mgmapi
+                     ${CMAKE_SOURCE_DIR}/ndb/include/kernel)
+ 
Index: main/ndb/config/type_util.cmake
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/config/type_util.cmake	2007-08-13 11:17:38.235004705 +1000
@@ -0,0 +1,25 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
+                     ${CMAKE_BINARY_DIR}/include
+                     ${CMAKE_BINARY_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/include
+                     ${CMAKE_SOURCE_DIR}/mysys
+                     ${CMAKE_SOURCE_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include/util
+                     ${CMAKE_SOURCE_DIR}/ndb/include/portlib
+                     ${CMAKE_SOURCE_DIR}/ndb/include/logger)
+ 
Index: main/ndb/include/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/include/CMakeLists.txt	2007-08-13 11:17:38.303008580 +1000
@@ -0,0 +1,34 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ INCLUDE(CheckTypeSize)
+ CHECK_TYPE_SIZE(char NDB_SIZEOF_CHAR)
+ CHECK_TYPE_SIZE(short NDB_SIZEOF_SHORT)
+ CHECK_TYPE_SIZE(int NDB_SIZEOF_INT)
+ CHECK_TYPE_SIZE(long NDB_SIZEOF_LONG)
+ CHECK_TYPE_SIZE("char*" NDB_SIZEOF_CHARP)
+ CHECK_TYPE_SIZE("long long" NDB_SIZEOF_LONG_LONG)
+ 
+ 
+ CONFIGURE_FILE(ndb_global.h.in
+                ${CMAKE_CURRENT_SOURCE_DIR}/ndb_global.h
+                @ONLY)
+ CONFIGURE_FILE(ndb_types.h.in
+                ${CMAKE_CURRENT_SOURCE_DIR}/ndb_types.h
+                @ONLY)
+ CONFIGURE_FILE(ndb_version.h.in
+                ${CMAKE_CURRENT_SOURCE_DIR}/ndb_version.h
+                @ONLY)
+ 
Index: main/ndb/src/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/CMakeLists.txt	2007-08-13 11:17:38.391013595 +1000
@@ -0,0 +1,68 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ ADD_SUBDIRECTORY(common)
+ ADD_SUBDIRECTORY(mgmapi)
+ ADD_SUBDIRECTORY(ndbapi)
+ ADD_SUBDIRECTORY(kernel)
+ ADD_SUBDIRECTORY(mgmclient)
+ ADD_SUBDIRECTORY(mgmsrv)
+ ADD_SUBDIRECTORY(cw)
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+ 
+ IF(WIN32)
+ FILE(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/dummy.cpp "")
+ SET_SOURCE_FILES_PROPERTIES(dummy.cpp PROPERTIES GENERATED TRUE)
+ ADD_LIBRARY(ndbclient STATIC dummy.cpp)
+ ADD_CUSTOM_COMMAND(TARGET ndbclient
+                    POST_BUILD
+                    COMMAND "LIB"
+                    "/OUT:${CMAKE_CURRENT_BINARY_DIR}/ndbclient.lib" 
+                    "${CMAKE_CURRENT_BINARY_DIR}/ndbapi/ndbapi.lib"
+                    "${CMAKE_CURRENT_BINARY_DIR}/common/transporter/ndbtransport.lib"
+                    "${CMAKE_CURRENT_BINARY_DIR}/common/debugger/ndbtrace.lib"
+                   
"${CMAKE_CURRENT_BINARY_DIR}/common/debugger/signaldata/ndbsignaldata.lib"
+                    "${CMAKE_CURRENT_BINARY_DIR}/mgmapi/ndbmgmapi.lib"
+                    "${CMAKE_CURRENT_BINARY_DIR}/common/mgmcommon/ndbmgmsrv.lib"
+                    "${CMAKE_CURRENT_BINARY_DIR}/common/logger/ndblogger.lib"
+                    "${CMAKE_CURRENT_BINARY_DIR}/common/portlib/ndbportlib.lib"
+                    "${CMAKE_CURRENT_BINARY_DIR}/common/util/ndbgeneral.lib")
+ ADD_DEPENDENCIES(ndbclient
+                  ndbapi
+                  ndbtransport
+                  ndbtrace
+                  ndbsignaldata
+                  ndbmgmapi
+                  ndbmgmsrv
+                  ndblogger
+                  ndbportlib
+                  ndbgeneral)
+ 
+ ELSE(WIN32)
+ ADD_LIBRARY(ndbclient SHARED dll.cpp)
+ TARGET_LINK_LIBRARIES(ndbclient
+                       ndbapi
+                       ndbtransport
+                       ndbtrace
+                       ndbsignaldata
+                       ndbmgmapi
+                       ndbmgmsrv
+                       ndblogger
+                       ndbportlib
+                       ndbgeneral)
+ ENDIF(WIN32)
+ 
Index: main/ndb/src/common/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/common/CMakeLists.txt	2007-08-13 11:17:38.447016787 +1000
@@ -0,0 +1,24 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ ADD_SUBDIRECTORY(portlib)
+ ADD_SUBDIRECTORY(debugger)
+ ADD_SUBDIRECTORY(util)
+ ADD_SUBDIRECTORY(logger)
+ ADD_SUBDIRECTORY(transporter)
+ ADD_SUBDIRECTORY(mgmcommon)
+ 
+ 
Index: main/ndb/src/common/debugger/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/common/debugger/CMakeLists.txt	2007-08-13 11:17:38.507020206 +1000
@@ -0,0 +1,28 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ ADD_SUBDIRECTORY(signaldata)
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbtrace STATIC
+             SignalLoggerManager.cpp
+             DebuggerNames.cpp
+             BlockNames.cpp
+             EventLogger.cpp
+             GrepError.cpp)
+ 
+ 
Index: main/ndb/src/common/debugger/signaldata/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/common/debugger/signaldata/CMakeLists.txt	2007-08-13 11:17:38.571023853
+1000
@@ -0,0 +1,44 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapi.cmake)
+ 
+ ADD_LIBRARY(ndbsignaldata STATIC
+         TcKeyReq.cpp TcKeyConf.cpp TcKeyRef.cpp
+         TcRollbackRep.cpp
+         TupKey.cpp TupCommit.cpp LqhKey.cpp
+         FsOpenReq.cpp FsCloseReq.cpp FsRef.cpp FsConf.cpp FsReadWriteReq.cpp
+         SignalDataPrint.cpp SignalNames.cpp
+         ContinueB.cpp DihContinueB.cpp NdbfsContinueB.cpp
+         CloseComReqConf.cpp PackedSignal.cpp PrepFailReqRef.cpp
+         GCPSave.cpp DictTabInfo.cpp
+         AlterTable.cpp AlterTab.cpp
+         CreateTrig.cpp AlterTrig.cpp DropTrig.cpp
+         FireTrigOrd.cpp TrigAttrInfo.cpp
+         CreateIndx.cpp AlterIndx.cpp DropIndx.cpp TcIndx.cpp
+         IndxKeyInfo.cpp IndxAttrInfo.cpp
+         FsAppendReq.cpp ScanTab.cpp
+         BackupImpl.cpp BackupSignalData.cpp
+         UtilSequence.cpp UtilPrepare.cpp UtilDelete.cpp UtilExecute.cpp
+         LqhFrag.cpp DropTab.cpp PrepDropTab.cpp LCP.cpp MasterLCP.cpp
+         CopyGCI.cpp SystemError.cpp StartRec.cpp NFCompleteRep.cpp
+         FailRep.cpp DisconnectRep.cpp SignalDroppedRep.cpp
+         SumaImpl.cpp NdbSttor.cpp CreateFragmentation.cpp
+         UtilLock.cpp TuxMaint.cpp AccLock.cpp
+         LqhTrans.cpp ReadNodesConf.cpp CntrStart.cpp
+         ScanFrag.cpp )
+ 
+ 
Index: main/ndb/src/common/logger/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/common/logger/CMakeLists.txt	2007-08-13 11:17:38.623026817 +1000
@@ -0,0 +1,25 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapi.cmake)
+ 
+ ADD_LIBRARY(ndblogger STATIC
+             Logger.cpp
+             LogHandlerList.cpp
+             LogHandler.cpp
+             ConsoleLogHandler.cpp
+             FileLogHandler.cpp)
+ 
Index: main/ndb/src/common/mgmcommon/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/common/mgmcommon/CMakeLists.txt	2007-08-13 11:17:38.647028185 +1000
@@ -0,0 +1,26 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/src/mgmapi 
+                     ${CMAKE_SOURCE_DIR}/ndb/src/mgmsrv)
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapi.cmake)
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_mgmapiclient.cmake)
+ 
+ ADD_LIBRARY(ndbmgmsrv STATIC
+             ConfigRetriever.cpp
+             IPCConfig.cpp)
+ 
+ 
Index: main/ndb/src/common/portlib/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/common/portlib/CMakeLists.txt	2007-08-13 11:17:38.703031376 +1000
@@ -0,0 +1,42 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_BINARY_DIR}/ndb/config/type_util.cmake)
+ 
+ IF(WIN32)
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x400)
+ ENDIF(WIN32)
+ 
+ ADD_LIBRARY(ndbportlib STATIC
+             NdbCondition.c NdbMutex.c NdbSleep.c NdbTick.c
+             NdbEnv.c NdbThread.c NdbHost.c NdbTCP.cpp
+             NdbDaemon.c NdbMem.c
+             NdbConfig.c)
+ 
+ #            win32/NdbCondition.c win32/NdbDaemon.c win32/NdbEnv.c
+ #            win32/NdbHost.c win32/NdbMem.c  win32/NdbMutex.c
+ #            win32/NdbSleep.c win32/NdbTCP.c win32/NdbThread.c
+ #            win32/NdbTick.c)
+         
+ #ADD_EXECUTABLE(memtest memtest.c)
+ #TARGET_LINK_LIBRARIES(memtest ndbportlib wsock32)
+ 
+ #ADD_EXECUTABLE(PortLibTest NdbPortLibTest.cpp)
+ #TARGET_LINK_LIBRARIES(PortLibTest ndbportlib wsock32)
+ 
+ #ADD_EXECUTABLE(munmaptest munmaptest.cpp)
+ #TARGET_LINK_LIBRARIES(munmaptest ndbportlib wsock32)
+ 
Index: main/ndb/src/common/transporter/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/common/transporter/CMakeLists.txt	2007-08-13 11:17:38.723032516 +1000
@@ -0,0 +1,29 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_util.cmake)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/include/mgmapi 
+                     ${CMAKE_SOURCE_DIR}/ndb/src/mgmapi
+                     ${CMAKE_SOURCE_DIR}/ndb/include/debugger
+                     ${CMAKE_SOURCE_DIR}/ndb/include/kernel
+                     ${CMAKE_SOURCE_DIR}/ndb/include/transporter
+                     ${NDB_SCI_INCLUDES})
+ 
+ ADD_LIBRARY(ndbtransport STATIC
+             Transporter.cpp SendBuffer.cpp TCP_Transporter.cpp
+             TransporterRegistry.cpp Packer.cpp)
+ 
+ 
Index: main/ndb/src/common/util/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/common/util/CMakeLists.txt	2007-08-13 11:17:38.747033884 +1000
@@ -0,0 +1,51 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
+                     ${CMAKE_BINARY_DIR}/include
+                     ${CMAKE_BINARY_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/include
+                     ${CMAKE_SOURCE_DIR}/mysys
+                     ${CMAKE_SOURCE_DIR}/ndb/include
+                     ${CMAKE_SOURCE_DIR}/ndb/include/util
+                     ${CMAKE_SOURCE_DIR}/ndb/include/portlib
+                     ${CMAKE_SOURCE_DIR}/ndb/include/logger)
+ 
+ ADD_LIBRARY(ndbgeneral STATIC
+             File.cpp
+             md5_hash.cpp
+             Properties.cpp
+             socket_io.cpp
+             SimpleProperties.cpp
+             Parser.cpp
+             InputStream.cpp
+             SocketServer.cpp
+             SocketClient.cpp
+             SocketAuthenticator.cpp
+             OutputStream.cpp
+             NdbOut.cpp
+             BaseString.cpp
+             NdbSqlUtil.cpp
+             new.cpp
+             uucode.c
+             random.c
+             version.c
+             strdup.c
+             ConfigValues.cpp
+             ndb_init.c
+             basestring_vsnprintf.c
+             Bitmask.cpp)
+ 
Index: main/ndb/src/kernel/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/CMakeLists.txt	2007-08-13 11:17:38.779035707 +1000
@@ -0,0 +1,76 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ ADD_SUBDIRECTORY(error)
+ ADD_SUBDIRECTORY(blocks)
+ ADD_SUBDIRECTORY(vm)
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/blocks/cmvmi
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/dbacc
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/dbdict
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/dbdih
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/dblqh
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/dbtc
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/dbtup
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/ndbfs
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/ndbcntr
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/qmgr
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/trix
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/backup
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/dbutil
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/suma
+                     ${CMAKE_CURRENT_SOURCE_DIR}/blocks/dbtux)
+ 
+ 
+ ADD_EXECUTABLE(ndbd
+                main.cpp
+                SimBlockList.cpp)
+ 
+ TARGET_LINK_LIBRARIES(ndbd
+                       ndbcmvmi
+                       ndbdbacc
+                       ndbdbdict
+                       ndbdbdih
+                       ndbdblqh
+                       ndbdbtc
+                       ndbdbtup
+                       ndbndbfs
+                       ndbndbcntr
+                       ndbqmgr
+                       ndbtrix
+                       ndbbackup
+                       ndbdbutil
+                       ndbsuma
+                       ndbdbtux
+                       ndbkernel
+                       ndberror
+                       ndbtransport
+                       ndbtrace
+                       ndbsignaldata
+                       ndblogger
+                       ndbmgmsrv
+                       ndbmgmapi
+                       ndbportlib
+                       ndbgeneral
+                       dbug
+                       mysys
+                       strings
+                       ${NDB_SCI_LIBS}
+                       wsock32)
+         
+ 
Index: main/ndb/src/kernel/blocks/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/CMakeLists.txt	2007-08-13 11:17:38.811037531 +1000
@@ -0,0 +1,33 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ ADD_SUBDIRECTORY(cmvmi)
+ ADD_SUBDIRECTORY(dbacc)
+ ADD_SUBDIRECTORY(dbdict)
+ ADD_SUBDIRECTORY(dbdih)
+ ADD_SUBDIRECTORY(dblqh)
+ ADD_SUBDIRECTORY(dbtc)
+ ADD_SUBDIRECTORY(dbtup)
+ ADD_SUBDIRECTORY(ndbfs)
+ ADD_SUBDIRECTORY(ndbcntr)
+ ADD_SUBDIRECTORY(qmgr)
+ ADD_SUBDIRECTORY(trix)
+ ADD_SUBDIRECTORY(backup)
+ ADD_SUBDIRECTORY(dbutil)
+ ADD_SUBDIRECTORY(suma)
+ ADD_SUBDIRECTORY(dbtux)
+ 
+ 
Index: main/ndb/src/kernel/blocks/backup/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/backup/CMakeLists.txt	2007-08-13 11:17:38.843039355 +1000
@@ -0,0 +1,21 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbbackup STATIC
+             Backup.cpp BackupInit.cpp)
+ 
Index: main/ndb/src/kernel/blocks/cmvmi/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/cmvmi/CMakeLists.txt	2007-08-13 11:17:38.871040950 +1000
@@ -0,0 +1,21 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbcmvmi STATIC
+             Cmvmi.cpp)
+ 
Index: main/ndb/src/kernel/blocks/dbacc/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/dbacc/CMakeLists.txt	2007-08-13 11:17:38.895042318 +1000
@@ -0,0 +1,22 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/src/kernel/blocks/dbtup)
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbdbacc STATIC
+             DbaccInit.cpp DbaccMain.cpp)
+ 
Index: main/ndb/src/kernel/blocks/dbdict/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/dbdict/CMakeLists.txt	2007-08-13 11:17:38.915043458 +1000
@@ -0,0 +1,31 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ LINK_LIBRARIES(ndbgeneral
+                ndbportlib
+                dbug
+                mysys
+                strings
+                wsock32) 
+ 
+ ADD_LIBRARY(ndbdbdict STATIC
+             Dbdict.cpp)
+ 
+ ADD_EXECUTABLE(printSchemaFile
+                printSchemaFile.cpp)
+ 
Index: main/ndb/src/kernel/blocks/dbdih/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/dbdih/CMakeLists.txt	2007-08-13 11:17:38.935044598 +1000
@@ -0,0 +1,29 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ LINK_LIBRARIES(ndbgeneral
+                ndbportlib
+                wsock32) 
+ 
+ ADD_LIBRARY(ndbdbdih STATIC
+             DbdihInit.cpp
+             DbdihMain.cpp)
+ 
+ ADD_EXECUTABLE(ndbd_sysfile_reader
+                printSysfile/printSysfile.cpp)
+ 
Index: main/ndb/src/kernel/blocks/dblqh/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/dblqh/CMakeLists.txt	2007-08-13 11:17:38.963046194 +1000
@@ -0,0 +1,29 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ LINK_LIBRARIES(ndbgeneral
+                ndbportlib
+                wsock32)
+ 
+ ADD_LIBRARY(ndbdblqh STATIC
+             DblqhInit.cpp DblqhMain.cpp)
+ 
+ ADD_EXECUTABLE(ndbd_redo_log_reader
+                redoLogReader/records.cpp
+                redoLogReader/redoLogFileReader.cpp)
+ 
Index: main/ndb/src/kernel/blocks/dbtc/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/dbtc/CMakeLists.txt	2007-08-13 11:17:38.995048017 +1000
@@ -0,0 +1,22 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbdbtc
+             DbtcInit.cpp
+             DbtcMain.cpp)
+ 
Index: main/ndb/src/kernel/blocks/dbtup/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/dbtup/CMakeLists.txt	2007-08-13 11:17:39.027049841 +1000
@@ -0,0 +1,39 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbdbtup STATIC
+             DbtupExecQuery.cpp
+             DbtupBuffer.cpp
+             DbtupRoutines.cpp
+             DbtupCommit.cpp
+             DbtupFixAlloc.cpp
+             DbtupTrigger.cpp
+             DbtupAbort.cpp
+             DbtupLCP.cpp
+             DbtupUndoLog.cpp
+             DbtupPageMap.cpp
+             DbtupPagMan.cpp
+             DbtupStoredProcDef.cpp
+             DbtupMeta.cpp
+             DbtupTabDesMan.cpp
+ 	    DbtupGen.cpp
+             DbtupSystemRestart.cpp
+ 	    DbtupIndex.cpp
+ 	    DbtupScan.cpp
+             DbtupDebug.cpp)
+ 
Index: main/ndb/src/kernel/blocks/dbtux/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/dbtux/CMakeLists.txt	2007-08-13 11:17:39.047050981 +1000
@@ -0,0 +1,31 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/src/kernel/blocks/dbtup)
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbdbtux STATIC
+             DbtuxGen.cpp
+             DbtuxMeta.cpp
+             DbtuxMaint.cpp
+             DbtuxNode.cpp
+             DbtuxTree.cpp
+             DbtuxScan.cpp
+             DbtuxSearch.cpp
+             DbtuxCmp.cpp
+             DbtuxDebug.cpp)
+ 
+ 
Index: main/ndb/src/kernel/blocks/dbutil/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/dbutil/CMakeLists.txt	2007-08-13 11:17:39.071052348 +1000
@@ -0,0 +1,21 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbdbutil STATIC
+             DbUtil.cpp)
+ 
Index: main/ndb/src/kernel/blocks/ndbcntr/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/ndbcntr/CMakeLists.txt	2007-08-13 11:17:39.095053716 +1000
@@ -0,0 +1,23 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbndbcntr STATIC
+             NdbcntrInit.cpp
+             NdbcntrSysTable.cpp
+             NdbcntrMain.cpp)
+ 
Index: main/ndb/src/kernel/blocks/ndbfs/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/ndbfs/CMakeLists.txt	2007-08-13 11:17:39.127055540 +1000
@@ -0,0 +1,25 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbndbfs STATIC
+ 	    AsyncFile.cpp
+ 	    Ndbfs.cpp
+             VoidFs.cpp
+ 	    Filename.cpp
+ 	    CircularIndex.cpp)
+ 
Index: main/ndb/src/kernel/blocks/qmgr/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/qmgr/CMakeLists.txt	2007-08-13 11:17:39.155057136 +1000
@@ -0,0 +1,21 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbqmgr STATIC
+             QmgrInit.cpp QmgrMain.cpp)
+ 
Index: main/ndb/src/kernel/blocks/suma/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/suma/CMakeLists.txt	2007-08-13 11:17:39.171058047 +1000
@@ -0,0 +1,21 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbsuma STATIC
+             Suma.cpp SumaInit.cpp)
+ 
Index: main/ndb/src/kernel/blocks/trix/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/blocks/trix/CMakeLists.txt	2007-08-13 11:17:39.195059415 +1000
@@ -0,0 +1,21 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbtrix STATIC
+             Trix.cpp)
+ 
Index: main/ndb/src/kernel/error/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/error/CMakeLists.txt	2007-08-13 11:17:39.227061239 +1000
@@ -0,0 +1,23 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndberror STATIC
+             TimeModule.cpp
+             ErrorReporter.cpp
+             ndbd_exit_codes.c)
+ 
Index: main/ndb/src/kernel/vm/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/kernel/vm/CMakeLists.txt	2007-08-13 11:17:39.255062835 +1000
@@ -0,0 +1,36 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/src/mgmapi)
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_kernel.cmake)
+ 
+ ADD_LIBRARY(ndbkernel STATIC
+             SimulatedBlock.cpp
+             FastScheduler.cpp
+             TimeQueue.cpp
+             VMSignal.cpp
+             ThreadConfig.cpp
+             TransporterCallback.cpp
+             Emulator.cpp
+             Configuration.cpp
+             WatchDog.cpp
+             SimplePropertiesSection.cpp
+             SectionReader.cpp
+             MetaData.cpp
+             Mutex.cpp
+             SafeCounter.cpp
+             ndbd_malloc.cpp)
+ 
Index: main/ndb/src/mgmapi/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/mgmapi/CMakeLists.txt	2007-08-13 11:17:39.287064658 +1000
@@ -0,0 +1,26 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_util.cmake)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/include/mgmapi)
+ 
+ ADD_LIBRARY(ndbmgmapi STATIC
+             mgmapi.cpp
+             ndb_logevent.cpp
+             mgmapi_configuration.cpp
+             LocalConfig.cpp
+             ${CMAKE_SOURCE_DIR}/ndb/src/kernel/error/ndbd_exit_codes.c)
+ 
Index: main/ndb/src/mgmclient/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/mgmclient/CMakeLists.txt	2007-08-13 11:17:39.315066254 +1000
@@ -0,0 +1,35 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapi.cmake)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/include/mgmapi
+                     ${CMAKE_SOURCE_DIR}/ndb/src/common/mgmcommon)
+ 
+ ADD_LIBRARY(ndbmgmclient STATIC
+             CommandInterpreter.cpp)
+ 
+ LINK_LIBRARIES(ndbmgmclient
+                ndbmgmapi
+                ndblogger
+                ndbportlib
+                ndbgeneral
+                dbug
+                mysys
+                strings
+                wsock32)
+ 
+ ADD_EXECUTABLE(ndb_mgm
+                main.cpp)
+ 
Index: main/ndb/src/mgmsrv/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/mgmsrv/CMakeLists.txt	2007-08-13 11:17:39.347068078 +1000
@@ -0,0 +1,43 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapi.cmake)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/src/ndbapi
+                     ${CMAKE_SOURCE_DIR}/ndb/src/mgmapi
+                     ${CMAKE_SOURCE_DIR}/ndb/src/common/mgmcommon
+                     ${CMAKE_SOURCE_DIR}/ndb/src/mgmclient)
+ 
+ LINK_LIBRARIES(ndbmgmclient
+                ndbclient
+                dbug
+                mysys
+                strings
+                ${NDB_SCI_LIBS}
+                wsock32)
+ 
+ ADD_EXECUTABLE(ndb_mgmd
+                MgmtSrvr.cpp
+                MgmtSrvrGeneralSignalHandling.cpp
+                main.cpp
+                Services.cpp
+                convertStrToInt.cpp
+                SignalQueue.cpp
+                MgmtSrvrConfig.cpp
+                ConfigInfo.cpp
+                InitConfigFileParser.cpp
+                Config.cpp)
+ 
+ 
Index: main/ndb/src/ndbapi/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/src/ndbapi/CMakeLists.txt	2007-08-13 11:17:39.375069673 +1000
@@ -0,0 +1,54 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapi.cmake)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/src/mgmapi)
+ 
+ ADD_LIBRARY(ndbapi STATIC
+             TransporterFacade.cpp
+             ClusterMgr.cpp
+             Ndb.cpp
+             NdbPoolImpl.cpp
+             NdbPool.cpp
+             Ndblist.cpp
+             Ndbif.cpp
+             Ndbinit.cpp
+             Ndberr.cpp
+             ndberror.c
+             NdbErrorOut.cpp
+             NdbTransaction.cpp
+             NdbTransactionScan.cpp
+             NdbOperation.cpp
+             NdbOperationSearch.cpp
+             NdbOperationScan.cpp
+             NdbOperationInt.cpp
+             NdbOperationDefine.cpp
+             NdbOperationExec.cpp
+             NdbScanOperation.cpp
+             NdbScanFilter.cpp
+             NdbIndexOperation.cpp
+             NdbApiSignal.cpp
+             NdbRecAttr.cpp
+             NdbUtil.cpp
+             NdbReceiver.cpp
+             NdbDictionary.cpp
+             NdbDictionaryImpl.cpp
+             DictCache.cpp
+             ndb_cluster_connection.cpp
+             NdbBlob.cpp
+             SignalSender.cpp
+             ObjectMap.cpp)
+ 
Index: main/ndb/test/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/test/CMakeLists.txt	2007-08-13 11:17:39.415071953 +1000
@@ -0,0 +1,20 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ ADD_SUBDIRECTORY(src)
+ ADD_SUBDIRECTORY(tools)
+ ADD_SUBDIRECTORY(ndbapi)
+ ADD_SUBDIRECTORY(run-test)
+ 
Index: main/ndb/test/ndbapi/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/test/ndbapi/CMakeLists.txt	2007-08-13 11:17:39.447073777 +1000
@@ -0,0 +1,71 @@
+ # Copyright (C) 2004-2006 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ ADD_SUBDIRECTORY(bank)
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapitest.cmake)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/include/kernel)
+ 
+ ADD_EXECUTABLE(create_all_tabs create_all_tabs.cpp)
+ ADD_EXECUTABLE(create_tab create_tab.cpp)
+ ADD_EXECUTABLE(drop_all_tabs drop_all_tabs.cpp)
+ ADD_EXECUTABLE(flexAsynch flexAsynch.cpp)
+ ADD_EXECUTABLE(flexBench flexBench.cpp)
+ ADD_EXECUTABLE(flexHammer flexHammer.cpp)
+ ADD_EXECUTABLE(flexTT flexTT.cpp)
+ #flexTimedAsynch_SOURCES = flexTimedAsynch.cpp
+ #flex_bench_mysql_SOURCES = flex_bench_mysql.cpp
+ ADD_EXECUTABLE(testBackup testBackup.cpp)
+ ADD_EXECUTABLE(testBasic testBasic.cpp)
+ ADD_EXECUTABLE(testBasicAsynch testBasicAsynch.cpp)
+ ADD_EXECUTABLE(testBlobs testBlobs.cpp)
+ ADD_EXECUTABLE(testDataBuffers testDataBuffers.cpp)
+ ADD_EXECUTABLE(testDict testDict.cpp)
+ ADD_EXECUTABLE(testIndex testIndex.cpp)
+ ADD_EXECUTABLE(testMgm testMgm.cpp)
+ ADD_EXECUTABLE(testNdbApi testNdbApi.cpp)
+ ADD_EXECUTABLE(testNodeRestart testNodeRestart.cpp)
+ ADD_EXECUTABLE(testOIBasic testOIBasic.cpp)
+ ADD_EXECUTABLE(testOperations testOperations.cpp)
+ ADD_EXECUTABLE(testRestartGci testRestartGci.cpp)
+ ADD_EXECUTABLE(testScan testScan.cpp ScanFunctions.hpp)
+ ADD_EXECUTABLE(testInterpreter testInterpreter.cpp)
+ ADD_EXECUTABLE(testScanFilter testScanFilter.cpp)
+ ADD_EXECUTABLE(testScanInterpreter testScanInterpreter.cpp ScanFilter.hpp
ScanInterpretTest.hpp )
+ ADD_EXECUTABLE(testScanPerf testScanPerf.cpp)
+ ADD_EXECUTABLE(testSystemRestart testSystemRestart.cpp)
+ ADD_EXECUTABLE(testTimeout testTimeout.cpp)
+ ADD_EXECUTABLE(testTransactions testTransactions.cpp)
+ ADD_EXECUTABLE(testDeadlock testDeadlock.cpp)
+ ADD_EXECUTABLE(test_event test_event.cpp)
+ ADD_EXECUTABLE(ndbapi_slow_select slow_select.cpp)
+ ADD_EXECUTABLE(testReadPerf testReadPerf.cpp)
+ ADD_EXECUTABLE(testLcp testLcp.cpp)
+ ADD_EXECUTABLE(testPartitioning testPartitioning.cpp)
+ ADD_EXECUTABLE(testBitfield testBitfield.cpp)
+ ADD_EXECUTABLE(DbCreate bench/mainPopulate.cpp bench/dbPopulate.cpp
bench/userInterface.cpp bench/dbPopulate.h bench/userInterface.h bench/testData.h
bench/testDefinitions.h bench/ndb_schema.hpp bench/ndb_error.hpp)
+ ADD_EXECUTABLE(DbAsyncGenerator bench/mainAsyncGenerator.cpp bench/asyncGenerator.cpp
bench/ndb_async2.cpp bench/dbGenerator.h bench/macros.h bench/userInterface.h
bench/testData.h bench/testDefinitions.h bench/ndb_schema.hpp bench/ndb_error.hpp)
+ ADD_EXECUTABLE(test_event_multi_table test_event_multi_table.cpp)
+ ADD_EXECUTABLE(testSRBank testSRBank.cpp)
+ ADD_EXECUTABLE(test_event_merge test_event_merge.cpp)
+ 
+ ##testDict_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel
+ ##testIndex_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel
+ ##testSystemRestart_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel
+ ##testTransactions_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel
+ TARGET_LINK_LIBRARIES(testBackup ndbbank)
+ TARGET_LINK_LIBRARIES(testSRBank ndbbank)
+ 
+ 
Index: main/ndb/test/ndbapi/bank/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/test/ndbapi/bank/CMakeLists.txt	2007-08-13 11:17:39.475075372 +1000
@@ -0,0 +1,35 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapitest.cmake)
+ 
+ ADD_LIBRARY(ndbbank STATIC
+             Bank.cpp BankLoad.cpp)
+ 
+ ADD_EXECUTABLE(testBank testBank.cpp)
+ TARGET_LINK_LIBRARIES(testBank ndbbank)
+ ADD_EXECUTABLE(bankSumAccounts bankSumAccounts.cpp)
+ TARGET_LINK_LIBRARIES(bankSumAccounts ndbbank)
+ ADD_EXECUTABLE(bankValidateAllGLs bankValidateAllGLs.cpp)
+ TARGET_LINK_LIBRARIES(bankValidateAllGLs ndbbank)
+ ADD_EXECUTABLE(bankMakeGL bankMakeGL.cpp)
+ TARGET_LINK_LIBRARIES(bankMakeGL ndbbank)
+ ADD_EXECUTABLE(bankTransactionMaker bankTransactionMaker.cpp)
+ TARGET_LINK_LIBRARIES(bankTransactionMaker ndbbank)
+ ADD_EXECUTABLE(bankCreator bankCreator.cpp)
+ TARGET_LINK_LIBRARIES(bankCreator ndbbank)
+ ADD_EXECUTABLE(bankTimer bankTimer.cpp)
+ TARGET_LINK_LIBRARIES(bankTimer ndbbank)
+ 
Index: main/ndb/test/ndbapi/old_dirs/flexBench/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/test/ndbapi/old_dirs/flexBench/CMakeLists.txt	2007-08-13 11:17:39.507077196
+1000
@@ -0,0 +1,22 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapitest.cmake)
+ 
+ ADD_EXECUTABLE(flexBench
+                flexBench.cpp)
+ 
+ 
Index: main/ndb/test/src/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/test/src/CMakeLists.txt	2007-08-13 11:17:39.539079020 +1000
@@ -0,0 +1,46 @@
+ # Copyright (C) 2004 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/test/include
+                     ${CMAKE_SOURCE_DIR}/ndb/src/common/mgmcommon
+                     ${CMAKE_SOURCE_DIR}/ndb/include/mgmcommon
+                     ${CMAKE_SOURCE_DIR}/ndb/include/kernel
+                     ${CMAKE_SOURCE_DIR}/ndb/src/mgmapi)
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapitest.cmake)
+ 
+ ADD_LIBRARY(ndbNDBT STATIC
+         NDBT_ReturnCodes.cpp
+         NDBT_Error.cpp
+         NDBT_Tables.cpp
+         NDBT_ResultRow.cpp
+         NDBT_Test.cpp
+         HugoCalculator.cpp
+         HugoOperations.cpp
+         HugoTransactions.cpp
+         HugoAsynchTransactions.cpp
+         UtilTransactions.cpp
+         NdbRestarter.cpp
+         NdbRestarts.cpp
+         NDBT_Output.cpp
+         NdbBackup.cpp
+         NdbConfig.cpp
+         NdbGrep.cpp
+         NDBT_Table.cpp
+         NdbSchemaCon.cpp
+         NdbSchemaOp.cpp
+         getarg.c
+         CpcClient.cpp)
+ 
+ 
Index: main/ndb/test/tools/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/test/tools/CMakeLists.txt	2007-08-13 11:17:39.571080843 +1000
@@ -0,0 +1,34 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapitest.cmake)
+ 
+ ADD_EXECUTABLE(hugoFill hugoFill.cpp)
+ ADD_EXECUTABLE(hugoLoad hugoLoad.cpp)
+ ADD_EXECUTABLE(hugoLockRecords hugoLockRecords.cpp)
+ ADD_EXECUTABLE(hugoPkDelete hugoPkDelete.cpp)
+ ADD_EXECUTABLE(hugoPkRead hugoPkRead.cpp)
+ ADD_EXECUTABLE(hugoPkReadRecord hugoPkReadRecord.cpp)
+ ADD_EXECUTABLE(hugoPkUpdate hugoPkUpdate.cpp)
+ ADD_EXECUTABLE(hugoScanRead hugoScanRead.cpp)
+ ADD_EXECUTABLE(hugoScanUpdate hugoScanUpdate.cpp)
+ ADD_EXECUTABLE(restart restart.cpp)
+ #ADD_EXECUTABLE(transproxy transproxy.cpp)
+ ADD_EXECUTABLE(verify_index verify_index.cpp)
+ ADD_EXECUTABLE(copy_tab copy_tab.cpp)
+ ADD_EXECUTABLE(create_index create_index.cpp)
+ ADD_EXECUTABLE(ndb_cpcc cpcc.cpp)
+ 
Index: main/ndb/tools/CMakeLists.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ main/ndb/tools/CMakeLists.txt	2007-08-13 11:17:39.603082667 +1000
@@ -0,0 +1,71 @@
+ # Copyright (C) 2007 MySQL AB
+ # 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; version 2 of the License.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ 
+ INCLUDE(${CMAKE_SOURCE_DIR}/ndb/config/type_ndbapitools.cmake)
+ 
+ SET(NDBTOOLS_COMMON_SOURCES
+     ${CMAKE_SOURCE_DIR}/ndb/test/src/NDBT_ReturnCodes.cpp
+     ${CMAKE_SOURCE_DIR}/ndb/test/src/NDBT_Table.cpp
+     ${CMAKE_SOURCE_DIR}/ndb/test/src/NDBT_Output.cpp)
+ 
+ ADD_EXECUTABLE(ndb_test_platform
+                ndb_test_platform.cpp)
+ ADD_EXECUTABLE(ndb_waiter
+                waiter.cpp
+                ${NDBTOOLS_COMMON_SOURCES})
+ ADD_EXECUTABLE(ndb_drop_table
+                drop_tab.cpp
+                ${NDBTOOLS_COMMON_SOURCES})
+ ADD_EXECUTABLE(ndb_delete_all
+                delete_all.cpp
+                ${NDBTOOLS_COMMON_SOURCES})
+ ADD_EXECUTABLE(ndb_desc
+                desc.cpp
+                ${NDBTOOLS_COMMON_SOURCES})
+ ADD_EXECUTABLE(ndb_drop_index
+                drop_index.cpp
+                ${NDBTOOLS_COMMON_SOURCES})
+ ADD_EXECUTABLE(ndb_show_tables
+                listTables.cpp
+                ${NDBTOOLS_COMMON_SOURCES})
+ ADD_EXECUTABLE(ndb_select_all
+                select_all.cpp
+                ${CMAKE_SOURCE_DIR}/ndb/test/src/NDBT_ResultRow.cpp
+                ${NDBTOOLS_COMMON_SOURCES})
+ ADD_EXECUTABLE(ndb_select_count
+                select_count.cpp
+                ${NDBTOOLS_COMMON_SOURCES})
+ ADD_EXECUTABLE(ndb_restore
+                restore/restore_main.cpp
+                restore/consumer.cpp
+                restore/consumer_restore.cpp
+                restore/consumer_printer.cpp
+                restore/Restore.cpp
+                ${CMAKE_SOURCE_DIR}/ndb/test/src/NDBT_ResultRow.cpp
+                ${NDBTOOLS_COMMON_SOURCES})
+ ADD_EXECUTABLE(ndb_config
+                ndb_config.cpp
+                ${CMAKE_SOURCE_DIR}/ndb/src/mgmsrv/Config.cpp
+                ${CMAKE_SOURCE_DIR}/ndb/src/mgmsrv/ConfigInfo.cpp
+                ${CMAKE_SOURCE_DIR}/ndb/src/mgmsrv/InitConfigFileParser.cpp)
+ SET(options "-I${CMAKE_SOURCE_DIR}/ndb/src/mgmapi")
+ SET(options "${options} -I${CMAKE_SOURCE_DIR}/ndb/src/mgmsrv")
+ SET(options "${options} -I${CMAKE_SOURCE_DIR}/ndb/include/mgmcommon")
+ #SET(options "${options} -DMYSQLCLUSTERDIR=\"\\\"\\\"\"")
+ SET_TARGET_PROPERTIES(ndb_config PROPERTIES
+                       COMPILE_FLAGS "${options}")
+ 
+ 
Index: main/CMakeLists.txt
===================================================================
--- main.orig/CMakeLists.txt	2007-08-13 11:16:19.414512981 +1000
+++ main/CMakeLists.txt	2007-08-13 11:22:16.142841770 +1000
@@ -14,14 +14,20 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 PROJECT(MySql)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
 # This reads user configuration, generated by configure.js.
-INCLUDE(win/configure.data)
+INCLUDE(win/configure.data OPTIONAL)
+
+IF(NOT EXISTS win/configure.data)
+INCLUDE(config.cmake)
+ENDIF(NOT EXISTS win/configure.data)
 
 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
                ${CMAKE_SOURCE_DIR}/include/mysql_version.h @ONLY)
 
 # Set standard options
+ADD_DEFINITIONS(-DWITH_MYISAM_STORAGE_ENGINE)
 ADD_DEFINITIONS(-DCMAKE_BUILD)
 ADD_DEFINITIONS(-DHAVE_YASSL)
 
@@ -54,6 +60,13 @@ IF(WITH_INNOBASE_STORAGE_ENGINE)
   ADD_DEFINITIONS(-DHAVE_INNOBASE_DB)
 ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
 
+IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
+  ADD_DEFINITIONS(-DHAVE_NDBCLUSTER_DB)
+  ADD_DEFINITIONS(-DWITH_NDBCLUSTER_STORAGE_ENGINE)
+  SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_ndbcluster_plugin")
+  SET(WITH_PARTITION_STORAGE_ENGINE TRUE)
+ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
+
 SET(localstatedir "C:\\mysql\\data")
 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-huge.cnf.sh
                ${CMAKE_SOURCE_DIR}/support-files/my-huge.ini @ONLY)
@@ -194,6 +207,9 @@ ENDIF(WITH_BERKELEY_STORAGE_ENGINE)
 IF(WITH_INNOBASE_STORAGE_ENGINE)
   ADD_SUBDIRECTORY(innobase)
 ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
+IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
+  ADD_SUBDIRECTORY(ndb)
+ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
 ADD_SUBDIRECTORY(sql)
 ADD_SUBDIRECTORY(sql/examples)
 ADD_SUBDIRECTORY(server-tools/instance-manager)
Index: main/extra/CMakeLists.txt
===================================================================
--- main.orig/extra/CMakeLists.txt	2007-08-13 11:16:20.402569287 +1000
+++ main/extra/CMakeLists.txt	2007-08-13 11:17:39.671086542 +1000
@@ -18,6 +18,11 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_F
 SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ndb/include
+                    ${CMAKE_SOURCE_DIR}/ndb/include/ndbapi
+                    ${CMAKE_SOURCE_DIR}/ndb/include/mgmapi)
+ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
 
 ADD_EXECUTABLE(comp_err comp_err.c)
 TARGET_LINK_LIBRARIES(comp_err debug dbug mysys strings zlib wsock32)
Index: main/sql/CMakeLists.txt
===================================================================
--- main.orig/sql/CMakeLists.txt	2007-08-13 11:16:21.034605305 +1000
+++ main/sql/CMakeLists.txt	2007-08-13 11:20:03.563286492 +1000
@@ -28,6 +28,12 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/
                     ${CMAKE_SOURCE_DIR}/bdb/build_win32
                     ${CMAKE_SOURCE_DIR}/bdb/dbinc)
 
+IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
+  INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ndb/include
+                      ${CMAKE_SOURCE_DIR}/ndb/include
+                      ${CMAKE_SOURCE_DIR}/ndb/include/ndbapi)
+ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
+
 SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/message.rc 
 							${CMAKE_SOURCE_DIR}/sql/message.h 
 							${CMAKE_SOURCE_DIR}/sql/sql_yacc.h 
@@ -52,6 +58,7 @@ ADD_EXECUTABLE(mysqld${MYSQLD_EXE_SUFFIX
                filesort.cc gstream.cc ha_blackhole.cc 
                ha_archive.cc ha_heap.cc ha_myisam.cc ha_myisammrg.cc
                ha_innodb.cc ha_federated.cc ha_berkeley.cc
+	       ha_ndbcluster.cc ha_ndbcluster_cond.cc
                handler.cc hash_filo.cc hash_filo.h 
                hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc 
                item_create.cc item_func.cc item_geofunc.cc item_row.cc 
@@ -99,6 +106,10 @@ IF(WITH_INNOBASE_STORAGE_ENGINE)
   TARGET_LINK_LIBRARIES(mysqld${MYSQLD_EXE_SUFFIX} innobase)
 ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
 
+IF(WITH_NDBCLUSTER_STORAGE_ENGINE)
+  TARGET_LINK_LIBRARIES(mysqld ndbclient)
+ENDIF(WITH_NDBCLUSTER_STORAGE_ENGINE)
+
 IF(WITH_BERKELEY_STORAGE_ENGINE)
   TARGET_LINK_LIBRARIES(mysqld${MYSQLD_EXE_SUFFIX} bdb)
 ENDIF(WITH_BERKELEY_STORAGE_ENGINE)
@@ -145,4 +156,4 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDI
 
 ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def)
 ADD_DEPENDENCIES(udf_example strings)
-TARGET_LINK_LIBRARIES(udf_example wsock32)
+TARGET_LINK_LIBRARIES(udf_example strings wsock32)
Index: main/ndb/src/common/debugger/signaldata/CntrStart.cpp
===================================================================
--- main.orig/ndb/src/common/debugger/signaldata/CntrStart.cpp	2007-08-13
11:11:50.795205239 +1000
+++ main/ndb/src/common/debugger/signaldata/CntrStart.cpp	2007-08-13 11:17:39.827095433
+1000
@@ -13,6 +13,7 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
+#include <ndb_global.h>
 #include <signaldata/CntrStart.hpp>
 
 bool
Index: main/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp
===================================================================
--- main.orig/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp	2007-08-13
11:11:50.799205467 +1000
+++ main/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp	2007-08-13
11:17:39.875098168 +1000
@@ -13,6 +13,7 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
+#include <ndb_global.h>
 #include <signaldata/ReadNodesConf.hpp>
 
 bool
Index: main/ndb/tools/ndb_config.cpp
===================================================================
--- main.orig/ndb/tools/ndb_config.cpp	2007-08-13 11:11:51.711257442 +1000
+++ main/ndb/tools/ndb_config.cpp	2007-08-13 11:17:39.895099308 +1000
@@ -24,7 +24,11 @@
 #include <my_getopt.h>
 #include <mysql_version.h>
 
+#ifndef NDB_WIN32
 #include <netdb.h>
+#else
+#define strncasecmp(A,B,L) strnicmp((A),(B),(L))
+#endif
 
 #include <NdbOut.hpp>
 #include <mgmapi.h>
Index: main/ndb/include/ndb_types.h.in
===================================================================
--- main.orig/ndb/include/ndb_types.h.in	2007-08-13 11:11:50.739202048 +1000
+++ main/ndb/include/ndb_types.h.in	2007-08-13 11:17:39.919100676 +1000
@@ -20,22 +20,26 @@
 #ifndef NDB_TYPES_H
 #define NDB_TYPES_H
 
-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64)
-#define NDB_SIZEOF_CHARP SIZEOF_CHARP
-#define NDB_SIZEOF_CHAR SIZEOF_CHAR
-#define NDB_SIZEOF_SHORT 2
-#define NDB_SIZEOF_INT SIZEOF_INT
-#define NDB_SIZEOF_LONG SIZEOF_LONG
-#define NDB_SIZEOF_LONG_LONG SIZEOF_LONG_LONG
-typedef unsigned __int64 Uint64;
-typedef   signed __int64 Int64;
-#else
 #define NDB_SIZEOF_CHARP @NDB_SIZEOF_CHARP@
 #define NDB_SIZEOF_CHAR @NDB_SIZEOF_CHAR@
 #define NDB_SIZEOF_INT @NDB_SIZEOF_INT@
 #define NDB_SIZEOF_SHORT @NDB_SIZEOF_SHORT@
 #define NDB_SIZEOF_LONG @NDB_SIZEOF_LONG@
 #define NDB_SIZEOF_LONG_LONG @NDB_SIZEOF_LONG_LONG@
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64)
+typedef unsigned __int64 Uint64;
+typedef   signed __int64 Int64;
+#if defined (_WIN64)
+#  define ssize_t __int64
+#elif defined (_WIN32)
+#  define ssize_t long
+#endif
+#ifndef my_socket_defined
+#define my_socket SOCKET
+#define my_socket_defined
+#endif
+#else
 typedef unsigned long long Uint64;
 typedef   signed long long Int64;
 #endif
Index: main/ndb/include/ndbapi/NdbOperation.hpp
===================================================================
--- main.orig/ndb/include/ndbapi/NdbOperation.hpp	2007-08-13 11:11:50.751202731 +1000
+++ main/ndb/include/ndbapi/NdbOperation.hpp	2007-08-13 11:17:39.947102272 +1000
@@ -337,8 +337,8 @@ public:
    *                    the attribute, or a NULL pointer 
    *                    (indicating error).
    */
-  NdbRecAttr* getValue(const char* anAttrName, char* aValue = 0);
   NdbRecAttr* getValue(Uint32 anAttrId, char* aValue = 0);
+  NdbRecAttr* getValue(const char* anAttrName, char* aValue = 0);
   NdbRecAttr* getValue(const NdbDictionary::Column*, char* val = 0);
   
   /**
Index: main/ndb/src/common/logger/Logger.cpp
===================================================================
--- main.orig/ndb/src/common/logger/Logger.cpp	2007-08-13 11:11:50.831207291 +1000
+++ main/ndb/src/common/logger/Logger.cpp	2007-08-13 11:17:39.983104323 +1000
@@ -200,7 +200,7 @@ Logger::addHandler(const BaseString &log
     
     if(handler == NULL)
     {
-      snprintf(errStr,len,"Could not create log destination: %s",
+      BaseString::snprintf(errStr,len,"Could not create log destination: %s",
                logdest[i].c_str());
       DBUG_RETURN(false);
     }
Index: main/ndb/src/mgmapi/LocalConfig.cpp
===================================================================
--- main.orig/ndb/src/mgmapi/LocalConfig.cpp	2007-08-13 11:11:51.507245816 +1000
+++ main/ndb/src/mgmapi/LocalConfig.cpp	2007-08-13 11:17:40.031107059 +1000
@@ -186,7 +186,7 @@ LocalConfig::parseHostName(const char * 
     if (buf == tempString2)
       break;
     // try to add default port to see if it works
-    snprintf(tempString2, sizeof(tempString2),"%s:%s", buf, NDB_PORT);
+    BaseString::snprintf(tempString2, sizeof(tempString2),"%s:%s", buf, NDB_PORT);
     buf= tempString2;
   } while(1);
   return false;
Index: main/ndb/src/common/portlib/NdbConfig.c
===================================================================
--- main.orig/ndb/src/common/portlib/NdbConfig.c	2007-08-13 11:11:50.859208886 +1000
+++ main/ndb/src/common/portlib/NdbConfig.c	2007-08-13 11:17:40.099110934 +1000
@@ -79,7 +79,8 @@ char *get_prefix_buf(int len, int node_i
   if (node_id > 0)
     basestring_snprintf(tmp_buf, sizeof(tmp_buf), "ndb_%u", node_id);
   else
-    basestring_snprintf(tmp_buf, sizeof(tmp_buf), "ndb_pid%u", getpid());
+    basestring_snprintf(tmp_buf, sizeof(tmp_buf), "ndb_pid%u",
+                        NdbHost_GetProcessId());
   tmp_buf[sizeof(tmp_buf)-1]= 0;
 
   buf= NdbConfig_AllocHomePath(len+strlen(tmp_buf));
Index: main/ndb/src/common/portlib/NdbPortLibTest.cpp
===================================================================
--- main.orig/ndb/src/common/portlib/NdbPortLibTest.cpp	2007-08-13 11:11:50.867209342
+1000
+++ main/ndb/src/common/portlib/NdbPortLibTest.cpp	2007-08-13 11:17:40.175115265 +1000
@@ -53,7 +53,7 @@ extern "C"  void* thread1func(void* arg)
   if (arg1 != 7)
     fail("TEST1", "Wrong arg");
 
-  return returnvalue;
+  return (void*) returnvalue;
 }
 
 // test 2 variables and funcs
@@ -76,7 +76,7 @@ extern "C" void* test2func(void* arg)
     fail("TEST2", "Failed to unlock mutex");
 
   int returnvalue = arg1;
-  return returnvalue;
+  return (void*) returnvalue;
 }
 
 
Index: main/ndb/src/common/portlib/NdbCondition.c
===================================================================
--- main.orig/ndb/src/common/portlib/NdbCondition.c	2007-08-13 11:11:50.871209570 +1000
+++ main/ndb/src/common/portlib/NdbCondition.c	2007-08-13 11:17:40.255119825 +1000
@@ -23,7 +23,15 @@
 
 struct NdbCondition
 {
+#ifndef NDB_WIN32
   pthread_cond_t cond;
+#else
+  long nWaiters;
+  NdbMutex* pNdbMutexWaitersLock;
+  HANDLE hSemaphore;
+  HANDLE hEventWaitersDone;
+  int bWasBroadcast;
+#endif
 };
 
 
@@ -39,7 +47,18 @@ NdbCondition_Create(void)
   if (tmpCond == NULL)
     return NULL;
   
+#ifndef NDB_WIN32
   result = pthread_cond_init(&tmpCond->cond, NULL);
+#else
+  tmpCond->nWaiters = 0;
+  tmpCond->bWasBroadcast = 0;
+  if(!(tmpCond->hSemaphore = CreateSemaphore(0, 0, MAXLONG, 0)))
+    result = -1;
+  else if(!(tmpCond->pNdbMutexWaitersLock = NdbMutex_Create()))
+    result = -1;
+  else if(!(tmpCond->hEventWaitersDone = CreateEvent(0, 0, 0, 0)))
+    result = -1;
+#endif
   
   assert(result==0);
   return tmpCond;
@@ -52,11 +71,34 @@ NdbCondition_Wait(struct NdbCondition* p
                   NdbMutex* p_mutex)
 {
   int result;
+#ifdef NDB_WIN32
+  int bLastWaiter;
+#endif
 
   if (p_cond == NULL || p_mutex == NULL)
     return 1;
   
+#ifndef NDB_WIN32
   result = pthread_cond_wait(&p_cond->cond, p_mutex);
+#else
+  NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+  p_cond->nWaiters++;
+  NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+
+  if(NdbMutex_Unlock(p_mutex))
+    return -1;
+  result = WaitForSingleObject (p_cond->hSemaphore, INFINITE);
+
+  NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+  p_cond->nWaiters--;
+  bLastWaiter = (p_cond->bWasBroadcast && p_cond->nWaiters==0);
+  NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+
+  if(result==WAIT_OBJECT_0 && bLastWaiter)
+    SetEvent(p_cond->hEventWaitersDone);
+
+  NdbMutex_Lock(p_mutex);
+#endif
   
   return result;
 }
@@ -66,12 +108,17 @@ NdbCondition_WaitTimeout(struct NdbCondi
                          NdbMutex* p_mutex,
                          int msecs){
   int result;
+#ifndef NDB_WIN32  
   struct timespec abstime; 
   int secs = 0;
+#else
+  int bLastWaiter;
+#endif
   
   if (p_cond == NULL || p_mutex == NULL)
     return 1;
-  
+
+#ifndef NDB_WIN32  
 #ifdef HAVE_CLOCK_GETTIME
   clock_gettime(CLOCK_REALTIME, &abstime);
 #else
@@ -96,6 +143,30 @@ NdbCondition_WaitTimeout(struct NdbCondi
   }
     
   result = pthread_cond_timedwait(&p_cond->cond, p_mutex, &abstime);
+#else
+  NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+  p_cond->nWaiters++;
+  NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+  if(msecs<0)
+    msecs = 0;
+
+  if(NdbMutex_Unlock(p_mutex))
+    return -1;
+  result = WaitForSingleObject(p_cond->hSemaphore, msecs);
+
+  NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+  p_cond->nWaiters--;
+  bLastWaiter = (p_cond->bWasBroadcast && p_cond->nWaiters==0);
+  NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+
+  if(result!=WAIT_OBJECT_0)
+    result = -1;
+
+  if(bLastWaiter)
+    SetEvent(p_cond->hEventWaitersDone); 
+
+  NdbMutex_Lock(p_mutex);
+#endif
   
   return result;
 }
@@ -107,7 +178,16 @@ NdbCondition_Signal(struct NdbCondition*
   if (p_cond == NULL)
     return 1;
 
+#ifndef NDB_WIN32
   result = pthread_cond_signal(&p_cond->cond);
+#else
+  NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+  result = (p_cond->nWaiters > 0);
+  NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+
+  if(result)
+    return (ReleaseSemaphore(p_cond->hSemaphore, 1, 0) ? 0 : -1);
+#endif
                              
   return result;
 }
@@ -120,7 +200,27 @@ int NdbCondition_Broadcast(struct NdbCon
   if (p_cond == NULL)
     return 1;
 
+#ifndef NDB_WIN32
   result = pthread_cond_broadcast(&p_cond->cond);
+#else
+  NdbMutex_Lock(p_cond->pNdbMutexWaitersLock);
+  result = 0;
+  if(p_cond->nWaiters > 0)
+  {
+    p_cond->bWasBroadcast = !0;
+    result= 1;
+  }
+  NdbMutex_Unlock(p_cond->pNdbMutexWaitersLock);
+  if(result)
+  {
+    result = 0;
+    if(!ReleaseSemaphore(p_cond->hSemaphore, p_cond->nWaiters, 0))
+      result = -1;
+    else if(WaitForSingleObject (p_cond->hEventWaitersDone, INFINITE) !=
WAIT_OBJECT_0)
+      result = -1;
+    p_cond->bWasBroadcast = 0;
+  }
+#endif
                              
   return result;
 }
@@ -133,7 +233,14 @@ int NdbCondition_Destroy(struct NdbCondi
   if (p_cond == NULL)
     return 1;
 
+#ifndef NDB_WIN32
   result = pthread_cond_destroy(&p_cond->cond);
+#else
+  CloseHandle(p_cond->hEventWaitersDone);
+  NdbMutex_Destroy(p_cond->pNdbMutexWaitersLock);
+  result = (CloseHandle(p_cond->hSemaphore) ? 0 : -1); 
+#endif
+
   free(p_cond);
 
   return 0;
Index: main/ndb/src/common/portlib/NdbDaemon.c
===================================================================
--- main.orig/ndb/src/common/portlib/NdbDaemon.c	2007-08-13 11:11:50.887210482 +1000
+++ main/ndb/src/common/portlib/NdbDaemon.c	2007-08-13 11:17:40.347125068 +1000
@@ -21,6 +21,13 @@ long NdbDaemon_DaemonPid = 0;
 int NdbDaemon_ErrorCode = 0;
 char NdbDaemon_ErrorText[NdbDaemon_ErrorSize] = "";
 
+#ifdef NDB_WIN32
+#define F_ULOCK _LK_UNLCK
+#define F_LOCK _LK_LOCK
+#define F_TLOCK _LK_NBLCK
+#define lockf(fd,mode,size) _locking((fd),(mode),(size))
+#endif
+
 int
 NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
 {
@@ -34,7 +41,7 @@ NdbDaemon_Make(const char* lockfile, con
   lockfd = open(lockfile, O_CREAT|O_RDWR, 0644);
   if (lockfd == -1) {
     NdbDaemon_ErrorCode = errno;
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	"%s: open for write failed: %s", lockfile, strerror(errno));
     return -1;
   }
@@ -43,14 +50,14 @@ NdbDaemon_Make(const char* lockfile, con
   n = read(lockfd, buf, sizeof(buf));
   if (n < 0) {
     NdbDaemon_ErrorCode = errno;
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	"%s: read failed: %s", lockfile, strerror(errno));
     return -1;
   }
   NdbDaemon_DaemonPid = atol(buf);
   if (lseek(lockfd, 0, SEEK_SET) == -1) {
     NdbDaemon_ErrorCode = errno;
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	"%s: lseek failed: %s", lockfile, strerror(errno));
     return -1;
   }
@@ -59,12 +66,12 @@ NdbDaemon_Make(const char* lockfile, con
   if (lockf(lockfd, F_TLOCK, 0) == -1) 
   {
     if (errno == EACCES || errno == EAGAIN) {   /* results may vary */
-      snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+      basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	       "%s: already locked by pid=%ld", lockfile, NdbDaemon_DaemonPid);
       return -1;
     }
     NdbDaemon_ErrorCode = errno;
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
         "%s: lock test failed: %s", lockfile, strerror(errno));
     return -1;
   }
@@ -74,7 +81,7 @@ NdbDaemon_Make(const char* lockfile, con
     logfd = open(logfile, O_CREAT|O_WRONLY|O_APPEND, 0644);
     if (logfd == -1) {
       NdbDaemon_ErrorCode = errno;
-      snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+      basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	  "%s: open for write failed: %s", logfile, strerror(errno));
       return -1;
     }
@@ -82,17 +89,18 @@ NdbDaemon_Make(const char* lockfile, con
 #ifdef F_TLOCK
   if (lockf(lockfd, F_ULOCK, 0) == -1) 
   {
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	     "%s: fail to unlock", lockfile);
     return -1;
   }
 #endif
   
+#ifndef NDB_WIN32
   /* Fork */
   n = fork();
   if (n == -1) {
     NdbDaemon_ErrorCode = errno;
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	"fork failed: %s", strerror(errno));
     return -1;
   }
@@ -100,26 +108,32 @@ NdbDaemon_Make(const char* lockfile, con
   if (n != 0) {
     exit(0);
   }
+#endif
+
   /* Running in child process */
-  NdbDaemon_DaemonPid = getpid();
+  NdbDaemon_DaemonPid = NdbHost_GetProcessId();
   /* Lock the lock file (likely to succeed due to test above) */
   if (lockf(lockfd, F_LOCK, 0) == -1) {
     NdbDaemon_ErrorCode = errno;
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	"%s: lock failed: %s", lockfile, strerror(errno));
     return -1;
   }
+#ifndef NDB_WIN32
   /* Become process group leader */
   if (setsid() == -1) {
     NdbDaemon_ErrorCode = errno;
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	"setsid failed: %s", strerror(errno));
     return -1;
   }
   /* Write pid to lock file */
   if (ftruncate(lockfd, 0) == -1) {
+#else
+  if (_chsize(lockfd, 0) == -1) {
+#endif
     NdbDaemon_ErrorCode = errno;
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	"%s: ftruncate failed: %s", lockfile, strerror(errno));
     return -1;
   }
@@ -127,13 +141,17 @@ NdbDaemon_Make(const char* lockfile, con
   n = strlen(buf);
   if (write(lockfd, buf, n) != n) {
     NdbDaemon_ErrorCode = errno;
-    snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+    basestring_snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
 	"%s: write failed: %s", lockfile, strerror(errno));
     return -1;
   }
   /* Do input/output redirections (assume fd 0,1,2 not in use) */
   close(0);
+#ifndef NDB_WIN32
   open("/dev/null", O_RDONLY);
+#else
+  open("nul:", O_RDONLY);
+#endif
   if (logfile != 0) {
     dup2(logfd, 1);
     dup2(logfd, 2);
Index: main/ndb/src/common/portlib/NdbHost.c
===================================================================
--- main.orig/ndb/src/common/portlib/NdbHost.c	2007-08-13 11:11:50.891210710 +1000
+++ main/ndb/src/common/portlib/NdbHost.c	2007-08-13 11:17:40.403128259 +1000
@@ -19,15 +19,42 @@
 
 int NdbHost_GetHostName(char* buf)
 {
+#ifndef NDB_WIN32
   if (gethostname(buf, MAXHOSTNAMELEN) != 0)
   {     
      return -1;
    }
+#else
+  /* We must initialize TCP/IP if we want to call gethostname */
+  WORD wVersionRequested;
+  WSADATA wsaData;
+  int err; 
+
+  wVersionRequested = MAKEWORD( 2, 0 ); 
+  err = WSAStartup( wVersionRequested, &wsaData );
+  if ( err != 0 ) {    
+    /**
+    * Tell the user that we couldn't find a usable
+    * WinSock DLL.                               
+    */
+    return -1;
+  }
+
+  /* Get host name */
+  if(gethostname(buf, MAXHOSTNAMELEN))
+  {
+    return -1;
+  }
+#endif
   return 0;
 }
 
 int NdbHost_GetProcessId(void)
 {
+#ifndef NDB_WIN32
   return getpid();
+#else
+  return _getpid();
+#endif
 }
 
Index: main/ndb/src/common/portlib/NdbMutex.c
===================================================================
--- main.orig/ndb/src/common/portlib/NdbMutex.c	2007-08-13 11:11:50.895210938 +1000
+++ main/ndb/src/common/portlib/NdbMutex.c	2007-08-13 11:17:40.459131451 +1000
@@ -32,8 +32,12 @@ NdbMutex* NdbMutex_Create(void)
   if (pNdbMutex == NULL)
     DBUG_RETURN(NULL);
   
+#ifndef NDB_WIN32
   result = pthread_mutex_init(pNdbMutex, NULL);
   assert(result == 0);
+#else
+  InitializeCriticalSection(pNdbMutex);
+#endif
 			     
   DBUG_RETURN(pNdbMutex);		     
 }
@@ -47,7 +51,12 @@ int NdbMutex_Destroy(NdbMutex* p_mutex)
   if (p_mutex == NULL)
     DBUG_RETURN(-1);
 
+#ifndef NDB_WIN32
   result = pthread_mutex_destroy(p_mutex);
+#else
+  DeleteCriticalSection(p_mutex);
+  result = 0;
+#endif
 
   DBUG_PRINT("info",("NdbMem_Free 0x%lx", (long) p_mutex));
   NdbMem_Free(p_mutex);
@@ -64,7 +73,12 @@ int NdbMutex_Lock(NdbMutex* p_mutex)
   if (p_mutex == NULL)
     return -1;
 
+#ifndef NDB_WIN32
   result = pthread_mutex_lock(p_mutex);
+#else
+  EnterCriticalSection(p_mutex);
+  result = 0;
+#endif
   
   return result;
 }
@@ -77,7 +91,12 @@ int NdbMutex_Unlock(NdbMutex* p_mutex)
   if (p_mutex == NULL)
     return -1;
 
+#ifndef NDB_WIN32
   result = pthread_mutex_unlock(p_mutex);
+#else
+  LeaveCriticalSection(p_mutex);
+  result = 0;
+#endif
 			     
   return result;
 }
@@ -88,7 +107,12 @@ int NdbMutex_Trylock(NdbMutex* p_mutex)
   int result = -1;
 
   if (p_mutex != NULL) {
+#ifndef NDB_WIN32
     result = pthread_mutex_trylock(p_mutex);
+#else
+    if (TryEnterCriticalSection(p_mutex))
+      result = 0;
+#endif
   }
 
   return result;
Index: main/ndb/src/common/portlib/NdbSleep.c
===================================================================
--- main.orig/ndb/src/common/portlib/NdbSleep.c	2007-08-13 11:11:50.903211394 +1000
+++ main/ndb/src/common/portlib/NdbSleep.c	2007-08-13 11:17:40.519134870 +1000
@@ -35,7 +35,11 @@ NdbSleep_MilliSleep(int milliseconds){
 int
 NdbSleep_SecSleep(int seconds){
   int result = 0;
+#ifndef NDB_WIN32
   result = sleep(seconds);
+#else
+  sleep(seconds);
+#endif
   return result;
 }
 
Index: main/ndb/src/common/portlib/NdbTCP.cpp
===================================================================
--- main.orig/ndb/src/common/portlib/NdbTCP.cpp	2007-08-13 11:11:50.919212306 +1000
+++ main/ndb/src/common/portlib/NdbTCP.cpp	2007-08-13 11:17:40.587138745 +1000
@@ -53,14 +53,12 @@ Ndb_getInAddr(struct in_addr * dst, cons
   return -1; //DBUG_RETURN(-1);
 }
 
-#ifndef DBUG_OFF
 extern "C"
 int NDB_CLOSE_SOCKET(int fd)
 {
   DBUG_PRINT("info", ("NDB_CLOSE_SOCKET(%d)", fd));
   return _NDB_CLOSE_SOCKET(fd);
 }
-#endif
 
 #if 0
 int 
Index: main/ndb/src/common/portlib/NdbThread.c
===================================================================
--- main.orig/ndb/src/common/portlib/NdbThread.c	2007-08-13 11:11:50.923212534 +1000
+++ main/ndb/src/common/portlib/NdbThread.c	2007-08-13 11:17:40.607139885 +1000
@@ -29,18 +29,29 @@ int g_ndb_shm_signum= 0;
 
 struct NdbThread 
 { 
+#ifndef NDB_WIN32
   pthread_t thread;
+#else
+    HANDLE hThread;
+    unsigned nThreadId;
+#endif
   char thread_name[MAX_THREAD_NAME];
   NDB_THREAD_FUNC * func;
   void * object;
 };
 
 static
+#ifndef NDB_WIN32
 void*
 ndb_thread_wrapper(void* _ss){
+#else
+WINAPI
+ndb_thread_wrapper(void* _ss){
+#endif
   my_thread_init();
   {
     DBUG_ENTER("ndb_thread_wrapper");
+#ifndef NDB_WIN32
 #ifdef NDB_SHM_TRANSPORTER
     if (g_ndb_shm_signum)
     {
@@ -60,6 +71,7 @@ ndb_thread_wrapper(void* _ss){
       sigfillset(&mask);
       pthread_sigmask(SIG_BLOCK, &mask, 0);
     }      
+#endif
     
     {
       void *ret;
@@ -82,7 +94,12 @@ struct NdbThread* NdbThread_Create(NDB_T
 {
   struct NdbThread* tmpThread;
   int result;
+#ifndef NDB_WIN32
   pthread_attr_t thread_attr;
+#else
+  unsigned initflag;
+  int nPriority = 0;
+#endif
   DBUG_ENTER("NdbThread_Create");
 
   (void)thread_prio; /* remove warning for unused parameter */
@@ -98,6 +115,9 @@ struct NdbThread* NdbThread_Create(NDB_T
 
   strnmov(tmpThread->thread_name,p_thread_name,sizeof(tmpThread->thread_name));
 
+  tmpThread->func= p_thread_func;
+  tmpThread->object= p_thread_arg;
+#ifndef NDB_WIN32
   pthread_attr_init(&thread_attr);
 #if (SIZEOF_CHARP == 8)
   pthread_attr_setstacksize(&thread_attr, 2*thread_stack_size);
@@ -112,8 +132,6 @@ struct NdbThread* NdbThread_Create(NDB_T
 #ifdef PTHREAD_CREATE_JOINABLE /* needed on SCO */
   pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_JOINABLE);
 #endif
-  tmpThread->func= p_thread_func;
-  tmpThread->object= p_thread_arg;
   result = pthread_create(&tmpThread->thread, 
 			  &thread_attr,
   		          ndb_thread_wrapper,
@@ -121,6 +139,30 @@ struct NdbThread* NdbThread_Create(NDB_T
   assert(result==0);
 
   pthread_attr_destroy(&thread_attr);
+#else
+  switch(thread_prio)
+  {
+  case NDB_THREAD_PRIO_HIGHEST: nPriority=THREAD_PRIORITY_HIGHEST; break;
+  case NDB_THREAD_PRIO_HIGH: nPriority=THREAD_PRIORITY_ABOVE_NORMAL; break;
+  case NDB_THREAD_PRIO_MEAN: nPriority=THREAD_PRIORITY_NORMAL; break;
+  case NDB_THREAD_PRIO_LOW: nPriority=THREAD_PRIORITY_BELOW_NORMAL; break;
+  case NDB_THREAD_PRIO_LOWEST: nPriority=THREAD_PRIORITY_LOWEST; break;
+  }
+  initflag = (nPriority ? CREATE_SUSPENDED : 0);
+
+  tmpThread->hThread = (HANDLE)_beginthreadex(0, thread_stack_size,
+      ndb_thread_wrapper, p_thread_arg, 
+      initflag, &tmpThread->nThreadId);
+
+  if(nPriority && tmpThread->hThread)
+  {
+    SetThreadPriority(tmpThread->hThread, nPriority);
+    ResumeThread (tmpThread->hThread);
+  }
+
+  assert(tmpThread->hThread);
+#endif
+
   DBUG_PRINT("exit",("ret: 0x%lx", (long) tmpThread));
   DBUG_RETURN(tmpThread);
 }
@@ -131,6 +173,10 @@ void NdbThread_Destroy(struct NdbThread*
   DBUG_ENTER("NdbThread_Destroy");
   if (*p_thread != NULL){
     DBUG_PRINT("enter",("*p_thread: 0x%lx", (long) *p_thread));
+#ifdef NDB_WIN32
+    CloseHandle((*p_thread)->hThread);
+    (*p_thread)->hThread = 0;
+#endif
     free(* p_thread); 
     * p_thread = 0;
   }
@@ -140,6 +186,7 @@ void NdbThread_Destroy(struct NdbThread*
 
 int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
 {
+#ifndef NDB_WIN32
   int result;
 
   if (p_wait_thread == NULL)
@@ -151,13 +198,31 @@ int NdbThread_WaitFor(struct NdbThread* 
   result = pthread_join(p_wait_thread->thread, status);
   
   return result;
+#else
+  void *local_status = 0;
+  if (status == 0)
+    status = &local_status;
+
+  if(WaitForSingleObject(p_wait_thread->hThread, INFINITE) == WAIT_OBJECT_0
+      && GetExitCodeThread(p_wait_thread->hThread, (LPDWORD)status))
+  {
+    CloseHandle(p_wait_thread->hThread);
+    p_wait_thread->hThread = 0;
+    return 0;
+  }
+  return -1; 
+#endif
 }
 
 
 void NdbThread_Exit(void *status)
 {
   my_thread_end();
+#ifndef NDB_WIN32
   pthread_exit(status);
+#else
+  _endthreadex((DWORD) status);
+#endif
 }
 
 
Index: main/ndb/src/common/portlib/NdbTick.c
===================================================================
--- main.orig/ndb/src/common/portlib/NdbTick.c	2007-08-13 11:11:50.931212990 +1000
+++ main/ndb/src/common/portlib/NdbTick.c	2007-08-13 11:17:40.631141253 +1000
@@ -24,7 +24,27 @@
 #define MILLISEC_PER_NANOSEC 1000000
 
 
-#ifdef HAVE_CLOCK_GETTIME
+#ifdef NDB_WIN32
+NDB_TICKS NdbTick_CurrentMillisecond(void)
+{
+  LARGE_INTEGER liCount, liFreq;
+  QueryPerformanceCounter(&liCount);
+  QueryPerformanceFrequency(&liFreq);
+  return (liCount.QuadPart*1000) / liFreq.QuadPart;
+}
+
+int 
+NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros)
+{
+  LARGE_INTEGER liCount, liFreq;
+  QueryPerformanceCounter(&liCount);
+  QueryPerformanceFrequency(&liFreq);
+  *secs = liCount.QuadPart / liFreq.QuadPart;
+  liCount.QuadPart -= *secs * liFreq.QuadPart;
+  *micros = (liCount.QuadPart*1000000) / liFreq.QuadPart;
+  return 0;
+}
+#elif defined(HAVE_CLOCK_GETTIME)
 NDB_TICKS NdbTick_CurrentMillisecond(void)
 {
   struct timespec tick_time;
Index: main/ndb/src/common/util/Properties.cpp
===================================================================
--- main.orig/ndb/src/common/util/Properties.cpp	2007-08-13 11:11:50.955214357 +1000
+++ main/ndb/src/common/util/Properties.cpp	2007-08-13 11:17:40.663143077 +1000
@@ -167,7 +167,7 @@ put(PropertiesImpl * impl, const char * 
       return false;
     }
   }
-  return tmp->put(new PropertyImpl(short_name, value));  
+  return (tmp->put(new PropertyImpl(short_name, value))) != NULL;
 }
 
 
Index: main/ndb/src/kernel/blocks/backup/Backup.hpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/backup/Backup.hpp	2007-08-13 11:11:51.211228947 +1000
+++ main/ndb/src/kernel/blocks/backup/Backup.hpp	2007-08-13 11:17:40.691144672 +1000
@@ -16,6 +16,7 @@
 #ifndef BACKUP_H
 #define BACKUP_H
 
+#include <ndb_global.h>
 #include <ndb_limits.h>
 #include <SimulatedBlock.hpp>
 
Index: main/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-08-13 11:11:51.251231226 +1000
+++ main/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-08-13 11:17:40.763148776 +1000
@@ -1098,7 +1098,7 @@ void Dbdict::readSchemaConf(Signal* sign
     if (!ok)
     {
       char reason_msg[128];
-      snprintf(reason_msg, sizeof(reason_msg),
+      BaseString::snprintf(reason_msg, sizeof(reason_msg),
                "schema file corrupt, page %u (%s, "
                "sz=%u sz0=%u pn=%u)",
                n, reason, sf->FileSize, sf0->FileSize, sf->PageNumber);
Index: main/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp	2007-08-13
11:11:51.259231682 +1000
+++ main/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp	2007-08-13 11:17:40.799150827
+1000
@@ -17,6 +17,11 @@
 #include <ndb_global.h>
 #include <ndb_version.h>
 
+#ifdef NDB_WIN32
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+
 #include <NdbMain.h>
 #include <NdbOut.hpp>
 #include <SchemaFile.hpp>
@@ -203,8 +208,13 @@ NDB_COMMAND(printSchemafile, 
     const char * filename = argv[1];
     argc--, argv++;
 
+#ifndef NDB_WIN32
     struct stat sbuf;
     const int res = stat(filename, &sbuf);
+#else
+    struct _stat sbuf;
+    const int res = _stat(filename, &sbuf);
+#endif
     if (res != 0) {
       ndbout << filename << ": not found errno=" << errno <<
endl;
       exitcode = 1;
Index: main/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/dbdih/Dbdih.hpp	2007-08-13 11:11:51.283233050 +1000
+++ main/ndb/src/kernel/blocks/dbdih/Dbdih.hpp	2007-08-13 11:17:40.835152879 +1000
@@ -16,6 +16,7 @@
 #ifndef DBDIH_H
 #define DBDIH_H
 
+#include <ndb_global.h>
 #include <ndb_limits.h>
 #include <pc.hpp>
 #include <SimulatedBlock.hpp>
Index: main/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2007-08-13 11:11:51.287233278
+1000
+++ main/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2007-08-13 11:17:40.883155614 +1000
@@ -14,6 +14,7 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #define DBDIH_C
+#include <ndb_global.h>
 #include <ndb_limits.h>
 #include <ndb_version.h>
 #include <NdbOut.hpp>
@@ -13662,8 +13663,8 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal
     buf2[0]= 0;
     for(Uint32 i = 0; i<length; i++)
     {
-      snprintf(buf, 100, "%s %.8x", buf2, signal->theData[i]);
-      snprintf(buf2, 100, "%s", buf);
+      BaseString::snprintf(buf, 100, "%s %.8x", buf2, signal->theData[i]);
+      BaseString::snprintf(buf2, 100, "%s", buf);
     }
     warningEvent("gsn: %d block: %s, length: %d theData: %s", 
 		 gsn, getBlockName(block, "UNKNOWN"), length, buf);
Index: main/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp	2007-08-13
11:11:51.291233506 +1000
+++ main/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp	2007-08-13
11:17:40.919157666 +1000
@@ -16,6 +16,11 @@
 
 #include <ndb_global.h>
 
+#ifdef NDB_WIN32
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+
 #include <NdbMain.h>
 #include <NdbOut.hpp>
 #include <Sysfile.hpp>
@@ -125,8 +130,13 @@ NDB_COMMAND(printSysfile, 
   for(int i = 1; i<argc; i++){
     const char * filename = argv[i];
     
+#ifndef NDB_WIN32
     struct stat sbuf;
     const int res = stat(filename, &sbuf);
+#else
+    struct _stat sbuf;
+    const int res = _stat(filename, &sbuf);
+#endif
     if(res != 0){
       ndbout << "Could not find file: \"" << filename << "\"" <<
endl;
       continue;
Index: main/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2007-08-13 11:11:51.351236925 +1000
+++ main/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2007-08-13 11:17:40.947159262 +1000
@@ -16,6 +16,7 @@
 #ifndef DBTC_H
 #define DBTC_H
 
+#include <ndb_global.h>
 #include <ndb_limits.h>
 #include <pc.hpp>
 #include <SimulatedBlock.hpp>
Index: main/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/dbtux/Dbtux.hpp	2007-08-13 11:11:51.371238065 +1000
+++ main/ndb/src/kernel/blocks/dbtux/Dbtux.hpp	2007-08-13 11:17:40.999162225 +1000
@@ -16,6 +16,7 @@
 #ifndef DBTUX_H
 #define DBTUX_H
 
+#include <ndb_global.h>
 #include <ndb_limits.h>
 #include <SimulatedBlock.hpp>
 #include <AttributeDescriptor.hpp>
Index: main/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp	2007-08-13 11:11:51.399239661
+1000
+++ main/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp	2007-08-13 11:17:41.019163365 +1000
@@ -218,7 +218,7 @@ AsyncFile::run()
       rmrfReq(request, (char*)theFileName.c_str(), request->par.rmrf.own_directory);
       break;
     case Request:: end:
-      if (theFd > 0)
+      if (isOpen())
         closeReq(request);
       endReq();
       return;
@@ -510,6 +510,14 @@ AsyncFile::extendfile(Request* request) 
   }
   DEBUG(ndbout_c("extendfile: maxOffset=%d, size=%d", maxOffset, maxSize));
 
+#ifdef NDB_WIN32
+  int return_value;
+  if (SetFilePointer(hFile, maxOffset + maxSize, NULL, 
+                     FILE_BEGIN) == INVALID_SET_FILE_POINTER &&
+      (return_value = GetLastError()) != NO_ERROR)
+  if (!SetEndOfFile(hFile))
+    return GetLastError();
+#else
   // Allocate a buffer and fill it with zeros
   void* pbuf = ndbd_malloc(maxSize);
   memset(pbuf, 0, maxSize);
@@ -531,6 +539,7 @@ AsyncFile::extendfile(Request* request) 
     }
   }
   ndbd_free(pbuf,maxSize);
+#endif
   
   DEBUG(ndbout_c("extendfile: \"%s\" OK!", theFileName.c_str()));
   return 0;
Index: main/ndb/src/kernel/blocks/suma/Suma.hpp
===================================================================
--- main.orig/ndb/src/kernel/blocks/suma/Suma.hpp	2007-08-13 11:11:51.411240345 +1000
+++ main/ndb/src/kernel/blocks/suma/Suma.hpp	2007-08-13 11:17:41.043164733 +1000
@@ -16,6 +16,7 @@
 #ifndef SUMA_H
 #define SUMA_H
 
+#include <ndb_global.h>
 #include <ndb_limits.h>
 #include <SimulatedBlock.hpp>
 
Index: main/ndb/src/kernel/main.cpp
===================================================================
--- main.orig/ndb/src/kernel/main.cpp	2007-08-13 11:11:51.499245360 +1000
+++ main/ndb/src/kernel/main.cpp	2007-08-13 11:17:41.071166328 +1000
@@ -100,7 +100,10 @@ void childAbort(int code, Uint32 current
   fprintf(child_info_file_w, "\n");
   fclose(child_info_file_r);
   fclose(child_info_file_w);
+#ifndef NDB_WIN32
+  /* bad practice to use absolute numbers for signals */
   signal(6, SIG_DFL);
+#endif
   abort();
 }
 
Index: main/ndb/src/kernel/vm/Emulator.cpp
===================================================================
--- main.orig/ndb/src/kernel/vm/Emulator.cpp	2007-08-13 11:11:51.435241713 +1000
+++ main/ndb/src/kernel/vm/Emulator.cpp	2007-08-13 11:17:41.087167240 +1000
@@ -240,8 +240,10 @@ NdbShutdown(NdbShutdownType type,
     
     if(type != NST_Normal && type != NST_Restart){
       // Signal parent that error occured during startup
+#ifndef NDB_WIN32
       if (type == NST_ErrorHandlerStartup)
 	kill(getppid(), SIGUSR1);
+#endif
       g_eventLogger.info("Error handler shutdown completed - %s", exitAbort);
       if (opt_core)
       {
Index: main/ndb/src/kernel/vm/MetaData.hpp
===================================================================
--- main.orig/ndb/src/kernel/vm/MetaData.hpp	2007-08-13 11:11:51.443242169 +1000
+++ main/ndb/src/kernel/vm/MetaData.hpp	2007-08-13 11:17:41.111168608 +1000
@@ -16,6 +16,7 @@
 #ifndef KERNEL_VM_METADATA_HPP
 #define KERNEL_VM_METADATA_HPP
 
+#include <ndb_global.h>
 #include <ndb_types.h>
 #include <ndb_limits.h>
 #include <ErrorReporter.hpp>
Index: main/ndb/src/kernel/vm/SimulatedBlock.cpp
===================================================================
--- main.orig/ndb/src/kernel/vm/SimulatedBlock.cpp	2007-08-13 11:11:51.447242397 +1000
+++ main/ndb/src/kernel/vm/SimulatedBlock.cpp	2007-08-13 11:17:41.139170204 +1000
@@ -855,7 +855,7 @@ void
 SimulatedBlock::execSIGNAL_DROPPED_REP(Signal * signal){
   char msg[64];
   const SignalDroppedRep * const rep = (SignalDroppedRep *)&signal->theData[0];
-  snprintf(msg, sizeof(msg), "%s GSN: %u (%u,%u)", getBlockName(number()),
+  BaseString::snprintf(msg, sizeof(msg), "%s GSN: %u (%u,%u)", getBlockName(number()),
 	   rep->originalGsn, rep->originalLength,rep->originalSectionCount);
   ErrorReporter::handleError(NDBD_EXIT_OUT_OF_LONG_SIGNAL_MEMORY,
 			     msg,
Index: main/ndb/src/kernel/vm/TransporterCallback.cpp
===================================================================
--- main.orig/ndb/src/kernel/vm/TransporterCallback.cpp	2007-08-13 11:11:51.459243080
+1000
+++ main/ndb/src/kernel/vm/TransporterCallback.cpp	2007-08-13 11:17:41.167171800 +1000
@@ -343,7 +343,7 @@ reportError(void * callbackObj, NodeId n
   case TE_SIGNAL_LOST_SEND_BUFFER_FULL:
   {
     char msg[64];
-    snprintf(msg, sizeof(msg), "Remote note id %d.%s%s", nodeId,
+    BaseString::snprintf(msg, sizeof(msg), "Remote note id %d.%s%s", nodeId,
 	     info ? " " : "", info ? info : "");
     ErrorReporter::handleError(NDBD_EXIT_SIGNAL_LOST_SEND_BUFFER_FULL,
 			       msg, __FILE__, NST_ErrorHandler);
@@ -351,7 +351,7 @@ reportError(void * callbackObj, NodeId n
   case TE_SIGNAL_LOST:
   {
     char msg[64];
-    snprintf(msg, sizeof(msg), "Remote node id %d,%s%s", nodeId,
+    BaseString::snprintf(msg, sizeof(msg), "Remote node id %d,%s%s", nodeId,
 	     info ? " " : "", info ? info : "");
     ErrorReporter::handleError(NDBD_EXIT_SIGNAL_LOST,
 			       msg, __FILE__, NST_ErrorHandler);
@@ -359,7 +359,7 @@ reportError(void * callbackObj, NodeId n
   case TE_SHM_IPC_PERMANENT:
   {
     char msg[128];
-    snprintf(msg, sizeof(msg),
+    BaseString::snprintf(msg, sizeof(msg),
 	     "Remote node id %d.%s%s",
 	     nodeId, info ? " " : "", info ? info : "");
     ErrorReporter::handleError(NDBD_EXIT_CONNECTION_SETUP_FAILED,
Index: main/ndb/src/kernel/vm/WatchDog.cpp
===================================================================
--- main.orig/ndb/src/kernel/vm/WatchDog.cpp	2007-08-13 11:11:51.467243536 +1000
+++ main/ndb/src/kernel/vm/WatchDog.cpp	2007-08-13 11:17:41.199173623 +1000
@@ -16,7 +16,9 @@
 
 #include <ndb_global.h>
 #include <my_pthread.h>
+#ifndef NDB_WIN32
 #include <sys/times.h>
+#endif
 
 #include "WatchDog.hpp"
 #include "GlobalData.hpp"
@@ -130,6 +132,7 @@ WatchDog::run(){
         break;
       }//switch
       g_eventLogger.warning("Ndb kernel is stuck in: %s", last_stuck_action);
+#ifndef NDB_WIN32
       {
         struct tms my_tms;
         times(&my_tms);
@@ -137,6 +140,7 @@ WatchDog::run(){
                            (Uint64)my_tms.tms_utime,
                            (Uint64)my_tms.tms_stime);
       }
+#endif
       if(alerts == 3){
 	shutdownSystem(last_stuck_action);
       }
Index: main/ndb/src/mgmclient/CommandInterpreter.cpp
===================================================================
--- main.orig/ndb/src/mgmclient/CommandInterpreter.cpp	2007-08-13 11:11:51.527246956 +1000
+++ main/ndb/src/mgmclient/CommandInterpreter.cpp	2007-08-13 11:17:41.215174535 +1000
@@ -14,6 +14,7 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #include <ndb_global.h>
+#include <NdbTCP.h>
 #include <my_sys.h>
 
 //#define HAVE_GLOBAL_REPLICATION
@@ -23,6 +24,17 @@
 #include "../rep/repapi/repapi.h"
 #endif
 
+#ifdef NDB_WIN32
+inline int xsleep(unsigned seconds)
+{
+  sleep(seconds);
+  return 0;
+}
+#undef sleep
+#define sleep(X) xsleep(X)
+#define strncasecmp(S1,S2,L) strnicmp((S1),(S2),(L))
+#endif
+
 #include <mgmapi.h>
 #include <util/BaseString.hpp>
 #include <ndbd_exit_codes.h>
Index: main/ndb/src/mgmclient/main.cpp
===================================================================
--- main.orig/ndb/src/mgmclient/main.cpp	2007-08-13 11:11:51.535247412 +1000
+++ main/ndb/src/mgmclient/main.cpp	2007-08-13 11:17:41.231175447 +1000
@@ -42,6 +42,7 @@ const char *load_default_groups[]= { "my
 
 static Ndb_mgmclient* com;
 
+#ifndef NDB_WIN32
 extern "C"
 void 
 handler(int sig)
@@ -58,6 +59,7 @@ handler(int sig)
   }
   DBUG_VOID_RETURN;
 }
+#endif
 
 NDB_STD_OPTS_VARS;
 
@@ -152,7 +154,9 @@ int main(int argc, char** argv){
     prompt= 0;
   }
 
+#ifndef NDB_WIN32
   signal(SIGPIPE, handler);
+#endif
   com = new Ndb_mgmclient(opt_connect_str,1);
   int ret= 0;
   if (!opt_execute_str)
Index: main/ndb/src/mgmsrv/MgmtSrvr.cpp
===================================================================
--- main.orig/ndb/src/mgmsrv/MgmtSrvr.cpp	2007-08-13 11:11:51.551248323 +1000
+++ main/ndb/src/mgmsrv/MgmtSrvr.cpp	2007-08-13 11:17:41.263177271 +1000
@@ -2890,7 +2890,7 @@ int MgmtSrvr::connect_to_self(void)
 {
   int r= 0;
   m_local_mgm_handle= ndb_mgm_create_handle();
-  snprintf(m_local_mgm_connect_string,sizeof(m_local_mgm_connect_string),
+  BaseString::snprintf(m_local_mgm_connect_string,sizeof(m_local_mgm_connect_string),
            "localhost:%u",getPort());
   ndb_mgm_set_connectstring(m_local_mgm_handle, m_local_mgm_connect_string);
 
Index: main/ndb/src/mgmsrv/main.cpp
===================================================================
--- main.orig/ndb/src/mgmsrv/main.cpp	2007-08-13 11:11:51.559248779 +1000
+++ main/ndb/src/mgmsrv/main.cpp	2007-08-13 11:17:41.291178866 +1000
@@ -16,6 +16,11 @@
 #include <ndb_global.h>
 #include <ndb_opts.h>
 
+#ifdef NDB_WIN32
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+
 #include "MgmtSrvr.hpp"
 #include "EventLogger.hpp"
 #include <Config.hpp>
@@ -235,8 +240,13 @@ start:
 
   if (opt_mycnf == 0 && opt_config_filename == 0)
   {
+#ifndef NDB_WIN32
     struct stat buf;
     if (stat("config.ini", &buf) != -1)
+#else
+    struct _stat buf;
+    if (_stat("config.ini", &buf) != -1)
+#endif
       opt_config_filename = "config.ini";
   }
   
Index: main/sql/ha_ndbcluster.cc
===================================================================
--- main.orig/sql/ha_ndbcluster.cc	2007-08-13 11:16:21.166612827 +1000
+++ main/sql/ha_ndbcluster.cc	2007-08-13 11:17:41.323180690 +1000
@@ -666,7 +666,7 @@ int ha_ndbcluster::set_ndb_key(NdbOperat
 int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, 
                                  uint fieldnr, bool *set_blob_value)
 {
-  const byte* field_ptr= field->ptr;
+  const byte* field_ptr= (byte*) field->ptr;
   uint32 pack_len=  field->pack_length();
   DBUG_ENTER("set_ndb_value");
   DBUG_PRINT("enter", ("%d: %s, type: %u, len=%d, is_null=%s", 
@@ -729,7 +729,7 @@ int ha_ndbcluster::set_ndb_value(NdbOper
       Field_blob *field_blob= (Field_blob*)field;
 
       // Get length and pointer to data
-      uint32 blob_len= field_blob->get_length(field_ptr);
+      uint32 blob_len= field_blob->get_length((char*) field_ptr);
       char* blob_ptr= NULL;
       field_blob->get_ptr(&blob_ptr);
 
@@ -861,15 +861,15 @@ int ha_ndbcluster::get_ndb_value(NdbOper
         {
           byte *field_buf;
           if (field->pack_length() != 0)
-            field_buf= buf + (field->ptr - table->record[0]);
+            field_buf= buf + ((byte*) field->ptr - table->record[0]);
           else
             field_buf= (byte *)&dummy_buf;
-          m_value[fieldnr].rec= ndb_op->getValue(fieldnr, 
-                                                 field_buf);
+          m_value[fieldnr].rec= ndb_op->getValue((Uint32) fieldnr, 
+                                                 (char*) field_buf);
         }
         else // if (field->type() == MYSQL_TYPE_BIT)
         {
-          m_value[fieldnr].rec= ndb_op->getValue(fieldnr);
+          m_value[fieldnr].rec= ndb_op->getValue((Uint32) fieldnr);
         }
         DBUG_RETURN(m_value[fieldnr].rec == NULL);
       }
@@ -888,7 +888,7 @@ int ha_ndbcluster::get_ndb_value(NdbOper
   }
 
   // Used for hidden key only
-  m_value[fieldnr].rec= ndb_op->getValue(fieldnr, m_ref);
+  m_value[fieldnr].rec= ndb_op->getValue((Uint32) fieldnr, (char*) m_ref);
   DBUG_RETURN(m_value[fieldnr].rec == NULL);
 }
 
@@ -1312,7 +1312,7 @@ static void shrink_varchar(Field* field,
         buf[0]= 255;
       }
       memmove(buf + 1, ptr + 2, pack_len - 1);
-      ptr= buf;
+      ptr= (byte*) buf;
     }
   }
 }
@@ -1971,7 +1971,7 @@ int ha_ndbcluster::set_bounds(NdbIndexSc
         p.part_ptr= &p.key->key[tot_len];
         p.part_null= key_part->null_bit && *p.part_ptr;
         p.bound_ptr= (const char *)
-          p.part_null ? 0 : key_part->null_bit ? p.part_ptr + 1 : p.part_ptr;
+          (p.part_null ? 0 : key_part->null_bit ? p.part_ptr + 1 : p.part_ptr);
 
         if (j == 0)
         {
@@ -2067,7 +2067,7 @@ int ha_ndbcluster::set_bounds(NdbIndexSc
         // Set bound if not cancelled via type -1
         if (p.bound_type != -1)
         {
-          const char* ptr= p.bound_ptr;
+          const byte* ptr= (const byte*) p.bound_ptr;
           char buf[256];
           shrink_varchar(field, ptr, buf);
           if (op->setBound(i, p.bound_type, ptr))
@@ -2546,7 +2546,7 @@ int ha_ndbcluster::update_row(const byte
       
       // Require that the PK for this record has previously been 
       // read into m_ref
-      DBUG_DUMP("key", m_ref, NDB_HIDDEN_PRIMARY_KEY_LENGTH);
+      DBUG_DUMP("key", (char*) m_ref, NDB_HIDDEN_PRIMARY_KEY_LENGTH);
       
       if (set_hidden_key(op, table->s->fields, m_ref))
         ERR_RETURN(op->getNdbError());
@@ -5370,7 +5370,7 @@ int ndbcluster_find_files(THD *thd,const
   {
     bool file_on_disk= false;
     DBUG_PRINT("info", ("%s", file_name));     
-    if (hash_search(&ndb_tables, file_name, strlen(file_name)))
+    if (hash_search(&ndb_tables, (byte*) file_name, strlen(file_name)))
     {
       DBUG_PRINT("info", ("%s existed in NDB _and_ on disk ", file_name));
       file_on_disk= true;
@@ -5387,9 +5387,9 @@ int ndbcluster_find_files(THD *thd,const
       if (file_on_disk)
       {
 	// Ignore this ndb table
-	gptr record=  hash_search(&ndb_tables, file_name, strlen(file_name));
+	gptr record=  hash_search(&ndb_tables, (byte*) file_name, strlen(file_name));
 	DBUG_ASSERT(record);
-	hash_delete(&ndb_tables, record);
+	hash_delete(&ndb_tables, (byte*) record);
 	push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 			    ER_TABLE_EXISTS_ERROR,
 			    "Local table %s.%s shadows ndb table",
@@ -5420,8 +5420,8 @@ int ndbcluster_find_files(THD *thd,const
   List<char> create_list;
   for (i= 0 ; i < ndb_tables.records ; i++)
   {
-    file_name= hash_element(&ndb_tables, i);
-    if (!hash_search(&ok_tables, file_name, strlen(file_name)))
+    file_name= (char*) hash_element(&ndb_tables, i);
+    if (!hash_search(&ok_tables, (byte*) file_name, strlen(file_name)))
     {
       DBUG_PRINT("info", ("%s must be discovered", file_name));       
       // File is in list of ndb tables and not in ok_tables
@@ -6208,7 +6208,7 @@ static int unpackfrm(const void **unpack
      sql_print_error("unpackfrm: ver != 1");
      DBUG_RETURN(1);
    }
-   if (!(data= my_malloc(max(orglen, complen), MYF(MY_WME))))
+   if (!(data= (byte*) my_malloc(max(orglen, complen), MYF(MY_WME))))
    {
      sql_print_error("unpackfrm: my_malloc(%u)",
                      (unsigned int)max(orglen, complen));
@@ -6994,25 +6994,7 @@ pthread_handler_t ndb_util_thread_func(v
     }
 next:
     /* Calculate new time to wake up */
-    int secs= 0;
-    int msecs= ndb_cache_check_time;
-
-    struct timeval tick_time;
-    gettimeofday(&tick_time, 0);
-    abstime.tv_sec=  tick_time.tv_sec;
-    abstime.tv_nsec= tick_time.tv_usec * 1000;
-
-    if (msecs >= 1000){
-      secs=  msecs / 1000;
-      msecs= msecs % 1000;
-    }
-
-    abstime.tv_sec+=  secs;
-    abstime.tv_nsec+= msecs * 1000000;
-    if (abstime.tv_nsec >= 1000000000) {
-      abstime.tv_sec+=  1;
-      abstime.tv_nsec-= 1000000000;
-    }
+    set_timespec_nsec(abstime, (ulonglong)(ndb_cache_check_time * ULL(1000000)));
   }
 
   if (share_list)
Index: main/ndb/src/common/util/SocketClient.cpp
===================================================================
--- main.orig/ndb/src/common/util/SocketClient.cpp	2007-08-13 11:11:50.963214813 +1000
+++ main/ndb/src/common/util/SocketClient.cpp	2007-08-13 11:17:41.343181830 +1000
@@ -136,15 +136,24 @@ SocketClient::connect(const char *toaddr
       return NDB_INVALID_SOCKET;
   }
 
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64)
+  flags= 1;
+  ioctlsocket(m_sockfd, FIONBIO, (unsigned long*) &flags);
+#else
   flags= fcntl(m_sockfd, F_GETFL, 0);
   fcntl(m_sockfd, F_SETFL, flags | O_NONBLOCK);
+#endif
 
   r= ::connect(m_sockfd, (struct sockaddr*) &m_servaddr, sizeof(m_servaddr));
 
   if (r == 0)
     goto done; // connected immediately.
 
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64)
+  if (r < 0 && (errno != WSAEINPROGRESS)) {
+#else
   if (r < 0 && (errno != EINPROGRESS)) {
+#endif
     NDB_CLOSE_SOCKET(m_sockfd);
     m_sockfd= NDB_INVALID_SOCKET;
     return NDB_INVALID_SOCKET;
@@ -168,7 +177,7 @@ SocketClient::connect(const char *toaddr
   if (FD_ISSET(m_sockfd, &rset) || FD_ISSET(m_sockfd, &wset))
   {
     len= sizeof(r);
-    if (getsockopt(m_sockfd, SOL_SOCKET, SO_ERROR, &r, &len) < 0 || r)
+    if (getsockopt(m_sockfd, SOL_SOCKET, SO_ERROR, (char *)&r, &len) < 0 || r)
     {
       // Solaris got an error... different than others
       NDB_CLOSE_SOCKET(m_sockfd);
@@ -185,7 +194,12 @@ SocketClient::connect(const char *toaddr
   }
 
 done:
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64)
+  flags= 0;
+  ioctlsocket(m_sockfd, FIONBIO, (unsigned long*) &flags);
+#else
   fcntl(m_sockfd, F_SETFL, flags);
+#endif
 
   if (m_auth) {
     if (!m_auth->client_authenticate(m_sockfd))
Index: main/ndb/src/common/util/basestring_vsnprintf.c
===================================================================
--- main.orig/ndb/src/common/util/basestring_vsnprintf.c	2007-08-13 11:11:51.011217549
+1000
+++ main/ndb/src/common/util/basestring_vsnprintf.c	2007-08-13 11:17:41.371183425 +1000
@@ -19,7 +19,11 @@
 #endif
 #include <stdio.h>
 #include <basestring_vsnprintf.h>
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64)
+#include <config-win.h>
+#else
 #include <my_config.h>
+#endif
 
 #ifdef _WINDOWS
 #define SNPRINTF_RETURN_TRUNC
Index: main/ndb/src/mgmapi/ndb_logevent.cpp
===================================================================
--- main.orig/ndb/src/mgmapi/ndb_logevent.cpp	2007-08-13 11:11:51.519246500 +1000
+++ main/ndb/src/mgmapi/ndb_logevent.cpp	2007-08-13 11:17:41.391184565 +1000
@@ -17,6 +17,10 @@
 #include <my_sys.h>
 #include <mgmapi.h>
 
+#ifdef NDB_WIN32
+#include <sys/timeb.h>
+#endif
+
 #include <NdbOut.hpp>
 #include <Properties.hpp>
 #include <socket_io.h>
@@ -386,8 +390,13 @@ int ndb_logevent_get_next(const NdbLogEv
   Properties p;
   char buf[256];
 
+#ifdef NDB_WIN32
+  struct _timeb start_time;
+  _ftime(&start_time);
+#else
   struct timeval start_time;
   gettimeofday(&start_time, 0);
+#endif
 
   /* header */
   while (1) {
@@ -407,10 +416,17 @@ int ndb_logevent_get_next(const NdbLogEv
     if ( strcmp("<PING>\n", buf) )
       ndbout_c("skipped: %s", buf);
 
+#ifdef NDB_WIN32
+  struct _timeb now;
+  _ftime(&now);
+  unsigned elapsed_ms= (signed int)(now.time-start_time.time)*1000 +
+      ((signed int)now.millitm-(signed int)start_time.millitm);
+#else
     struct timeval now;
     gettimeofday(&now, 0);
     unsigned elapsed_ms= (now.tv_sec-start_time.tv_sec)*1000 +
       ((signed int)now.tv_usec-(signed int)start_time.tv_usec)/1000;
+#endif
 
     if (elapsed_ms >= timeout_in_milliseconds)
     {

--
Stewart Smith
Thread
[patch 2/2] bk commit into 5.0 tree (antony:1.2489)stewart29 Aug