diff options
author | unknown <joreland@mysql.com> | 2004-11-11 21:38:42 +0100 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2004-11-11 21:38:42 +0100 |
commit | f2cbfb80a7642eccae891aba6a50e52b4edcfda1 (patch) | |
tree | 8899fcf6cca00b379116d12079d04ab6e9df2a32 /ndb/src/common/portlib | |
parent | 44af4e4a99e866dd6ee29809a1f1efd4f18ce3f8 (diff) | |
download | mariadb-git-f2cbfb80a7642eccae891aba6a50e52b4edcfda1.tar.gz |
wl1744 - ndb win-port
ndb/include/ndbapi/NdbDictionary.hpp:
win-port
ndb/include/ndbapi/ndb_cluster_connection.hpp:
win-port
ndb/include/util/SocketServer.hpp:
win-port
ndb/src/common/portlib/win32/NdbCondition.c:
win-port
ndb/src/common/portlib/win32/NdbEnv.c:
win-port
ndb/src/common/portlib/win32/NdbHost.c:
win-port
ndb/src/common/portlib/win32/NdbMem.c:
win-port
ndb/src/common/portlib/win32/NdbMutex.c:
win-port
ndb/src/common/portlib/win32/NdbSleep.c:
win-port
ndb/src/common/portlib/win32/NdbTCP.c:
win-port
ndb/src/common/portlib/win32/NdbThread.c:
win-port
ndb/src/common/portlib/win32/NdbTick.c:
win-port
ndb/src/common/util/File.cpp:
win-port
ndb/src/mgmsrv/ConfigInfo.cpp:
win-port
ndb/src/mgmsrv/InitConfigFileParser.cpp:
win-port
ndb/src/mgmsrv/MgmtSrvr.cpp:
win-port
ndb/src/mgmsrv/MgmtSrvr.hpp:
win-port
ndb/src/mgmsrv/Services.cpp:
win-port
ndb/src/mgmsrv/Services.hpp:
win-port
ndb/src/mgmsrv/SignalQueue.hpp:
win-port
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
win-port
ndb/test/src/NdbRestarts.cpp:
win-port
Diffstat (limited to 'ndb/src/common/portlib')
-rw-r--r-- | ndb/src/common/portlib/win32/NdbCondition.c | 8 | ||||
-rw-r--r-- | ndb/src/common/portlib/win32/NdbEnv.c | 4 | ||||
-rw-r--r-- | ndb/src/common/portlib/win32/NdbHost.c | 3 | ||||
-rw-r--r-- | ndb/src/common/portlib/win32/NdbMem.c | 58 | ||||
-rw-r--r-- | ndb/src/common/portlib/win32/NdbMutex.c | 8 | ||||
-rw-r--r-- | ndb/src/common/portlib/win32/NdbSleep.c | 5 | ||||
-rw-r--r-- | ndb/src/common/portlib/win32/NdbTCP.c | 2 | ||||
-rw-r--r-- | ndb/src/common/portlib/win32/NdbThread.c | 8 | ||||
-rw-r--r-- | ndb/src/common/portlib/win32/NdbTick.c | 4 |
9 files changed, 62 insertions, 38 deletions
diff --git a/ndb/src/common/portlib/win32/NdbCondition.c b/ndb/src/common/portlib/win32/NdbCondition.c index 12b508cf33b..4046db1d60a 100644 --- a/ndb/src/common/portlib/win32/NdbCondition.c +++ b/ndb/src/common/portlib/win32/NdbCondition.c @@ -15,16 +15,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <winsock2.h> -#include <ws2tcpip.h> -#include <windows.h> -#include <assert.h> -#include <sys/types.h> - +#include <ndb_global.h> #include "NdbCondition.h" #include <NdbMutex.h> - struct NdbCondition { long nWaiters; diff --git a/ndb/src/common/portlib/win32/NdbEnv.c b/ndb/src/common/portlib/win32/NdbEnv.c index 0df703a5e97..f42e685fe15 100644 --- a/ndb/src/common/portlib/win32/NdbEnv.c +++ b/ndb/src/common/portlib/win32/NdbEnv.c @@ -14,10 +14,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - +#include <ndb_global.h> #include "NdbEnv.h" -#include <string.h> -#include <stdlib.h> const char* NdbEnv_GetEnv(const char* name, char * buf, int buflen) { diff --git a/ndb/src/common/portlib/win32/NdbHost.c b/ndb/src/common/portlib/win32/NdbHost.c index f91dd1a531c..7df96c45991 100644 --- a/ndb/src/common/portlib/win32/NdbHost.c +++ b/ndb/src/common/portlib/win32/NdbHost.c @@ -15,9 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include "NdbHost.h" -#include <windows.h> -#include <process.h> int NdbHost_GetHostName(char* buf) diff --git a/ndb/src/common/portlib/win32/NdbMem.c b/ndb/src/common/portlib/win32/NdbMem.c index 274dc31353f..313ca9dff66 100644 --- a/ndb/src/common/portlib/win32/NdbMem.c +++ b/ndb/src/common/portlib/win32/NdbMem.c @@ -14,14 +14,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include <windows.h> -#include <assert.h> -#include <NdbStdio.h> - +#include <ndb_global.h> #include "NdbMem.h" - +#if 0 struct AWEINFO { SIZE_T dwSizeInBytesRequested; @@ -235,3 +231,53 @@ int NdbMem_MemUnlockAll() return -1; } +#endif + +void NdbMem_Create() +{ + /* Do nothing */ + return; +} + +void NdbMem_Destroy() +{ + /* Do nothing */ + return; +} + + +void* NdbMem_Allocate(size_t size) +{ + void* mem_allocated; + assert(size > 0); + mem_allocated= (void*)malloc(size); + return mem_allocated; +} + +void* NdbMem_AllocateAlign(size_t size, size_t alignment) +{ + (void)alignment; /* remove warning for unused parameter */ + /* + return (void*)memalign(alignment, size); + TEMP fix + */ + return (void*)malloc(size); +} + + +void NdbMem_Free(void* ptr) +{ + free(ptr); +} + + +int NdbMem_MemLockAll() +{ + return 0; +} + +int NdbMem_MemUnlockAll() +{ + return 0; +} + diff --git a/ndb/src/common/portlib/win32/NdbMutex.c b/ndb/src/common/portlib/win32/NdbMutex.c index c93384d91db..83c126abd4d 100644 --- a/ndb/src/common/portlib/win32/NdbMutex.c +++ b/ndb/src/common/portlib/win32/NdbMutex.c @@ -15,15 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <winsock2.h> -#include <ws2tcpip.h> -#include <windows.h> -#include <time.h> -#include <assert.h> - +#include <ndb_global.h> #include "NdbMutex.h" - NdbMutex* NdbMutex_Create(void) { NdbMutex* pNdbMutex = (NdbMutex*)malloc(sizeof(NdbMutex)); diff --git a/ndb/src/common/portlib/win32/NdbSleep.c b/ndb/src/common/portlib/win32/NdbSleep.c index ac0f44dd07f..8f5bdc49acd 100644 --- a/ndb/src/common/portlib/win32/NdbSleep.c +++ b/ndb/src/common/portlib/win32/NdbSleep.c @@ -14,12 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - +#include <ndb_global.h> #include "NdbSleep.h" -#include <windows.h> - - int NdbSleep_MilliSleep(int milliseconds) { diff --git a/ndb/src/common/portlib/win32/NdbTCP.c b/ndb/src/common/portlib/win32/NdbTCP.c index 483a53bd606..b936cd2db6c 100644 --- a/ndb/src/common/portlib/win32/NdbTCP.c +++ b/ndb/src/common/portlib/win32/NdbTCP.c @@ -14,7 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - +#include <ndb_global.h> #include "NdbTCP.h" int diff --git a/ndb/src/common/portlib/win32/NdbThread.c b/ndb/src/common/portlib/win32/NdbThread.c index ae3c74be70d..98db0d5c287 100644 --- a/ndb/src/common/portlib/win32/NdbThread.c +++ b/ndb/src/common/portlib/win32/NdbThread.c @@ -14,13 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include <windows.h> -#include <process.h> -#include <assert.h> - +#include <ndb_global.h> #include "NdbThread.h" - +#include <process.h> #define MAX_THREAD_NAME 16 diff --git a/ndb/src/common/portlib/win32/NdbTick.c b/ndb/src/common/portlib/win32/NdbTick.c index e3a67d8437d..4430cbf419b 100644 --- a/ndb/src/common/portlib/win32/NdbTick.c +++ b/ndb/src/common/portlib/win32/NdbTick.c @@ -14,9 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#include <windows.h> +#include <ndb_global.h> #include "NdbTick.h" +//#include <windows.h> /* #define FILETIME_PER_MICROSEC 10 |