~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/xt_config.h

Merged vcol stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2005 PrimeBase Technologies GmbH
2
 
 *
3
 
 * PrimeBase XT
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License as published by
7
 
 * the Free Software Foundation; either version 2 of the License, or
8
 
 * (at your option) any later version.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
 
 *
19
 
 * 2006-03-22   Paul McCullagh
20
 
 *
21
 
 * H&G2JCtL
22
 
 *
23
 
 * This header file should be included in every source, before all other
24
 
 * headers.
25
 
 *
26
 
 * In particular: BEFORE THE SYSTEM HEADERS
27
 
 */
28
 
 
29
 
#ifndef __xt_config_h__
30
 
#define __xt_config_h__
31
 
 
32
 
#define MYSQL_SERVER            1
33
 
 
34
 
#ifdef DRIZZLED
35
 
//#include "drizzled/global.h"
36
 
#include "config.h"
37
 
//#include <drizzled/cursor.h>
38
 
//#include <drizzled/thr_lock.h>
39
 
//#include <drizzled/plugin/transactional_storage_engine.h>
40
 
const int max_connections = 500;
41
 
#else
42
 
#include <mysql_version.h>
43
 
#include "my_global.h"
44
 
#endif
45
 
 
46
 
/*
47
 
 * This enables everything that GNU can do. The macro is actually
48
 
 * recommended for new programs.
49
 
 */
50
 
#ifndef _GNU_SOURCE
51
 
#define _GNU_SOURCE
52
 
#endif
53
 
 
54
 
/*
55
 
 * Make sure we use the thread safe version of the library.
56
 
 */
57
 
#ifndef _THREAD_SAFE // Seems to be defined by some Drizzle header
58
 
#define _THREAD_SAFE
59
 
#endif
60
 
 
61
 
/*
62
 
 * This causes things to be defined like stuff in inttypes.h
63
 
 * which is used in printf()
64
 
 */
65
 
#ifndef __STDC_FORMAT_MACROS
66
 
#define __STDC_FORMAT_MACROS
67
 
#endif
68
 
 
69
 
/*
70
 
 * This define is not required by Linux because the _GNU_SOURCE
71
 
 * definition includes POSIX complience. But I need it for
72
 
 * Mac OS X.
73
 
 */
74
 
//#define _POSIX_C_SOURCE       2
75
 
//#define _ANSI_SOURCE
76
 
 
77
 
#ifdef __APPLE__
78
 
#define XT_MAC
79
 
#endif
80
 
 
81
 
#if defined(MSDOS) || defined(__WIN__) || defined(_WIN64)
82
 
#define XT_WIN
83
 
#endif
84
 
 
85
 
#ifdef XT_WIN
86
 
#if defined(_DEBUG) && !defined(DEBUG)
87
 
#define DEBUG
88
 
#endif // _DEBUG
89
 
#endif
90
 
 
91
 
#ifdef __FreeBSD__
92
 
#define XT_FREEBSD
93
 
#endif
94
 
 
95
 
#ifdef __NetBSD__
96
 
#define XT_NETBSD
97
 
#endif
98
 
 
99
 
#ifdef __sun
100
 
#define XT_SOLARIS
101
 
#ifdef __sparc__
102
 
#define BYTE_ORDER BIG_ENDIAN
103
 
#endif
104
 
#ifdef __i386__
105
 
#define BYTE_ORDER LITTLE_ENDIAN
106
 
#endif
107
 
#if defined(__amd64___) || defined(__x86_64__)
108
 
#define BYTE_ORDER LITTLE_ENDIAN
109
 
#endif
110
 
#endif
111
 
 
112
 
/*
113
 
 * Definition of which atomic operations to use:
114
 
 */
115
 
#ifdef XT_WIN
116
 
#ifdef _WIN64
117
 
/* 64-bit Windows atomic ops are not yet supported: */
118
 
#define XT_NO_ATOMICS
119
 
#else
120
 
/* MS Studio style embedded assembler for x86 */
121
 
#define XT_ATOMIC_WIN32_X86
122
 
#endif
123
 
#elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
124
 
/* Use GNU style embedded assembler for x86 */
125
 
#define XT_ATOMIC_GNUC_X86
126
 
#elif defined(XT_SOLARIS)
127
 
/* Use Sun atomic operations library
128
 
 * http://docs.sun.com/app/docs/doc/816-5168/atomic-ops-3c?a=view
129
 
 */
130
 
#define XT_ATOMIC_SOLARIS_LIB
131
 
#else
132
 
#define XT_NO_ATOMICS
133
 
#endif
134
 
 
135
 
#ifndef DRIZZLED
136
 
#if MYSQL_VERSION_ID >= 50404
137
 
#define MYSQL_SUPPORTS_BACKUP
138
 
#endif
139
 
#endif
140
 
 
141
 
#if defined(DBUG_ON) && !defined(DBUG_OFF) && !defined(DEBUG)
142
 
#define DEBUG
143
 
#endif // DBUG_ON
144
 
 
145
 
#endif