The world's most popular open source database
00001 /* Copyright (C) 2003 MySQL AB 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00016 00017 #ifndef NDB_GLOBAL_H 00018 #define NDB_GLOBAL_H 00019 00020 #include <my_config.h> 00021 #include <ndb_types.h> 00022 00023 #define NDB_PORT "1186" 00024 #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 "\\" 00025 #define MYSQLCLUSTERDIR "c:\\mysql\\mysql-cluster" 00026 #define HAVE_STRCASECMP 00027 #define strcasecmp _strcmpi 00028 #pragma warning(disable: 4503 4786) 00029 #else 00030 #undef NDB_WIN32 00031 #define DIR_SEPARATOR "/" 00032 #endif 00033 00034 #include <my_global.h> 00035 00036 #if ! (NDB_SIZEOF_CHAR == SIZEOF_CHAR) 00037 #error "Invalid define for Uint8" 00038 #endif 00039 00040 #if ! (NDB_SIZEOF_INT == SIZEOF_INT) 00041 #error "Invalid define for Uint32" 00042 #endif 00043 00044 #if ! (NDB_SIZEOF_LONG_LONG == SIZEOF_LONG_LONG) 00045 #error "Invalid define for Uint64" 00046 #endif 00047 00048 #include <my_alarm.h> 00049 00050 #ifdef _AIX 00051 #undef _H_STRINGS 00052 #endif 00053 #include <m_string.h> 00054 #include <m_ctype.h> 00055 #include <ctype.h> 00056 00057 #ifdef HAVE_STDARG_H 00058 #include <stdarg.h> 00059 #endif 00060 00061 #ifdef TIME_WITH_SYS_TIME 00062 #include <time.h> 00063 #endif 00064 00065 #ifdef HAVE_FCNTL_H 00066 #include <fcntl.h> 00067 #endif 00068 00069 #ifdef HAVE_SYS_PARAM_H 00070 #include <sys/param.h> 00071 #endif 00072 00073 #ifdef HAVE_SYS_STAT_H 00074 #if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T) && defined(_INCLUDE_AES_SOURCE) 00075 #undef _INCLUDE_AES_SOURCE 00076 #include <sys/stat.h> 00077 #define _INCLUDE_AES_SOURCE 00078 #else 00079 #include <sys/stat.h> 00080 #endif 00081 #endif 00082 00083 #ifdef HAVE_SYS_RESOURCE_H 00084 #include <sys/resource.h> 00085 #endif 00086 00087 #ifdef HAVE_SYS_WAIT_H 00088 #include <sys/wait.h> 00089 #endif 00090 00091 #ifdef HAVE_SYS_MMAN_H 00092 #include <sys/mman.h> 00093 #endif 00094 00095 #ifndef HAVE_STRDUP 00096 extern char * strdup(const char *s); 00097 #endif 00098 00099 #ifndef HAVE_STRCASECMP 00100 extern int strcasecmp(const char *s1, const char *s2); 00101 extern int strncasecmp(const char *s1, const char *s2, size_t n); 00102 #endif 00103 00104 static const char table_name_separator = '/'; 00105 00106 #if defined(_AIX) || defined(WIN32) || defined(NDB_VC98) 00107 #define STATIC_CONST(x) enum { x } 00108 #else 00109 #define STATIC_CONST(x) static const Uint32 x 00110 #endif 00111 00112 #ifdef __cplusplus 00113 inline void* operator new(size_t, void* __p) { return __p; } 00114 inline void* operator new[](size_t, void* __p) { return __p; } 00115 extern "C" { 00116 #endif 00117 00118 #include <assert.h> 00119 00120 #ifdef __cplusplus 00121 } 00122 #endif 00123 00124 #include "ndb_init.h" 00125 00126 #ifdef SCO 00127 00128 #ifndef PATH_MAX 00129 #define PATH_MAX 1024 00130 #endif 00131 00132 #endif /* SCO */ 00133 00134 #ifndef MIN 00135 #define MIN(x,y) (((x)<(y))?(x):(y)) 00136 #endif 00137 00138 #ifndef MAX 00139 #define MAX(x,y) (((x)>(y))?(x):(y)) 00140 #endif 00141 00142 #endif 00143
1.4.7

