~vjsamuel/drizzle/bug-616035

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSConfig.h

  • Committer: Monty Taylor
  • Date: 2010-07-06 00:44:32 UTC
  • mfrom: (1643.1.13 build)
  • Revision ID: mordred@inaugust.com-20100706004432-843uftc92rc2497l
Merged in PBMS, translation updates, a few build fixes and a few bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 2008 PrimeBase Technologies GmbH, Germany
 
2
 *
 
3
 * PrimeBase Media Stream for MySQL
 
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
 * Original author: Paul McCullagh (H&G2JCtL)
 
20
 * Continued development: Barry Leslie
 
21
 *
 
22
 * 2007-05-30
 
23
 *
 
24
 * CORE SYSTEM:
 
25
 * Compilation flags. Should be included at the top of all
 
26
 * source files.
 
27
 *
 
28
 */
 
29
 
 
30
#ifndef __CSCONFIG_H__
 
31
#define __CSCONFIG_H__
 
32
 
 
33
#if defined(MYSQL_SERVER) ||  defined(DRIZZLED)
 
34
// Because mysql_priv.h can redefine system data types it is not safe to include it
 
35
// in some souce code files and not others because of what it may do to structures defined
 
36
// in other headers. So the only safe thing I can think of is to include it in all source code
 
37
// files.
 
38
#ifdef DRIZZLED
 
39
#include "config.h"
 
40
#include <drizzled/common.h>
 
41
#else
 
42
#include "my_global.h"
 
43
#include "mysql_priv.h"
 
44
#endif
 
45
 
 
46
/* Note: mysql_priv.h messes with new, which caused a crash. */
 
47
#ifdef new
 
48
#undef new
 
49
#endif
 
50
 
 
51
#else
 
52
#include "config.h"
 
53
#endif  //defined(MYSQL_SERVER) ||  defined(DRIZZLED)
 
54
 
 
55
#include <sys/types.h>
 
56
#include <inttypes.h>
 
57
#include <unistd.h>
 
58
 
 
59
/*
 
60
 * This enables everything that GNU can do. The macro is actually
 
61
 * recommended for new programs.
 
62
 */
 
63
#ifndef _GNU_SOURCE
 
64
#define _GNU_SOURCE
 
65
#endif
 
66
 
 
67
#ifndef NODEBUG
 
68
#ifdef DEBUG
 
69
#ifndef DBUG_OFF
 
70
#ifndef DEBUG
 
71
#define DEBUG
 
72
#endif
 
73
#endif
 
74
#endif
 
75
#endif
 
76
 
 
77
/*
 
78
 * What operating system are we on?
 
79
 */
 
80
#ifdef __darwin__
 
81
#define OS_MACINTOSH
 
82
#endif
 
83
 
 
84
#if defined(MSDOS) || defined(__WIN__) || defined(_WIN64)
 
85
#define OS_WINDOWS
 
86
#endif
 
87
 
 
88
#ifdef __sun
 
89
#define OS_SOLARIS
 
90
#endif
 
91
 
 
92
 
 
93
#ifdef OS_WINDOWS
 
94
#ifdef _DEBUG
 
95
#ifndef NODEBUG
 
96
#ifndef DBUG_OFF
 
97
#ifndef DEBUG
 
98
#define DEBUG
 
99
#endif
 
100
#endif
 
101
#endif
 
102
#endif
 
103
#endif
 
104
 
 
105
#endif