~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2013-12-22 10:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20131222102705-mndw7s12mz0szrcn
Tags: upstream-5.5.32
Import upstream version 5.5.32

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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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
const int max_connections = 500;
 
37
#else
 
38
#include <mysql_version.h>
 
39
#include "my_global.h"
 
40
#endif
 
41
 
 
42
/*
 
43
 * This enables everything that GNU can do. The macro is actually
 
44
 * recommended for new programs.
 
45
 */
 
46
#ifndef _GNU_SOURCE
 
47
#define _GNU_SOURCE
 
48
#endif
 
49
 
 
50
/*
 
51
 * Make sure we use the thread safe version of the library.
 
52
 */
 
53
#ifndef _THREAD_SAFE // Seems to be defined by some Drizzle header
 
54
#define _THREAD_SAFE
 
55
#endif
 
56
 
 
57
/*
 
58
 * This causes things to be defined like stuff in inttypes.h
 
59
 * which is used in printf()
 
60
 */
 
61
#ifndef __STDC_FORMAT_MACROS
 
62
#define __STDC_FORMAT_MACROS
 
63
#endif
 
64
 
 
65
/*
 
66
 * This define is not required by Linux because the _GNU_SOURCE
 
67
 * definition includes POSIX complience. But I need it for
 
68
 * Mac OS X.
 
69
 */
 
70
//#define _POSIX_C_SOURCE       2
 
71
//#define _ANSI_SOURCE
 
72
 
 
73
#ifdef __APPLE__
 
74
#define XT_MAC
 
75
#endif
 
76
 
 
77
#if defined(MSDOS) || defined(__WIN__) || defined(_WIN64)
 
78
#define XT_WIN
 
79
#endif
 
80
 
 
81
#ifdef XT_WIN
 
82
#if defined(_DEBUG) && !defined(DEBUG)
 
83
#define DEBUG
 
84
#endif // _DEBUG
 
85
#else
 
86
// Paul suggested to disable PBMS in MariaDB for now.
 
87
// #define PBMS_ENABLED
 
88
#endif
 
89
 
 
90
#ifdef __FreeBSD__
 
91
#define XT_FREEBSD
 
92
#endif
 
93
 
 
94
#ifdef __NetBSD__
 
95
#define XT_NETBSD
 
96
#endif
 
97
 
 
98
#ifdef __sun
 
99
#define XT_SOLARIS
 
100
#endif
 
101
 
 
102
/*
 
103
 * Definition of which atomic operations to use:
 
104
 */
 
105
#ifdef XT_WIN
 
106
#ifdef _WIN64
 
107
/* 64-bit Windows atomic ops are not yet supported: */
 
108
#define XT_NO_ATOMICS
 
109
#else
 
110
/* MS Studio style embedded assembler for x86 */
 
111
#define XT_ATOMIC_WIN32_X86
 
112
#endif
 
113
#elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
 
114
/* Use GNU style embedded assembler for x86 */
 
115
#define XT_ATOMIC_GNUC_X86
 
116
#elif defined(XT_SOLARIS)
 
117
/* Use Sun atomic operations library
 
118
 * http://docs.sun.com/app/docs/doc/816-5168/atomic-ops-3c?a=view
 
119
 */
 
120
#define XT_ATOMIC_SOLARIS_LIB
 
121
#else
 
122
#define XT_NO_ATOMICS
 
123
#endif
 
124
 
 
125
#ifndef DRIZZLED
 
126
#if MYSQL_VERSION_ID >= 50404
 
127
//#define MYSQL_SUPPORTS_BACKUP
 
128
#endif
 
129
#endif
 
130
 
 
131
#if defined(DBUG_ON) && !defined(DBUG_OFF) && !defined(DEBUG)
 
132
#define DEBUG
 
133
#endif // DBUG_ON
 
134
 
 
135
#endif