~drizzle-trunk/drizzle/development

1548.2.1 by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin.
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
1548.2.2 by Barry.Leslie at PrimeBase
A lot of minor changes to clean up the code and to get it to build with Drizzle.
33
#if defined(MYSQL_SERVER) ||  defined(DRIZZLED)
1548.2.1 by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin.
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
1548.2.2 by Barry.Leslie at PrimeBase
A lot of minor changes to clean up the code and to get it to build with Drizzle.
39
#include "config.h"
1548.2.1 by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin.
40
#include <drizzled/common.h>
41
#else
42
#include "my_global.h"
43
#include "mysql_priv.h"
44
#endif
1548.2.26 by Barry.Leslie at PrimeBase
Bug fix for buffer size goof.
45
1548.2.1 by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin.
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"
1548.2.26 by Barry.Leslie at PrimeBase
Bug fix for buffer size goof.
53
#endif	//defined(MYSQL_SERVER) ||  defined(DRIZZLED)
1548.2.1 by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin.
54
1548.2.26 by Barry.Leslie at PrimeBase
Bug fix for buffer size goof.
55
#include <sys/types.h>
1548.2.24 by Barry.Leslie at PrimeBase
Reorganized code while fixing some minor problems.
56
#include <inttypes.h>
1548.2.26 by Barry.Leslie at PrimeBase
Bug fix for buffer size goof.
57
#include <unistd.h>
1548.2.1 by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin.
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
1548.2.27 by Barry.Leslie at PrimeBase
Cleanup for solaris build.
84
#if defined(MSDOS) || defined(__WIN__) || defined(_WIN64)
1548.2.1 by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin.
85
#define OS_WINDOWS
86
#endif
87
1548.2.27 by Barry.Leslie at PrimeBase
Cleanup for solaris build.
88
#ifdef __sun
89
#define OS_SOLARIS
90
#endif
91
92
1548.2.1 by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin.
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