Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6600cd3e
Commit
6600cd3e
authored
Nov 11, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wl1744 - ndb on windoze
parent
02209bb0
Changes
53
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
964 additions
and
82 deletions
+964
-82
ndb/Makefile.am
ndb/Makefile.am
+3
-1
ndb/src/Makefile.am
ndb/src/Makefile.am
+3
-2
ndb/src/common/debugger/Makefile.am
ndb/src/common/debugger/Makefile.am
+1
-1
ndb/src/common/debugger/signaldata/Makefile.am
ndb/src/common/debugger/signaldata/Makefile.am
+1
-1
ndb/src/common/logger/Makefile.am
ndb/src/common/logger/Makefile.am
+5
-4
ndb/src/common/mgmcommon/Makefile.am
ndb/src/common/mgmcommon/Makefile.am
+1
-1
ndb/src/common/portlib/Makefile.am
ndb/src/common/portlib/Makefile.am
+12
-2
ndb/src/common/portlib/win32/NdbCondition.c
ndb/src/common/portlib/win32/NdbCondition.c
+184
-0
ndb/src/common/portlib/win32/NdbDaemon.c
ndb/src/common/portlib/win32/NdbDaemon.c
+44
-0
ndb/src/common/portlib/win32/NdbEnv.c
ndb/src/common/portlib/win32/NdbEnv.c
+33
-0
ndb/src/common/portlib/win32/NdbHost.c
ndb/src/common/portlib/win32/NdbHost.c
+53
-0
ndb/src/common/portlib/win32/NdbMem.c
ndb/src/common/portlib/win32/NdbMem.c
+237
-0
ndb/src/common/portlib/win32/NdbMutex.c
ndb/src/common/portlib/win32/NdbMutex.c
+78
-0
ndb/src/common/portlib/win32/NdbSleep.c
ndb/src/common/portlib/win32/NdbSleep.c
+35
-0
ndb/src/common/portlib/win32/NdbTCP.c
ndb/src/common/portlib/win32/NdbTCP.c
+39
-0
ndb/src/common/portlib/win32/NdbThread.c
ndb/src/common/portlib/win32/NdbThread.c
+118
-0
ndb/src/common/portlib/win32/NdbTick.c
ndb/src/common/portlib/win32/NdbTick.c
+64
-0
ndb/src/common/transporter/Makefile.am
ndb/src/common/transporter/Makefile.am
+1
-1
ndb/src/common/util/File.cpp
ndb/src/common/util/File.cpp
+8
-3
ndb/src/common/util/Makefile.am
ndb/src/common/util/Makefile.am
+1
-1
ndb/src/cw/cpcd/Makefile.am
ndb/src/cw/cpcd/Makefile.am
+1
-13
ndb/src/kernel/Makefile.am
ndb/src/kernel/Makefile.am
+3
-3
ndb/src/kernel/blocks/backup/Makefile.am
ndb/src/kernel/blocks/backup/Makefile.am
+1
-1
ndb/src/kernel/blocks/backup/restore/Makefile.am
ndb/src/kernel/blocks/backup/restore/Makefile.am
+4
-4
ndb/src/kernel/blocks/cmvmi/Makefile.am
ndb/src/kernel/blocks/cmvmi/Makefile.am
+1
-1
ndb/src/kernel/blocks/dbacc/Makefile.am
ndb/src/kernel/blocks/dbacc/Makefile.am
+1
-1
ndb/src/kernel/blocks/dbdict/Makefile.am
ndb/src/kernel/blocks/dbdict/Makefile.am
+1
-1
ndb/src/kernel/blocks/dbdih/Makefile.am
ndb/src/kernel/blocks/dbdih/Makefile.am
+1
-1
ndb/src/kernel/blocks/dblqh/Makefile.am
ndb/src/kernel/blocks/dblqh/Makefile.am
+1
-1
ndb/src/kernel/blocks/dbtc/Makefile.am
ndb/src/kernel/blocks/dbtc/Makefile.am
+1
-1
ndb/src/kernel/blocks/dbtup/Makefile.am
ndb/src/kernel/blocks/dbtup/Makefile.am
+1
-1
ndb/src/kernel/blocks/dbtux/Makefile.am
ndb/src/kernel/blocks/dbtux/Makefile.am
+1
-1
ndb/src/kernel/blocks/dbutil/Makefile.am
ndb/src/kernel/blocks/dbutil/Makefile.am
+4
-4
ndb/src/kernel/blocks/grep/Makefile.am
ndb/src/kernel/blocks/grep/Makefile.am
+1
-1
ndb/src/kernel/blocks/ndbcntr/Makefile.am
ndb/src/kernel/blocks/ndbcntr/Makefile.am
+1
-1
ndb/src/kernel/blocks/ndbfs/Makefile.am
ndb/src/kernel/blocks/ndbfs/Makefile.am
+1
-1
ndb/src/kernel/blocks/qmgr/Makefile.am
ndb/src/kernel/blocks/qmgr/Makefile.am
+1
-1
ndb/src/kernel/blocks/suma/Makefile.am
ndb/src/kernel/blocks/suma/Makefile.am
+1
-1
ndb/src/kernel/blocks/trix/Makefile.am
ndb/src/kernel/blocks/trix/Makefile.am
+1
-1
ndb/src/kernel/error/Makefile.am
ndb/src/kernel/error/Makefile.am
+1
-1
ndb/src/kernel/vm/Makefile.am
ndb/src/kernel/vm/Makefile.am
+1
-1
ndb/src/mgmapi/Makefile.am
ndb/src/mgmapi/Makefile.am
+1
-1
ndb/src/mgmsrv/InitConfigFileParser.cpp
ndb/src/mgmsrv/InitConfigFileParser.cpp
+1
-0
ndb/src/mgmsrv/Makefile.am
ndb/src/mgmsrv/Makefile.am
+3
-3
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+1
-0
ndb/src/ndbapi/Makefile.am
ndb/src/ndbapi/Makefile.am
+1
-1
ndb/src/ndbapi/ndberror.c
ndb/src/ndbapi/ndberror.c
+1
-0
ndb/test/include/NdbSchemaOp.hpp
ndb/test/include/NdbSchemaOp.hpp
+2
-0
ndb/test/run-test/Makefile.am
ndb/test/run-test/Makefile.am
+1
-13
ndb/test/src/CpcClient.cpp
ndb/test/src/CpcClient.cpp
+0
-3
ndb/test/src/Makefile.am
ndb/test/src/Makefile.am
+1
-1
ndb/test/src/NdbRestarter.cpp
ndb/test/src/NdbRestarter.cpp
+1
-1
ndb/test/src/getarg.c
ndb/test/src/getarg.c
+1
-1
No files found.
ndb/Makefile.am
View file @
6600cd3e
...
...
@@ -24,4 +24,6 @@ windoze:
windoze-dsp
:
all-windoze-dsp
:
windoze
tar
cvfz ndb-win-dsp.tar.gz
`
find
.
-name
'*.dsp'
`
find
.
-name
'*.dsp'
| xargs unix2dos
$(top_srcdir)
/ndb/config/make-win-dsw.sh | unix2dos
>
ndb.dsw
tar
cvfz ndb-win-dsp.tar.gz ndb.dsw
`
find
.
-name
'*.dsp'
`
ndb/src/Makefile.am
View file @
6600cd3e
...
...
@@ -28,5 +28,6 @@ libndbclient.dsp: Makefile \
cat
$(top_srcdir)
/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(ndblib_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libndbclient_la_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(libndbclient_la_LIBADD)
@
$(top_srcdir)
/ndb/config/win-sources
$@
dummy.cpp
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(libndbclient_la_LIBADD)
@
touch
dummy.cpp
ndb/src/common/debugger/Makefile.am
View file @
6600cd3e
...
...
@@ -22,4 +22,4 @@ libtrace.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libtrace_la_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/common/debugger/signaldata/Makefile.am
View file @
6600cd3e
...
...
@@ -44,4 +44,4 @@ libsignaldataprint.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libsignaldataprint_la_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/common/logger/Makefile.am
View file @
6600cd3e
noinst_LTLIBRARIES
=
liblogger.la
liblogger_la_SOURCES
=
Logger.cpp LogHandlerList.cpp LogHandler.cpp
\
ConsoleLogHandler.cpp FileLogHandler.cpp SysLogHandler.cpp
SOURCE_WIN
=
Logger.cpp LogHandlerList.cpp LogHandler.cpp
\
ConsoleLogHandler.cpp FileLogHandler.cpp
liblogger_la_SOURCES
=
$(SOURCE_WIN)
SysLogHandler.cpp
include
$(top_srcdir)/ndb/config/common.mk.am
include
$(top_srcdir)/ndb/config/type_ndbapi.mk.am
...
...
@@ -20,5 +21,5 @@ liblogger.dsp: Makefile \
cat
$(top_srcdir)
/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(
liblogger_la_SOURCES
)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(
SOURCE_WIN
)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/common/mgmcommon/Makefile.am
View file @
6600cd3e
...
...
@@ -26,4 +26,4 @@ libmgmsrvcommon.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libmgmsrvcommon_la_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/common/portlib/Makefile.am
View file @
6600cd3e
...
...
@@ -16,6 +16,16 @@ PortLibTest_SOURCES = NdbPortLibTest.cpp
munmaptest_SOURCES
=
munmaptest.cpp
# Don't update the files from bitkeeper
WIN_src
=
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
windoze-dsp
:
libportlib.dsp
...
...
@@ -28,5 +38,5 @@ libportlib.dsp: Makefile \
cat
$(top_srcdir)
/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(
libportlib_la_SOURCES
)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(
WIN_src
)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/common/portlib/win32/NdbCondition.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <assert.h>
#include <sys/types.h>
#include "NdbCondition.h"
#include <NdbMutex.h>
struct
NdbCondition
{
long
nWaiters
;
NdbMutex
*
pNdbMutexWaitersLock
;
HANDLE
hSemaphore
;
HANDLE
hEventWaitersDone
;
int
bWasBroadcast
;
};
struct
NdbCondition
*
NdbCondition_Create
(
void
)
{
int
result
=
0
;
struct
NdbCondition
*
pNdbCondition
=
(
struct
NdbCondition
*
)
malloc
(
sizeof
(
struct
NdbCondition
));
if
(
!
pNdbCondition
)
return
0
;
pNdbCondition
->
nWaiters
=
0
;
pNdbCondition
->
bWasBroadcast
=
0
;
if
(
!
(
pNdbCondition
->
hSemaphore
=
CreateSemaphore
(
0
,
0
,
MAXLONG
,
0
)))
result
=
-
1
;
else
if
(
!
(
pNdbCondition
->
pNdbMutexWaitersLock
=
NdbMutex_Create
()))
result
=
-
1
;
else
if
(
!
(
pNdbCondition
->
hEventWaitersDone
=
CreateEvent
(
0
,
0
,
0
,
0
)))
result
=
-
1
;
assert
(
!
result
);
return
pNdbCondition
;
}
int
NdbCondition_Wait
(
struct
NdbCondition
*
p_cond
,
NdbMutex
*
p_mutex
)
{
int
result
;
int
bLastWaiter
;
if
(
!
p_cond
||
!
p_mutex
)
return
1
;
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
);
return
result
;
}
int
NdbCondition_WaitTimeout
(
struct
NdbCondition
*
p_cond
,
NdbMutex
*
p_mutex
,
int
msecs
)
{
int
result
;
int
bLastWaiter
;
if
(
!
p_cond
||
!
p_mutex
)
return
1
;
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
);
return
result
;
}
int
NdbCondition_Signal
(
struct
NdbCondition
*
p_cond
)
{
int
bHaveWaiters
;
if
(
!
p_cond
)
return
1
;
NdbMutex_Lock
(
p_cond
->
pNdbMutexWaitersLock
);
bHaveWaiters
=
(
p_cond
->
nWaiters
>
0
);
NdbMutex_Unlock
(
p_cond
->
pNdbMutexWaitersLock
);
if
(
bHaveWaiters
)
return
(
ReleaseSemaphore
(
p_cond
->
hSemaphore
,
1
,
0
)
?
0
:
-
1
);
else
return
0
;
}
int
NdbCondition_Broadcast
(
struct
NdbCondition
*
p_cond
)
{
int
bHaveWaiters
;
int
result
=
0
;
if
(
!
p_cond
)
return
1
;
NdbMutex_Lock
(
p_cond
->
pNdbMutexWaitersLock
);
bHaveWaiters
=
0
;
if
(
p_cond
->
nWaiters
>
0
)
{
p_cond
->
bWasBroadcast
=
!
0
;
bHaveWaiters
=
1
;
}
NdbMutex_Unlock
(
p_cond
->
pNdbMutexWaitersLock
);
if
(
bHaveWaiters
)
{
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
;
}
return
result
;
}
int
NdbCondition_Destroy
(
struct
NdbCondition
*
p_cond
)
{
int
result
;
if
(
!
p_cond
)
return
1
;
CloseHandle
(
p_cond
->
hEventWaitersDone
);
NdbMutex_Destroy
(
p_cond
->
pNdbMutexWaitersLock
);
result
=
(
CloseHandle
(
p_cond
->
hSemaphore
)
?
0
:
-
1
);
free
(
p_cond
);
return
0
;
}
ndb/src/common/portlib/win32/NdbDaemon.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "NdbDaemon.h"
#define NdbDaemon_ErrorSize 500
long
NdbDaemon_DaemonPid
;
int
NdbDaemon_ErrorCode
;
char
NdbDaemon_ErrorText
[
NdbDaemon_ErrorSize
];
int
NdbDaemon_Make
(
const
char
*
lockfile
,
const
char
*
logfile
,
unsigned
flags
)
{
// XXX do something
return
0
;
}
#ifdef NDB_DAEMON_TEST
int
main
()
{
if
(
NdbDaemon_Make
(
"test.pid"
,
"test.log"
,
0
)
==
-
1
)
{
fprintf
(
stderr
,
"NdbDaemon_Make: %s
\n
"
,
NdbDaemon_ErrorText
);
return
1
;
}
sleep
(
10
);
return
0
;
}
#endif
ndb/src/common/portlib/win32/NdbEnv.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "NdbEnv.h"
#include <string.h>
#include <stdlib.h>
const
char
*
NdbEnv_GetEnv
(
const
char
*
name
,
char
*
buf
,
int
buflen
)
{
char
*
p
=
NULL
;
p
=
getenv
(
name
);
if
(
p
!=
NULL
&&
buf
!=
NULL
){
strncpy
(
buf
,
p
,
buflen
);
buf
[
buflen
-
1
]
=
0
;
}
return
p
;
}
ndb/src/common/portlib/win32/NdbHost.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "NdbHost.h"
#include <windows.h>
#include <process.h>
int
NdbHost_GetHostName
(
char
*
buf
)
{
/* 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
;
}
return
0
;
}
int
NdbHost_GetProcessId
(
void
)
{
return
_getpid
();
}
ndb/src/common/portlib/win32/NdbMem.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <windows.h>
#include <assert.h>
#include <NdbStdio.h>
#include "NdbMem.h"
struct
AWEINFO
{
SIZE_T
dwSizeInBytesRequested
;
ULONG_PTR
nNumberOfPagesRequested
;
ULONG_PTR
nNumberOfPagesActual
;
ULONG_PTR
nNumberOfPagesFreed
;
ULONG_PTR
*
pnPhysicalMemoryPageArray
;
void
*
pRegionReserved
;
};
const
size_t
cNdbMem_nMaxAWEinfo
=
256
;
size_t
gNdbMem_nAWEinfo
=
0
;
struct
AWEINFO
*
gNdbMem_pAWEinfo
=
0
;
void
ShowLastError
(
const
char
*
szContext
,
const
char
*
szFunction
)
{
DWORD
dwError
=
GetLastError
();
LPVOID
lpMsgBuf
;
FormatMessage
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
NULL
,
dwError
,
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
// Default language
(
LPTSTR
)
&
lpMsgBuf
,
0
,
NULL
);
printf
(
"%s : %s failed : %lu : %s
\n
"
,
szContext
,
szFunction
,
dwError
,
(
char
*
)
lpMsgBuf
);
LocalFree
(
lpMsgBuf
);
}
void
NdbMem_Create
()
{
// Address Windowing Extensions
struct
PRIVINFO
{
DWORD
Count
;
LUID_AND_ATTRIBUTES
Privilege
[
1
];
}
Info
;
HANDLE
hProcess
=
GetCurrentProcess
();
HANDLE
hToken
;
if
(
!
OpenProcessToken
(
hProcess
,
TOKEN_ADJUST_PRIVILEGES
,
&
hToken
))
{
ShowLastError
(
"NdbMem_Create"
,
"OpenProcessToken"
);
}
Info
.
Count
=
1
;
Info
.
Privilege
[
0
].
Attributes
=
SE_PRIVILEGE_ENABLED
;
if
(
!
LookupPrivilegeValue
(
0
,
SE_LOCK_MEMORY_NAME
,
&
(
Info
.
Privilege
[
0
].
Luid
)))
{
ShowLastError
(
"NdbMem_Create"
,
"LookupPrivilegeValue"
);
}
if
(
!
AdjustTokenPrivileges
(
hToken
,
FALSE
,
(
PTOKEN_PRIVILEGES
)
&
Info
,
0
,
0
,
0
))
{
ShowLastError
(
"NdbMem_Create"
,
"AdjustTokenPrivileges"
);
}
if
(
!
CloseHandle
(
hToken
))
{
ShowLastError
(
"NdbMem_Create"
,
"CloseHandle"
);
}
return
;
}
void
NdbMem_Destroy
()
{
/* Do nothing */
return
;
}
void
*
NdbMem_Allocate
(
size_t
size
)
{
// Address Windowing Extensions
struct
AWEINFO
*
pAWEinfo
;
HANDLE
hProcess
;
SYSTEM_INFO
sysinfo
;
if
(
!
gNdbMem_pAWEinfo
)
{
gNdbMem_pAWEinfo
=
VirtualAlloc
(
0
,
sizeof
(
struct
AWEINFO
)
*
cNdbMem_nMaxAWEinfo
,
MEM_COMMIT
|
MEM_RESERVE
,
PAGE_READWRITE
);
}
assert
(
gNdbMem_nAWEinfo
<
cNdbMem_nMaxAWEinfo
);
pAWEinfo
=
gNdbMem_pAWEinfo
+
gNdbMem_nAWEinfo
++
;
hProcess
=
GetCurrentProcess
();
GetSystemInfo
(
&
sysinfo
);
pAWEinfo
->
nNumberOfPagesRequested
=
(
size
+
sysinfo
.
dwPageSize
-
1
)
/
sysinfo
.
dwPageSize
;
pAWEinfo
->
pnPhysicalMemoryPageArray
=
VirtualAlloc
(
0
,
sizeof
(
ULONG_PTR
)
*
pAWEinfo
->
nNumberOfPagesRequested
,
MEM_COMMIT
|
MEM_RESERVE
,
PAGE_READWRITE
);
pAWEinfo
->
nNumberOfPagesActual
=
pAWEinfo
->
nNumberOfPagesRequested
;
if
(
!
AllocateUserPhysicalPages
(
hProcess
,
&
(
pAWEinfo
->
nNumberOfPagesActual
),
pAWEinfo
->
pnPhysicalMemoryPageArray
))
{
ShowLastError
(
"NdbMem_Allocate"
,
"AllocateUserPhysicalPages"
);
return
0
;
}
if
(
pAWEinfo
->
nNumberOfPagesRequested
!=
pAWEinfo
->
nNumberOfPagesActual
)
{
ShowLastError
(
"NdbMem_Allocate"
,
"nNumberOfPagesRequested != nNumberOfPagesActual"
);
return
0
;
}
pAWEinfo
->
dwSizeInBytesRequested
=
size
;
pAWEinfo
->
pRegionReserved
=
VirtualAlloc
(
0
,
pAWEinfo
->
dwSizeInBytesRequested
,
MEM_RESERVE
|
MEM_PHYSICAL
,
PAGE_READWRITE
);
if
(
!
pAWEinfo
->
pRegionReserved
)
{
ShowLastError
(
"NdbMem_Allocate"
,
"VirtualAlloc"
);
return
0
;
}
if
(
!
MapUserPhysicalPages
(
pAWEinfo
->
pRegionReserved
,
pAWEinfo
->
nNumberOfPagesActual
,
pAWEinfo
->
pnPhysicalMemoryPageArray
))
{
ShowLastError
(
"NdbMem_Allocate"
,
"MapUserPhysicalPages"
);
return
0
;
}
/*
printf("allocate AWE memory: %lu bytes, %lu pages, address %lx\n",
pAWEinfo->dwSizeInBytesRequested,
pAWEinfo->nNumberOfPagesActual,
pAWEinfo->pRegionReserved);
*/
return
pAWEinfo
->
pRegionReserved
;
}
void
*
NdbMem_AllocateAlign
(
size_t
size
,
size_t
alignment
)
{
/*
return (void*)memalign(alignment, size);
TEMP fix
*/
return
NdbMem_Allocate
(
size
);
}
void
NdbMem_Free
(
void
*
ptr
)
{
// VirtualFree(ptr, 0, MEM_DECOMMIT|MEM_RELEASE);
// Address Windowing Extensions
struct
AWEINFO
*
pAWEinfo
=
0
;
size_t
i
;
HANDLE
hProcess
;
for
(
i
=
0
;
i
<
gNdbMem_nAWEinfo
;
++
i
)
{
if
(
ptr
==
gNdbMem_pAWEinfo
[
i
].
pRegionReserved
)
{
pAWEinfo
=
gNdbMem_pAWEinfo
+
i
;
}
}
if
(
!
pAWEinfo
)
{
ShowLastError
(
"NdbMem_Free"
,
"ptr is not AWE memory"
);
}
hProcess
=
GetCurrentProcess
();
if
(
!
MapUserPhysicalPages
(
ptr
,
pAWEinfo
->
nNumberOfPagesActual
,
0
))
{
ShowLastError
(
"NdbMem_Free"
,
"MapUserPhysicalPages"
);
}
if
(
!
VirtualFree
(
ptr
,
0
,
MEM_RELEASE
))
{
ShowLastError
(
"NdbMem_Free"
,
"VirtualFree"
);
}
pAWEinfo
->
nNumberOfPagesFreed
=
pAWEinfo
->
nNumberOfPagesActual
;
if
(
!
FreeUserPhysicalPages
(
hProcess
,
&
(
pAWEinfo
->
nNumberOfPagesFreed
),
pAWEinfo
->
pnPhysicalMemoryPageArray
))
{
ShowLastError
(
"NdbMem_Free"
,
"FreeUserPhysicalPages"
);
}
VirtualFree
(
pAWEinfo
->
pnPhysicalMemoryPageArray
,
0
,
MEM_DECOMMIT
|
MEM_RELEASE
);
}
int
NdbMem_MemLockAll
()
{
/*
HANDLE hProcess = GetCurrentProcess();
SIZE_T nMinimumWorkingSetSize;
SIZE_T nMaximumWorkingSetSize;
GetProcessWorkingSetSize(hProcess, &nMinimumWorkingSetSize, &nMaximumWorkingSetSize);
ndbout << "nMinimumWorkingSetSize=" << nMinimumWorkingSetSize << ", nMaximumWorkingSetSize=" << nMaximumWorkingSetSize << endl;
SetProcessWorkingSetSize(hProcess, 50000000, 100000000);
GetProcessWorkingSetSize(hProcess, &nMinimumWorkingSetSize, &nMaximumWorkingSetSize);
ndbout << "nMinimumWorkingSetSize=" << nMinimumWorkingSetSize << ", nMaximumWorkingSetSize=" << nMaximumWorkingSetSize << endl;
*/
return
-
1
;
}
int
NdbMem_MemUnlockAll
()
{
//VirtualUnlock();
return
-
1
;
}
ndb/src/common/portlib/win32/NdbMutex.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <time.h>
#include <assert.h>
#include "NdbMutex.h"
NdbMutex
*
NdbMutex_Create
(
void
)
{
NdbMutex
*
pNdbMutex
=
(
NdbMutex
*
)
malloc
(
sizeof
(
NdbMutex
));
if
(
!
pNdbMutex
)
return
0
;
InitializeCriticalSection
(
pNdbMutex
);
return
pNdbMutex
;
}
int
NdbMutex_Destroy
(
NdbMutex
*
p_mutex
)
{
if
(
!
p_mutex
)
return
-
1
;
DeleteCriticalSection
(
p_mutex
);
free
(
p_mutex
);
return
0
;
}
int
NdbMutex_Lock
(
NdbMutex
*
p_mutex
)
{
if
(
!
p_mutex
)
return
-
1
;
EnterCriticalSection
(
p_mutex
);
return
0
;
}
int
NdbMutex_Unlock
(
NdbMutex
*
p_mutex
)
{
if
(
!
p_mutex
)
return
-
1
;
LeaveCriticalSection
(
p_mutex
);
return
0
;
}
int
NdbMutex_Trylock
(
NdbMutex
*
p_mutex
)
{
int
result
=
-
1
;
if
(
p_mutex
)
{
result
=
(
TryEnterCriticalSection
(
p_mutex
)
?
0
:
-
1
);
}
return
result
;
}
ndb/src/common/portlib/win32/NdbSleep.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "NdbSleep.h"
#include <windows.h>
int
NdbSleep_MilliSleep
(
int
milliseconds
)
{
Sleep
(
milliseconds
);
return
0
;
}
int
NdbSleep_SecSleep
(
int
seconds
)
{
return
NdbSleep_MilliSleep
(
seconds
*
1000
);
}
ndb/src/common/portlib/win32/NdbTCP.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "NdbTCP.h"
int
Ndb_getInAddr
(
struct
in_addr
*
dst
,
const
char
*
address
)
{
struct
hostent
*
hostPtr
;
/* Try it as aaa.bbb.ccc.ddd. */
dst
->
s_addr
=
inet_addr
(
address
);
if
(
dst
->
s_addr
!=
-
1
)
{
return
0
;
}
hostPtr
=
gethostbyname
(
address
);
if
(
hostPtr
!=
NULL
)
{
dst
->
s_addr
=
((
struct
in_addr
*
)
*
hostPtr
->
h_addr_list
)
->
s_addr
;
return
0
;
}
return
-
1
;
}
ndb/src/common/portlib/win32/NdbThread.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <windows.h>
#include <process.h>
#include <assert.h>
#include "NdbThread.h"
#define MAX_THREAD_NAME 16
typedef
unsigned
(
WINAPI
*
NDB_WIN32_THREAD_FUNC
)(
void
*
);
struct
NdbThread
{
HANDLE
hThread
;
unsigned
nThreadId
;
char
thread_name
[
MAX_THREAD_NAME
];
};
struct
NdbThread
*
NdbThread_Create
(
NDB_THREAD_FUNC
*
p_thread_func
,
NDB_THREAD_ARG
*
p_thread_arg
,
const
NDB_THREAD_STACKSIZE
thread_stack_size
,
const
char
*
p_thread_name
,
NDB_THREAD_PRIO
thread_prio
)
{
struct
NdbThread
*
tmpThread
;
unsigned
initflag
;
int
nPriority
=
0
;
if
(
!
p_thread_func
)
return
0
;
tmpThread
=
(
struct
NdbThread
*
)
malloc
(
sizeof
(
struct
NdbThread
));
if
(
!
tmpThread
)
return
0
;
strncpy
((
char
*
)
&
tmpThread
->
thread_name
,
p_thread_name
,
MAX_THREAD_NAME
);
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_WIN32_THREAD_FUNC
)
p_thread_func
,
p_thread_arg
,
initflag
,
&
tmpThread
->
nThreadId
);
if
(
nPriority
&&
tmpThread
->
hThread
)
{
SetThreadPriority
(
tmpThread
->
hThread
,
nPriority
);
ResumeThread
(
tmpThread
->
hThread
);
}
assert
(
tmpThread
->
hThread
);
return
tmpThread
;
}
void
NdbThread_Destroy
(
struct
NdbThread
**
p_thread
)
{
CloseHandle
((
*
p_thread
)
->
hThread
);
(
*
p_thread
)
->
hThread
=
0
;
free
(
*
p_thread
);
*
p_thread
=
0
;
}
int
NdbThread_WaitFor
(
struct
NdbThread
*
p_wait_thread
,
void
**
status
)
{
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
;
}
void
NdbThread_Exit
(
int
status
)
{
_endthreadex
((
DWORD
)
status
);
}
int
NdbThread_SetConcurrencyLevel
(
int
level
)
{
return
0
;
}
ndb/src/common/portlib/win32/NdbTick.c
0 → 100644
View file @
6600cd3e
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <windows.h>
#include "NdbTick.h"
/*
#define FILETIME_PER_MICROSEC 10
#define FILETIME_PER_MILLISEC 10000
#define FILETIME_PER_SEC 10000000
NDB_TICKS NdbTick_CurrentMillisecond(void)
{
ULONGLONG ullTime;
GetSystemTimeAsFileTime((LPFILETIME)&ullTime);
return (ullTime / FILETIME_PER_MILLISEC);
}
int
NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros)
{
ULONGLONG ullTime;
GetSystemTimeAsFileTime((LPFILETIME)&ullTime);
*secs = (ullTime / FILETIME_PER_SEC);
*micros = (Uint32)((ullTime % FILETIME_PER_SEC) / FILETIME_PER_MICROSEC);
return 0;
}
*/
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
;
}
ndb/src/common/transporter/Makefile.am
View file @
6600cd3e
...
...
@@ -33,4 +33,4 @@ libtransporter.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libtransporter_la_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/common/util/File.cpp
View file @
6600cd3e
...
...
@@ -17,8 +17,8 @@
#include <ndb_global.h>
#include <File.hpp>
#include <NdbOut.hpp>
#include <my_dir.h>
//
// PUBLIC
...
...
@@ -28,9 +28,14 @@ bool
File_class
::
exists
(
const
char
*
aFileName
)
{
bool
rc
=
true
;
#ifdef USE_MY_STAT_STRUCT
struct
my_stat
stmp
;
#else
struct
stat
stmp
;
if
(
::
stat
(
aFileName
,
&
stmp
)
!=
0
)
#endif
if
(
my_stat
(
aFileName
,
&
stmp
,
MYF
(
0
))
!=
0
)
{
rc
=
false
;
}
...
...
ndb/src/common/util/Makefile.am
View file @
6600cd3e
...
...
@@ -29,4 +29,4 @@ libgeneral.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libgeneral_la_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/cw/cpcd/Makefile.am
View file @
6600cd3e
...
...
@@ -17,16 +17,4 @@ ndb_cpcd_LDFLAGS = @ndb_bin_am_ldflags@
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
ndb_cpcd.dsp
ndb_cpcd.dsp
:
Makefile
\
$(top_srcdir)/ndb/config/win-lib.am
\
$(top_srcdir)/ndb/config/win-name
\
$(top_srcdir)/ndb/config/win-includes
\
$(top_srcdir)/ndb/config/win-sources
\
$(top_srcdir)/ndb/config/win-libraries
cat
$(top_srcdir)
/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(ndbbin_PROGRAMS)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(ndb_cpcd_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
windoze-dsp
:
ndb/src/kernel/Makefile.am
View file @
6600cd3e
...
...
@@ -63,13 +63,13 @@ LDADD += \
windoze-dsp
:
ndbd.dsp
ndbd.dsp
:
Makefile
\
$(top_srcdir)/ndb/config/win-
lib
.am
\
$(top_srcdir)/ndb/config/win-
prg
.am
\
$(top_srcdir)/ndb/config/win-name
\
$(top_srcdir)/ndb/config/win-includes
\
$(top_srcdir)/ndb/config/win-sources
\
$(top_srcdir)/ndb/config/win-libraries
cat
$(top_srcdir)
/ndb/config/win-
lib
.am
>
$@
cat
$(top_srcdir)
/ndb/config/win-
prg
.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(ndbbin_PROGRAMS)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(ndbd_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LINK
$(LDADD)
ndb/src/kernel/blocks/backup/Makefile.am
View file @
6600cd3e
...
...
@@ -23,4 +23,4 @@ libbackup.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libbackup_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/backup/restore/Makefile.am
View file @
6600cd3e
...
...
@@ -18,13 +18,13 @@ ndb_restore_LDFLAGS = @ndb_bin_am_ldflags@
windoze-dsp
:
ndb_restore.dsp
ndb_restore.dsp
:
Makefile
\
$(top_srcdir)/ndb/config/win-
lib
.am
\
$(top_srcdir)/ndb/config/win-
prg
.am
\
$(top_srcdir)/ndb/config/win-name
\
$(top_srcdir)/ndb/config/win-includes
\
$(top_srcdir)/ndb/config/win-sources
\
$(top_srcdir)/ndb/config/win-libraries
cat
$(top_srcdir)
/ndb/config/win-
lib
.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(n
oinst_LTLIBRARIE
S)
cat
$(top_srcdir)
/ndb/config/win-
prg
.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(n
dbtools_PROGRAM
S)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(ndb_restore_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LINK
$(LDADD)
ndb/src/kernel/blocks/cmvmi/Makefile.am
View file @
6600cd3e
...
...
@@ -21,4 +21,4 @@ libcmvmi.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libcmvmi_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/dbacc/Makefile.am
View file @
6600cd3e
...
...
@@ -21,4 +21,4 @@ libdbacc.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libdbacc_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/dbdict/Makefile.am
View file @
6600cd3e
...
...
@@ -22,4 +22,4 @@ libdbdict.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libdbdict_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/dbdih/Makefile.am
View file @
6600cd3e
...
...
@@ -20,4 +20,4 @@ libdbdih.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libdbdih_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/dblqh/Makefile.am
View file @
6600cd3e
...
...
@@ -22,4 +22,4 @@ libdblqh.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libdblqh_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/dbtc/Makefile.am
View file @
6600cd3e
...
...
@@ -20,4 +20,4 @@ libdbtc.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libdbtc_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/dbtup/Makefile.am
View file @
6600cd3e
...
...
@@ -38,4 +38,4 @@ libdbtup.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libdbtup_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/dbtux/Makefile.am
View file @
6600cd3e
...
...
@@ -31,4 +31,4 @@ libdbtux.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libdbtux_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/dbutil/Makefile.am
View file @
6600cd3e
...
...
@@ -8,9 +8,9 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
libutil.dsp
windoze-dsp
:
lib
db
util.dsp
libutil.dsp
:
Makefile
\
lib
db
util.dsp
:
Makefile
\
$(top_srcdir)/ndb/config/win-lib.am
\
$(top_srcdir)/ndb/config/win-name
\
$(top_srcdir)/ndb/config/win-includes
\
...
...
@@ -19,5 +19,5 @@ libutil.dsp: Makefile \
cat
$(top_srcdir)
/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libutil_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(lib
db
util_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/grep/Makefile.am
View file @
6600cd3e
...
...
@@ -20,4 +20,4 @@ libgrep.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libgrep_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/ndbcntr/Makefile.am
View file @
6600cd3e
...
...
@@ -23,4 +23,4 @@ libndbcntr.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libndbcntr_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/ndbfs/Makefile.am
View file @
6600cd3e
...
...
@@ -24,4 +24,4 @@ libndbfs.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libndbfs_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/qmgr/Makefile.am
View file @
6600cd3e
...
...
@@ -22,4 +22,4 @@ libqmgr.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libqmgr_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/suma/Makefile.am
View file @
6600cd3e
...
...
@@ -20,4 +20,4 @@ libsuma.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libsuma_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/blocks/trix/Makefile.am
View file @
6600cd3e
...
...
@@ -20,4 +20,4 @@ libtrix.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libtrix_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/error/Makefile.am
View file @
6600cd3e
...
...
@@ -22,4 +22,4 @@ liberror.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(liberror_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/kernel/vm/Makefile.am
View file @
6600cd3e
...
...
@@ -40,4 +40,4 @@ libkernel.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libkernel_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/mgmapi/Makefile.am
View file @
6600cd3e
...
...
@@ -26,4 +26,4 @@ libmgmapi.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libmgmapi_la_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/mgmsrv/InitConfigFileParser.cpp
View file @
6600cd3e
...
...
@@ -21,6 +21,7 @@
#include "MgmtErrorReporter.hpp"
#include <NdbOut.hpp>
#include "ConfigInfo.hpp"
#include <m_string.h>
const
int
MAX_LINE_LENGTH
=
1024
;
// Max length of line of text in config file
static
void
trim
(
char
*
);
...
...
ndb/src/mgmsrv/Makefile.am
View file @
6600cd3e
...
...
@@ -45,13 +45,13 @@ ndb_mgmd_LDFLAGS = @ndb_bin_am_ldflags@
windoze-dsp
:
ndb_mgmd.dsp
ndb_mgmd.dsp
:
Makefile
\
$(top_srcdir)/ndb/config/win-
lib
.am
\
$(top_srcdir)/ndb/config/win-
prg
.am
\
$(top_srcdir)/ndb/config/win-name
\
$(top_srcdir)/ndb/config/win-includes
\
$(top_srcdir)/ndb/config/win-sources
\
$(top_srcdir)/ndb/config/win-libraries
cat
$(top_srcdir)
/ndb/config/win-
lib
.am
>
$@
cat
$(top_srcdir)
/ndb/config/win-
prg
.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(ndbbin_PROGRAMS)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(ndb_mgmd_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LINK
$(LDADD)
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
6600cd3e
...
...
@@ -52,6 +52,7 @@
#include <mgmapi.h>
#include <mgmapi_configuration.hpp>
#include <mgmapi_config_parameters.h>
#include <m_string.h>
//#define MGM_SRV_DEBUG
#ifdef MGM_SRV_DEBUG
...
...
ndb/src/ndbapi/Makefile.am
View file @
6600cd3e
...
...
@@ -60,4 +60,4 @@ libndbapi.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LTLIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libndbapi_la_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/src/ndbapi/ndberror.c
View file @
6600cd3e
...
...
@@ -17,6 +17,7 @@
#include <ndb_global.h>
#include <ndberror.h>
#include <m_string.h>
typedef
struct
ErrorBundle
{
int
code
;
...
...
ndb/test/include/NdbSchemaOp.hpp
View file @
6600cd3e
...
...
@@ -303,6 +303,7 @@ public:
*
* @deprecated do not use!
*/
#ifndef NDB_WIN32
inline
int
createTable
(
const
char
*
aTableName
,
Uint32
aTableSize
,
KeyType
aTupleKey
,
...
...
@@ -324,6 +325,7 @@ public:
aMemoryType
,
(
aStoredTable
==
1
?
true
:
false
));
}
#endif
/**
* Add a new attribute to a database table.
...
...
ndb/test/run-test/Makefile.am
View file @
6600cd3e
...
...
@@ -24,16 +24,4 @@ wrappers_SCRIPTS=atrt-testBackup atrt-mysql-test-run
# Don't update the files from bitkeeper
%
::
SCCS/s.%
windoze-dsp
:
atrt.dsp
atrt.dsp
:
Makefile
\
$(top_srcdir)/ndb/config/win-lib.am
\
$(top_srcdir)/ndb/config/win-name
\
$(top_srcdir)/ndb/config/win-includes
\
$(top_srcdir)/ndb/config/win-sources
\
$(top_srcdir)/ndb/config/win-libraries
cat
$(top_srcdir)
/ndb/config/win-lib.am
>
$@
@
$(top_srcdir)
/ndb/config/win-name
$@
$(test_PROGRAMS)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(atrt_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
windoze-dsp
:
ndb/test/src/CpcClient.cpp
View file @
6600cd3e
...
...
@@ -15,9 +15,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include <editline/editline.h>
#include <netdb.h>
#include <NdbOut.hpp>
#include <NdbTCP.h>
...
...
ndb/test/src/Makefile.am
View file @
6600cd3e
...
...
@@ -32,4 +32,4 @@ libNDBT.dsp: Makefile \
@
$(top_srcdir)
/ndb/config/win-name
$@
$(noinst_LIBRARIES)
@
$(top_srcdir)
/ndb/config/win-includes
$@
$(INCLUDES)
@
$(top_srcdir)
/ndb/config/win-sources
$@
$(libNDBT_a_SOURCES)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
$(LDADD)
@
$(top_srcdir)
/ndb/config/win-libraries
$@
LIB
$(LDADD)
ndb/test/src/NdbRestarter.cpp
View file @
6600cd3e
...
...
@@ -57,7 +57,7 @@ NdbRestarter::NdbRestarter(const char* _addr):
switch
(
m
->
type
){
case
MgmId_TCP
:
char
buf
[
255
];
snprintf
(
buf
,
255
,
"%s:%d"
,
m
->
name
.
c_str
(),
m
->
port
);
BaseString
::
snprintf
(
buf
,
255
,
"%s:%d"
,
m
->
name
.
c_str
(),
m
->
port
);
addr
.
assign
(
buf
);
host
.
assign
(
m
->
name
.
c_str
());
port
=
m
->
port
;
...
...
ndb/test/src/getarg.c
View file @
6600cd3e
...
...
@@ -293,7 +293,7 @@ arg_printusage (struct getargs *args,
col
+=
fprintf
(
stderr
,
" %s"
,
buf
);
}
if
(
args
[
i
].
short_name
)
{
snprintf
(
buf
,
sizeof
(
buf
),
"[-%c"
,
args
[
i
].
short_name
);
BaseString
::
snprintf
(
buf
,
sizeof
(
buf
),
"[-%c"
,
args
[
i
].
short_name
);
len
+=
2
;
len
+=
print_arg
(
buf
+
strlen
(
buf
),
sizeof
(
buf
)
-
strlen
(
buf
),
0
,
0
,
&
args
[
i
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment