root/jlog_config.h.in

Revision e1fb6fb899c091c26f05a374ed27e067d4d5a3be, 4.7 kB (checked in by Theo Schlossnagle <theo.schlossnagle@circonus.com>, 3 months ago)

Build on darwin and build clean

  • Property mode set to 100644
Line 
1 /*
2  * Copyright (c) 2005-2008, Message Systems, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met:
8  *
9  *    * Redistributions of source code must retain the above copyright
10  *      notice, this list of conditions and the following disclaimer.
11  *    * Redistributions in binary form must reproduce the above
12  *      copyright notice, this list of conditions and the following
13  *      disclaimer in the documentation and/or other materials provided
14  *      with the distribution.
15  *    * Neither the name Message Systems, Inc. nor the names
16  *      of its contributors may be used to endorse or promote products
17  *      derived from this software without specific prior written
18  *      permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32
33 #ifndef __JLOG_CONFIG_H
34 #define __JLOG_CONFIG_H
35
36 /* define inline unless that is what the compiler already calls it. */
37 #undef inline
38
39 #undef HAVE_FCNTL_H
40 #undef HAVE_SYS_TYPES_H
41 #undef HAVE_LIBGEN_H
42 #undef HAVE_DIRENT_H
43 #undef HAVE_ERRNO_H
44 #undef HAVE_STRING_H
45 #undef HAVE_STDLIB_H
46 #undef HAVE_STDINT_H
47 #undef HAVE_LZ4_H
48 #undef HAVE_UNISTD_H
49 #undef HAVE_SYS_PARAM_H
50 #undef HAVE_SYS_MMAN_H
51 #undef HAVE_TIME_H
52 #undef HAVE_SYS_TIME_H
53 #undef HAVE_SYS_STAT_H
54 #undef HAVE_SYS_UIO_H
55 #undef HAVE_PWRITEV
56 #undef HAVE_INT64_T
57 #undef HAVE_INTXX_T
58 #undef HAVE_LONG_LONG_INT
59 #undef HAVE_UINTXX_T
60 #undef HAVE_U_INT
61 #undef HAVE_U_INT64_T
62 #undef HAVE_U_INTXX_T
63 #define IFS_CH '/'
64
65 #ifdef HAVE_STRING_H
66 #include <string.h>
67 #endif
68 #ifdef HAVE_STDLIB_H
69 #include <stdlib.h>
70 #endif
71 #ifdef HAVE_STDINT_H
72 #include <stdint.h>
73 #endif
74 #ifdef HAVE_SYS_PARAM_H
75 #include <sys/param.h>
76 #endif
77 #ifdef HAVE_SYS_TYPES_H
78 #include <sys/types.h>
79 #endif
80 #ifdef HAVE_SYS_STAT_H
81 #include <sys/stat.h>
82 #endif
83 #if HAVE_LIBGEN_H
84 #include <libgen.h>
85 #endif
86
87
88
89 /* The number of bytes in a char.  */
90 #undef SIZEOF_CHAR
91
92 /* The number of bytes in a int.  */
93 #undef SIZEOF_INT
94
95 /* The number of bytes in a size_t.  */
96 #undef SIZEOF_SIZE_T
97
98
99 /* The number of bytes in a long int.  */
100 #undef SIZEOF_LONG_INT
101
102 /* The number of bytes in a long long int.  */
103 #undef SIZEOF_LONG_LONG_INT
104
105 /* The number of bytes in a short int.  */
106 #undef SIZEOF_SHORT_INT
107
108 /* The number of bytes in a void *.  */
109 #undef SIZEOF_VOID_P
110
111 #ifndef HAVE_U_INT
112 #define HAVE_U_INT
113 typedef unsigned int u_int;
114 #endif
115
116 #undef HAVE_INTXX_T
117 #ifndef HAVE_INTXX_T
118 #if (SIZEOF_CHAR == 1)
119 typedef char int8_t;
120 #else
121 #error "8 bit int type not found."
122 #endif
123 #if (SIZEOF_SHORT_INT == 2)
124 typedef short int int16_t;
125 #else
126 #ifdef _CRAY
127 typedef long int16_t;
128 #else
129 #warning "16 bit int type not found."
130 #endif /* _CRAY */
131 #endif
132 #if (SIZEOF_INT == 4)
133 typedef int int32_t;
134 #else
135 #ifdef _CRAY
136 typedef long int32_t;
137 #else
138 #error "32 bit int type not found."
139 #endif /* _CRAY */
140 #endif
141 #endif
142
143 /* If sys/types.h does not supply u_intXX_t, supply them ourselves */
144 #ifndef HAVE_U_INTXX_T
145 #ifdef HAVE_UINTXX_T
146 typedef uint8_t u_int8_t;
147 typedef uint16_t u_int16_t;
148 typedef uint32_t u_int32_t;
149 #define HAVE_U_INTXX_T 1
150 #else
151 #if (SIZEOF_CHAR == 1)
152 typedef unsigned char u_int8_t;
153 #else
154 #error "8 bit int type not found."
155 #endif
156 #if (SIZEOF_SHORT_INT == 2)
157 typedef unsigned short int u_int16_t;
158 #else
159 #ifdef _CRAY
160 typedef unsigned long u_int16_t;
161 #else
162 #warning "16 bit int type not found."
163 #endif
164 #endif
165 #if (SIZEOF_INT == 4)
166 typedef unsigned int u_int32_t;
167 #else
168 #ifdef _CRAY
169 typedef unsigned long u_int32_t;
170 #else
171 #error "32 bit int type not found."
172 #endif
173 #endif
174 #endif
175 #endif
176
177 /* 64-bit types */
178 #ifndef HAVE_INT64_T
179 #if (SIZEOF_LONG_INT == 8)
180 typedef long int int64_t;
181 #define HAVE_INT64_T 1
182 #else
183 #if (SIZEOF_LONG_LONG_INT == 8)
184 typedef long long int int64_t;
185 #define HAVE_INT64_T 1
186 #define HAVE_LONG_LONG_INT
187 #endif
188 #endif
189 #endif
190 #ifndef HAVE_U_INT64_T
191 #if (SIZEOF_LONG_INT == 8)
192 typedef unsigned long int u_int64_t;
193 #define HAVE_U_INT64_T 1
194 #else
195 #if (SIZEOF_LONG_LONG_INT == 8)
196 typedef unsigned long long int u_int64_t;
197 #define HAVE_U_INT64_T 1
198 #endif
199 #endif
200 #endif
201
202 #endif
Note: See TracBrowser for help on using the browser.