root/jlog_config.h.in

Revision 9b8a62c4050371b1896f1b7751c6a4f675dd4e28, 4.3 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 7 years ago)

Offer these files under a new BSD-style license. Yay

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