root/jlog_config.h.in

Revision 4398f417ba97c6a8915f204fa96d7489e9b6bfcc, 4.5 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 1 month ago)

more complete shared lib support

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