ndb_global.h 1.45 KB
Newer Older
1 2 3 4

#ifndef NDBGLOBAL_H
#define NDBGLOBAL_H

unknown's avatar
unknown committed
5
#include <my_global.h>
unknown's avatar
unknown committed
6 7 8 9 10 11 12

#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
#define NDB_WIN32
#else
#undef NDB_WIN32
#endif

13 14 15 16
#include <m_string.h>
#include <m_ctype.h>
#include <ndb_types.h>
#include <ctype.h>
17
#ifdef HAVE_STDARG_H
18
#include <stdarg.h>
19 20
#endif
#ifdef TIME_WITH_SYS_TIME
21
#include <time.h>
22 23
#endif
#ifdef HAVE_FCNTL_H
24
#include <fcntl.h>
25
#endif
26
#include <sys/param.h>
27
#ifdef HAVE_SYS_STAT_H
28
#include <sys/stat.h>
29 30 31 32 33 34
#endif
#include <sys/resource.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifdef HAVE_SYS_MMAN_H
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
#include <sys/mman.h>
#endif

#ifdef NDB_WIN32
#include <winsock2.h>
#include <ws2tcpip.h>

#define DIR_SEPARATOR "\\"
#define PATH_MAX 256

#pragma warning(disable: 4503 4786)
#else

#define DIR_SEPARATOR "/"

#endif

#ifdef 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>

#ifndef HAVE_STRDUP
extern char * strdup(const char *s);
#endif

#ifndef HAVE_STRLCPY
extern size_t strlcpy (char *dst, const char *src, size_t dst_sz);
#endif

#ifndef HAVE_STRLCAT
extern size_t strlcat (char *dst, const char *src, size_t dst_sz);
#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

#ifdef  __cplusplus
}
#endif

#endif