2004-12-21 10:37:12 +01:00
|
|
|
/* 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 */
|
2004-05-07 15:34:12 +02:00
|
|
|
|
2005-01-04 13:12:22 +01:00
|
|
|
#ifndef NDB_GLOBAL_H
|
|
|
|
#define NDB_GLOBAL_H
|
2004-05-07 15:34:12 +02:00
|
|
|
|
2004-11-10 14:18:49 +01:00
|
|
|
#include <ndb_types.h>
|
2004-08-17 11:55:51 +02:00
|
|
|
|
2004-11-11 08:15:52 +01:00
|
|
|
#define NDB_PORT "@ndb_port@"
|
|
|
|
#define NDB_TCP_BASE_PORT "@ndb_port_base@"
|
|
|
|
|
2004-05-12 09:27:59 +02:00
|
|
|
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
|
|
|
|
#define NDB_WIN32
|
2004-11-10 14:18:49 +01:00
|
|
|
#include <winsock2.h>
|
|
|
|
#define PATH_MAX 256
|
|
|
|
#define DIR_SEPARATOR "\\"
|
2004-11-11 08:15:52 +01:00
|
|
|
#define MYSQLCLUSTERDIR "c:\\mysql\\mysql-cluster"
|
2004-11-11 22:39:24 +01:00
|
|
|
#define HAVE_STRCASECMP
|
2004-11-15 10:43:17 +01:00
|
|
|
#define strcasecmp _strcmpi
|
2004-11-10 14:18:49 +01:00
|
|
|
#pragma warning(disable: 4503 4786)
|
2004-05-12 09:27:59 +02:00
|
|
|
#else
|
|
|
|
#undef NDB_WIN32
|
2004-11-11 22:39:24 +01:00
|
|
|
#define DIR_SEPARATOR "/"
|
|
|
|
#endif
|
|
|
|
|
2004-11-10 14:18:49 +01:00
|
|
|
#include <my_global.h>
|
2005-01-03 20:10:23 +01:00
|
|
|
|
2005-01-04 13:12:22 +01:00
|
|
|
#if ! (NDB_SIZEOF_CHAR == SIZEOF_CHAR)
|
2005-01-03 20:10:23 +01:00
|
|
|
#error "Invalid define for Uint8"
|
|
|
|
#endif
|
|
|
|
|
2005-01-04 13:12:22 +01:00
|
|
|
#if ! (NDB_SIZEOF_INT == SIZEOF_INT)
|
2005-01-03 20:10:23 +01:00
|
|
|
#error "Invalid define for Uint32"
|
|
|
|
#endif
|
|
|
|
|
2005-01-04 13:12:22 +01:00
|
|
|
#if ! (NDB_SIZEOF_LONG_LONG == SIZEOF_LONG_LONG)
|
2005-01-03 20:10:23 +01:00
|
|
|
#error "Invalid define for Uint64"
|
|
|
|
#endif
|
|
|
|
|
2004-11-10 14:18:49 +01:00
|
|
|
#include <my_alarm.h>
|
2004-05-12 09:27:59 +02:00
|
|
|
|
2004-10-22 17:13:06 +02:00
|
|
|
#ifdef _AIX
|
|
|
|
#undef _H_STRINGS
|
|
|
|
#endif
|
2004-05-07 08:39:42 +02:00
|
|
|
#include <m_string.h>
|
|
|
|
#include <m_ctype.h>
|
|
|
|
#include <ctype.h>
|
2004-11-11 22:39:24 +01:00
|
|
|
|
2004-05-11 14:31:43 +02:00
|
|
|
#ifdef HAVE_STDARG_H
|
2004-05-07 15:34:12 +02:00
|
|
|
#include <stdarg.h>
|
2004-05-11 14:31:43 +02:00
|
|
|
#endif
|
2004-11-11 22:39:24 +01:00
|
|
|
|
2004-05-11 14:31:43 +02:00
|
|
|
#ifdef TIME_WITH_SYS_TIME
|
2004-05-07 15:34:12 +02:00
|
|
|
#include <time.h>
|
2004-05-11 14:31:43 +02:00
|
|
|
#endif
|
2004-11-11 22:39:24 +01:00
|
|
|
|
2004-05-11 14:31:43 +02:00
|
|
|
#ifdef HAVE_FCNTL_H
|
2004-05-07 15:34:12 +02:00
|
|
|
#include <fcntl.h>
|
2004-05-11 14:31:43 +02:00
|
|
|
#endif
|
2004-11-11 22:39:24 +01:00
|
|
|
|
|
|
|
#ifdef HAVE_SYS_PARAM_H
|
2004-05-07 08:39:42 +02:00
|
|
|
#include <sys/param.h>
|
2004-11-11 22:39:24 +01:00
|
|
|
#endif
|
|
|
|
|
2004-05-11 14:31:43 +02:00
|
|
|
#ifdef HAVE_SYS_STAT_H
|
2004-06-17 23:06:21 +02:00
|
|
|
#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
|
2004-05-11 14:31:43 +02:00
|
|
|
#endif
|
2004-11-11 22:39:24 +01:00
|
|
|
|
|
|
|
#ifdef HAVE_SYS_RESOURCE_H
|
2004-05-11 14:31:43 +02:00
|
|
|
#include <sys/resource.h>
|
2004-11-11 22:39:24 +01:00
|
|
|
#endif
|
|
|
|
|
2004-05-11 14:31:43 +02:00
|
|
|
#ifdef HAVE_SYS_WAIT_H
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#endif
|
2004-11-11 22:39:24 +01:00
|
|
|
|
2004-05-11 14:31:43 +02:00
|
|
|
#ifdef HAVE_SYS_MMAN_H
|
2004-05-07 15:34:12 +02:00
|
|
|
#include <sys/mman.h>
|
|
|
|
#endif
|
|
|
|
|
2004-11-10 14:18:49 +01:00
|
|
|
#ifndef HAVE_STRDUP
|
|
|
|
extern char * strdup(const char *s);
|
|
|
|
#endif
|
2004-05-07 15:34:12 +02:00
|
|
|
|
2004-11-10 14:18:49 +01:00
|
|
|
#ifndef HAVE_STRCASECMP
|
|
|
|
extern int strcasecmp(const char *s1, const char *s2);
|
|
|
|
extern int strncasecmp(const char *s1, const char *s2, size_t n);
|
2004-05-07 15:34:12 +02:00
|
|
|
#endif
|
|
|
|
|
2004-05-19 11:17:24 +02:00
|
|
|
static const char table_name_separator = '/';
|
|
|
|
|
2004-11-10 14:18:49 +01:00
|
|
|
#if defined(_AIX) || defined(WIN32) || defined(NDB_VC98)
|
2004-05-07 15:34:12 +02:00
|
|
|
#define STATIC_CONST(x) enum { x }
|
|
|
|
#else
|
|
|
|
#define STATIC_CONST(x) static const Uint32 x
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2005-01-19 09:15:34 +01:00
|
|
|
inline void* operator new(size_t, void* __p) { return __p; }
|
|
|
|
inline void* operator new[](size_t, void* __p) { return __p; }
|
2004-05-07 15:34:12 +02:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
2004-11-11 22:39:24 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2004-12-21 10:37:12 +01:00
|
|
|
#include "ndb_init.h"
|
|
|
|
|
2004-08-26 14:06:39 +02:00
|
|
|
#ifdef SCO
|
|
|
|
|
|
|
|
#ifndef PATH_MAX
|
|
|
|
#define PATH_MAX 1024
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* SCO */
|
|
|
|
|
2004-05-07 15:34:12 +02:00
|
|
|
#endif
|