mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 02:30:06 +01:00
8f145e4cbd
ndb/config/win-lib.am: removed TLS stuff (which I don't know what it is) ndb/include/kernel/signaldata/UtilLock.hpp: Made stuff public ndb/include/ndb_global.h.in: better defines for strcasecmp ndb/src/common/transporter/Transporter.cpp: Use NDB_INVALID_SOCKET ndb/src/common/util/SocketClient.cpp: Use NDB_INVALID_SOCKET ndb/src/kernel/vm/Callback.hpp: Move callback into SimulatedBlock as it for some mysterious reason otherwise got sizeof()=0 on windows ndb/src/kernel/vm/Configuration.cpp: Removed extra (bug) semi-colon ndb/src/kernel/vm/Mutex.cpp: Move callback into SimulatedBlock as it for some mysterious reason otherwise got sizeof()=0 on windows ndb/src/kernel/vm/Mutex.hpp: Move callback into SimulatedBlock as it for some mysterious reason otherwise got sizeof()=0 on windows ndb/src/kernel/vm/SectionReader.cpp: Use correct struct-type ndb/src/kernel/vm/SectionReader.hpp: Use correct struct-type ndb/src/kernel/vm/SimulatedBlock.cpp: Move callback into SimulatedBlock as it for some mysterious reason otherwise got sizeof()=0 on windows ndb/src/kernel/vm/SimulatedBlock.hpp: Move callback into SimulatedBlock as it for some mysterious reason otherwise got sizeof()=0 on windows ndb/src/mgmclient/Makefile.am: Add mgm client to windoze ndb/test/src/Makefile.am: Fix lib
119 lines
2.1 KiB
C
119 lines
2.1 KiB
C
|
|
#ifndef NDBGLOBAL_H
|
|
#define NDBGLOBAL_H
|
|
|
|
#include <ndb_types.h>
|
|
|
|
#define NDB_PORT "@ndb_port@"
|
|
#define NDB_TCP_BASE_PORT "@ndb_port_base@"
|
|
|
|
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
|
|
#define NDB_WIN32
|
|
#include <winsock2.h>
|
|
#define PATH_MAX 256
|
|
#define DIR_SEPARATOR "\\"
|
|
#define MYSQLCLUSTERDIR "c:\\mysql\\mysql-cluster"
|
|
#define snprintf _snprintf
|
|
#define vsnprintf _vsnprintf
|
|
#define HAVE_STRCASECMP
|
|
#define strcasecmp _strcmpi
|
|
#define strncasecmp _strncmpi
|
|
#pragma warning(disable: 4503 4786)
|
|
#else
|
|
#undef NDB_WIN32
|
|
#define DIR_SEPARATOR "/"
|
|
#endif
|
|
|
|
#include <my_global.h>
|
|
#include <my_alarm.h>
|
|
|
|
#ifdef _AIX
|
|
#undef _H_STRINGS
|
|
#endif
|
|
#include <m_string.h>
|
|
#include <m_ctype.h>
|
|
#include <ctype.h>
|
|
|
|
#ifdef HAVE_STDARG_H
|
|
#include <stdarg.h>
|
|
#endif
|
|
|
|
#ifdef TIME_WITH_SYS_TIME
|
|
#include <time.h>
|
|
#endif
|
|
|
|
#ifdef HAVE_FCNTL_H
|
|
#include <fcntl.h>
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_PARAM_H
|
|
#include <sys/param.h>
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_STAT_H
|
|
#if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T) && defined(_INCLUDE_AES_SOURCE)
|
|
#undef _INCLUDE_AES_SOURCE
|
|
#include <sys/stat.h>
|
|
#define _INCLUDE_AES_SOURCE
|
|
#else
|
|
#include <sys/stat.h>
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_RESOURCE_H
|
|
#include <sys/resource.h>
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_WAIT_H
|
|
#include <sys/wait.h>
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_MMAN_H
|
|
#include <sys/mman.h>
|
|
#endif
|
|
|
|
#ifndef HAVE_STRDUP
|
|
extern char * strdup(const char *s);
|
|
#endif
|
|
|
|
#ifndef HAVE_STRCASECMP
|
|
extern int strcasecmp(const char *s1, const char *s2);
|
|
extern int strncasecmp(const char *s1, const char *s2, size_t n);
|
|
#endif
|
|
|
|
static const char table_name_separator = '/';
|
|
|
|
#if defined(_AIX) || defined(WIN32) || defined(NDB_VC98)
|
|
#define STATIC_CONST(x) enum { x }
|
|
#else
|
|
#define STATIC_CONST(x) static const Uint32 x
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
#include <new>
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <assert.h>
|
|
|
|
/* call in main() - does not return on error */
|
|
extern int ndb_init(void);
|
|
extern void ndb_end(int);
|
|
#define NDB_INIT(prog_name) {my_progname=(prog_name); ndb_init();}
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#ifdef SCO
|
|
|
|
#ifndef PATH_MAX
|
|
#define PATH_MAX 1024
|
|
#endif
|
|
|
|
#endif /* SCO */
|
|
|
|
#endif
|