~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/include/ndb_global.h.in

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
#ifndef NDB_GLOBAL_H
 
17
#define NDB_GLOBAL_H
 
18
 
 
19
#include <my_config.h>
 
20
#include <ndb_types.h>
 
21
 
 
22
#define NDB_PORT "@ndb_port@"
 
23
#define NDB_TCP_BASE_PORT "@ndb_port_base@"
 
24
 
 
25
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
 
26
#define NDB_WIN32
 
27
#include <winsock2.h>
 
28
#define PATH_MAX 256
 
29
#define DIR_SEPARATOR "\\"
 
30
#define MYSQLCLUSTERDIR "c:\\mysql\\mysql-cluster"
 
31
#define HAVE_STRCASECMP
 
32
#define strcasecmp _strcmpi
 
33
#pragma warning(disable: 4503 4786)
 
34
#else
 
35
#undef NDB_WIN32
 
36
#define DIR_SEPARATOR "/"
 
37
#endif
 
38
 
 
39
#include <my_global.h>
 
40
 
 
41
#if ! (NDB_SIZEOF_CHAR == SIZEOF_CHAR)
 
42
#error "Invalid define for Uint8"
 
43
#endif
 
44
 
 
45
#if ! (NDB_SIZEOF_INT == SIZEOF_INT)
 
46
#error "Invalid define for Uint32"
 
47
#endif
 
48
 
 
49
#if ! (NDB_SIZEOF_LONG_LONG == SIZEOF_LONG_LONG)
 
50
#error "Invalid define for Uint64"
 
51
#endif
 
52
 
 
53
#include <my_alarm.h>
 
54
 
 
55
#ifdef _AIX
 
56
#undef _H_STRINGS
 
57
#endif
 
58
#include <m_string.h>
 
59
#include <m_ctype.h>
 
60
#include <ctype.h>
 
61
 
 
62
#ifdef HAVE_STDARG_H
 
63
#include <stdarg.h>
 
64
#endif
 
65
 
 
66
#ifdef TIME_WITH_SYS_TIME
 
67
#include <time.h>
 
68
#endif
 
69
 
 
70
#ifdef HAVE_FCNTL_H
 
71
#include <fcntl.h>
 
72
#endif
 
73
 
 
74
#ifdef HAVE_SYS_PARAM_H
 
75
#include <sys/param.h>
 
76
#endif
 
77
 
 
78
#ifdef HAVE_SYS_STAT_H
 
79
  #if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T) && defined(_INCLUDE_AES_SOURCE)
 
80
    #undef _INCLUDE_AES_SOURCE
 
81
    #include <sys/stat.h>
 
82
    #define _INCLUDE_AES_SOURCE
 
83
  #else
 
84
    #include <sys/stat.h>
 
85
  #endif
 
86
#endif
 
87
 
 
88
#ifdef HAVE_SYS_RESOURCE_H
 
89
#include <sys/resource.h>
 
90
#endif
 
91
 
 
92
#ifdef HAVE_SYS_WAIT_H
 
93
#include <sys/wait.h>
 
94
#endif
 
95
 
 
96
#ifdef HAVE_SYS_MMAN_H
 
97
#include <sys/mman.h>
 
98
#endif
 
99
 
 
100
#ifndef HAVE_STRDUP
 
101
extern char * strdup(const char *s);
 
102
#endif
 
103
 
 
104
#ifndef HAVE_STRCASECMP
 
105
extern int strcasecmp(const char *s1, const char *s2);
 
106
extern int strncasecmp(const char *s1, const char *s2, size_t n);
 
107
#endif
 
108
 
 
109
static const char table_name_separator =  '/';
 
110
 
 
111
#if defined(_AIX) || defined(WIN32) || defined(NDB_VC98)
 
112
#define STATIC_CONST(x) enum { x }
 
113
#else
 
114
#define STATIC_CONST(x) static const Uint32 x
 
115
#endif
 
116
 
 
117
#ifdef  __cplusplus
 
118
extern "C" {
 
119
#endif
 
120
        
 
121
#include <assert.h>
 
122
 
 
123
#ifdef  __cplusplus
 
124
}
 
125
#endif
 
126
 
 
127
#include "ndb_init.h"
 
128
 
 
129
#ifndef PATH_MAX
 
130
#define PATH_MAX 1024
 
131
#endif
 
132
 
 
133
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
 
134
#define LINT_SET_PTR = {0,0}
 
135
#else
 
136
#define LINT_SET_PTR
 
137
#endif
 
138
 
 
139
#ifndef MIN
 
140
#define MIN(x,y) (((x)<(y))?(x):(y))
 
141
#endif
 
142
 
 
143
#ifndef MAX
 
144
#define MAX(x,y) (((x)>(y))?(x):(y))
 
145
#endif
 
146
 
 
147
#define NDB_O_DIRECT_WRITE_ALIGNMENT 512
 
148
 
 
149
#endif