root/jlog_config.h.in

Revision 11b0ad99636e02743b60e0e3e4d1d9c884842b96, 4.4 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 7 years ago)

make this compile on OpenBSD

  • Property mode set to 100644
Line 
1 /*
2  * Copyright (c) 2005-2007, OmniTI Computer Consulting, 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 OmniTI Computer Consulting, 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_DIRENT_H
42 #undef HAVE_ERRNO_H
43 #undef HAVE_STRING_H
44 #undef HAVE_STDLIB_H
45 #undef HAVE_SYS_PARAM_H
46 #undef HAVE_TIME_H
47 #undef HAVE_SYS_STAT_H
48 #undef HAVE_INT64_T
49 #undef HAVE_INTXX_T
50 #undef HAVE_LONG_LONG_INT
51 #undef HAVE_UINTXX_T
52 #undef HAVE_U_INT
53 #undef HAVE_U_INT64_T
54 #undef HAVE_U_INTXX_T
55 #define IFS_CH '/'
56
57 #ifdef HAVE_STRING_H
58 #include <string.h>
59 #endif
60 #ifdef HAVE_STDLIB_H
61 #include <stdlib.h>
62 #endif
63 #ifdef HAVE_SYS_PARAM_H
64 #include <sys/param.h>
65 #endif
66 #ifdef HAVE_SYS_TYPES_H
67 #include <sys/types.h>
68 #endif
69 #ifdef HAVE_SYS_STAT_H
70 #include <sys/stat.h>
71 #endif
72
73 /* The number of bytes in a char.  */
74 #undef SIZEOF_CHAR
75
76 /* The number of bytes in a int.  */
77 #undef SIZEOF_INT
78
79 /* The number of bytes in a size_t.  */
80 #undef SIZEOF_SIZE_T
81
82
83 /* The number of bytes in a long int.  */
84 #undef SIZEOF_LONG_INT
85
86 /* The number of bytes in a long long int.  */
87 #undef SIZEOF_LONG_LONG_INT
88
89 /* The number of bytes in a short int.  */
90 #undef SIZEOF_SHORT_INT
91
92 /* The number of bytes in a void *.  */
93 #undef SIZEOF_VOID_P
94
95 #ifndef HAVE_U_INT
96 typedef unsigned int u_int;
97 #endif
98
99 #undef HAVE_INTXX_T
100 #ifndef HAVE_INTXX_T
101 #if (SIZEOF_CHAR == 1)
102 typedef char int8_t;
103 #else
104 #error "8 bit int type not found."
105 #endif
106 #if (SIZEOF_SHORT_INT == 2)
107 typedef short int int16_t;
108 #else
109 #ifdef _CRAY
110 typedef long int16_t;
111 #else
112 #warning "16 bit int type not found."
113 #endif /* _CRAY */
114 #endif
115 #if (SIZEOF_INT == 4)
116 typedef int int32_t;
117 #else
118 #ifdef _CRAY
119 typedef long int32_t;
120 #else
121 #error "32 bit int type not found."
122 #endif /* _CRAY */
123 #endif
124 #endif
125
126 /* If sys/types.h does not supply u_intXX_t, supply them ourselves */
127 #ifndef HAVE_U_INTXX_T
128 #ifdef HAVE_UINTXX_T
129 typedef uint8_t u_int8_t;
130 typedef uint16_t u_int16_t;
131 typedef uint32_t u_int32_t;
132 #define HAVE_U_INTXX_T 1
133 #else
134 #if (SIZEOF_CHAR == 1)
135 typedef unsigned char u_int8_t;
136 #else
137 #error "8 bit int type not found."
138 #endif
139 #if (SIZEOF_SHORT_INT == 2)
140 typedef unsigned short int u_int16_t;
141 #else
142 #ifdef _CRAY
143 typedef unsigned long u_int16_t;
144 #else
145 #warning "16 bit int type not found."
146 #endif
147 #endif
148 #if (SIZEOF_INT == 4)
149 typedef unsigned int u_int32_t;
150 #else
151 #ifdef _CRAY
152 typedef unsigned long u_int32_t;
153 #else
154 #error "32 bit int type not found."
155 #endif
156 #endif
157 #endif
158 #endif
159
160 /* 64-bit types */
161 #ifndef HAVE_INT64_T
162 #if (SIZEOF_LONG_INT == 8)
163 typedef long int int64_t;
164 #define HAVE_INT64_T 1
165 #else
166 #if (SIZEOF_LONG_LONG_INT == 8)
167 typedef long long int int64_t;
168 #define HAVE_INT64_T 1
169 #define HAVE_LONG_LONG_INT
170 #endif
171 #endif
172 #endif
173 #ifndef HAVE_U_INT64_T
174 #if (SIZEOF_LONG_INT == 8)
175 typedef unsigned long int u_int64_t;
176 #define HAVE_U_INT64_T 1
177 #else
178 #if (SIZEOF_LONG_LONG_INT == 8)
179 typedef unsigned long long int u_int64_t;
180 #define HAVE_U_INT64_T 1
181 #endif
182 #endif
183 #endif
184
185 #endif
Note: See TracBrowser for help on using the browser.