~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/global.h

  • Committer: Brian Aker
  • Date: 2008-10-07 15:13:28 UTC
  • mfrom: (481.1.19 codestyle)
  • Revision ID: brian@tangent.org-20081007151328-m49yev7qggqmzxg1
Mergining Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include "config.h"
30
30
 
 
31
#if defined(__cplusplus)
 
32
 
 
33
# if defined(__GNUC) && defined(__EXCEPTIONS)
 
34
#  error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
 
35
# endif
 
36
 
 
37
# include CSTDINT_H
 
38
# include CINTTYPES_H
 
39
# include CMATH_H
 
40
# include <cstdio>
 
41
# include <cstdlib>
 
42
# include <cstddef>
 
43
# include <cassert>
 
44
# include <cerrno>
 
45
#else
 
46
# include <stdint.h>
 
47
# include <inttypes.h>
 
48
# include <stdio.h>
 
49
# include <stdlib.h>
 
50
# include <stddef.h>
 
51
# include <math.h>
 
52
# include <errno.h>        /* Recommended by debian */
 
53
/*
 
54
  A lot of our programs uses asserts, so better to always include it
 
55
*/
 
56
# include <assert.h>
 
57
# include <stdbool.h>
 
58
 
 
59
#endif // __cplusplus
 
60
 
 
61
/*
 
62
#if TIME_WITH_SYS_TIME
 
63
# include <sys/time.h>
 
64
# include <time.h>
 
65
#else
 
66
# if HAVE_SYS_TIME_H
 
67
#  include <sys/time.h>
 
68
# else
 
69
#  include <time.h>
 
70
# endif
 
71
#endif */ /* TIME_WITH_SYS_TIME */
 
72
 
31
73
/*
32
74
  Temporary solution to solve bug#7156. Include "sys/types.h" before
33
75
  the thread headers, else the function madvise() will not be defined
36
78
#include <sys/types.h>
37
79
#endif
38
80
 
39
 
#if defined(HAVE_STDINT_H)
40
 
#include <stdint.h>
41
 
#else
42
 
#error "You must have stdint!"
43
 
#endif
44
 
 
45
 
#if defined(HAVE_INTTYPES_H)
46
 
#include <inttypes.h>
47
 
#else
48
 
#error "You must have inttypes!"
49
 
#endif
50
81
 
51
82
#include <pthread.h>    /* AIX must have this included first */
52
83
 
53
84
#define _REENTRANT  1  /* Threads requires reentrant code */
54
85
 
55
 
 
56
 
/* gcc/egcs issues */
57
 
 
58
 
#if defined(__GNUC) && defined(__EXCEPTIONS)
59
 
#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
60
 
#endif
61
 
 
62
 
#ifndef stdin
63
 
#include <stdio.h>
64
 
#endif
65
 
#ifdef HAVE_STDLIB_H
66
 
#include <stdlib.h>
67
 
#endif
68
 
#ifdef HAVE_STDDEF_H
69
 
#include <stddef.h>
70
 
#endif
71
 
 
72
 
#include <math.h>
73
86
#ifdef HAVE_LIMITS_H
74
87
#include <limits.h>
75
88
#endif
80
93
#ifdef HAVE_FCNTL_H
81
94
#include <fcntl.h>
82
95
#endif
83
 
#ifdef HAVE_SYS_TIMEB_H
84
 
#include <sys/timeb.h>        /* Avoid warnings on SCO */
85
 
#endif
86
 
#if TIME_WITH_SYS_TIME
87
 
# include <sys/time.h>
88
 
# include <time.h>
89
 
#else
90
 
# if HAVE_SYS_TIME_H
91
 
#  include <sys/time.h>
92
 
# else
93
 
#  include <time.h>
94
 
# endif
95
 
#endif /* TIME_WITH_SYS_TIME */
 
96
 
96
97
#ifdef HAVE_UNISTD_H
97
98
#include <unistd.h>
98
99
#endif
104
105
#include <alloca.h>
105
106
#endif
106
107
 
107
 
#include <errno.h>        /* Recommended by debian */
108
108
 
109
 
#if defined(HAVE_STDBOOL_H)
110
 
#include <stdbool.h>
111
 
#endif
112
109
 
113
110
#ifdef HAVE_SYS_STAT_H
114
111
# include <sys/stat.h>
115
112
#endif
116
113
 
117
 
/*
118
 
  A lot of our programs uses asserts, so better to always include it
119
 
*/
120
 
#include <assert.h>
121
 
 
122
114
#if !defined(HAVE_UINT)
123
115
#undef HAVE_UINT
124
116
#define HAVE_UINT
125
117
typedef unsigned int uint;
126
 
typedef unsigned short ushort;
127
118
#endif
128
119
 
129
120
/* Declared in int2str() */