Commit 64f7965d authored by joreland@mysql.com's avatar joreland@mysql.com

wl1744 - ndb win port

improve ndb_global.h
parent 37e92ab2
...@@ -771,7 +771,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \ ...@@ -771,7 +771,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \ strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \ sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \ unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
sys/ioctl.h malloc.h sys/malloc.h linux/config.h) sys/ioctl.h malloc.h sys/malloc.h linux/config.h sys/resource.h sys/param.h)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Check for system libraries. Adds the library to $LIBS # Check for system libraries. Adds the library to $LIBS
......
...@@ -10,17 +10,20 @@ ...@@ -10,17 +10,20 @@
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32) #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
#define NDB_WIN32 #define NDB_WIN32
#include <winsock2.h> #include <winsock2.h>
#include <my_global.h>
#include <m_ctype.h>
#define PATH_MAX 256 #define PATH_MAX 256
#define DIR_SEPARATOR "\\" #define DIR_SEPARATOR "\\"
#define MYSQLCLUSTERDIR "c:\\mysql\\mysql-cluster" #define MYSQLCLUSTERDIR "c:\\mysql\\mysql-cluster"
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define HAVE_STRCASECMP
#define strcasecmp(a,b) _strcmpi(a,b)
#define strncasecmp(a,b) _strncmpi(a,b)
#pragma warning(disable: 4503 4786) #pragma warning(disable: 4503 4786)
#else #else
#undef NDB_WIN32 #undef NDB_WIN32
#define DIR_SEPARATOR "/"
#endif
#include <my_global.h> #include <my_global.h>
#include <my_alarm.h> #include <my_alarm.h>
...@@ -29,18 +32,24 @@ ...@@ -29,18 +32,24 @@
#endif #endif
#include <m_string.h> #include <m_string.h>
#include <m_ctype.h> #include <m_ctype.h>
#include <ndb_types.h>
#include <ctype.h> #include <ctype.h>
#ifdef HAVE_STDARG_H #ifdef HAVE_STDARG_H
#include <stdarg.h> #include <stdarg.h>
#endif #endif
#ifdef TIME_WITH_SYS_TIME #ifdef TIME_WITH_SYS_TIME
#include <time.h> #include <time.h>
#endif #endif
#ifdef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H
#include <fcntl.h> #include <fcntl.h>
#endif #endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> #include <sys/param.h>
#endif
#ifdef HAVE_SYS_STAT_H #ifdef HAVE_SYS_STAT_H
#if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T) && defined(_INCLUDE_AES_SOURCE) #if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T) && defined(_INCLUDE_AES_SOURCE)
#undef _INCLUDE_AES_SOURCE #undef _INCLUDE_AES_SOURCE
...@@ -50,18 +59,19 @@ ...@@ -50,18 +59,19 @@
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#endif #endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h> #include <sys/resource.h>
#endif
#ifdef HAVE_SYS_WAIT_H #ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h> #include <sys/wait.h>
#endif #endif
#ifdef HAVE_SYS_MMAN_H #ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h> #include <sys/mman.h>
#endif #endif
#define DIR_SEPARATOR "/"
#endif
#ifndef HAVE_STRDUP #ifndef HAVE_STRDUP
extern char * strdup(const char *s); extern char * strdup(const char *s);
#endif #endif
...@@ -94,6 +104,10 @@ extern int ndb_init(void); ...@@ -94,6 +104,10 @@ extern int ndb_init(void);
extern void ndb_end(int); extern void ndb_end(int);
#define NDB_INIT(prog_name) {my_progname=(prog_name); ndb_init();} #define NDB_INIT(prog_name) {my_progname=(prog_name); ndb_init();}
#ifdef __cplusplus
}
#endif
#ifdef SCO #ifdef SCO
#ifndef PATH_MAX #ifndef PATH_MAX
...@@ -102,8 +116,4 @@ extern void ndb_end(int); ...@@ -102,8 +116,4 @@ extern void ndb_end(int);
#endif /* SCO */ #endif /* SCO */
#ifdef __cplusplus
}
#endif
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment