activemq-cpp-3.9.0
Config.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef _DECAF_UTIL_CONFIG_H_
18 #define _DECAF_UTIL_CONFIG_H_
19 
20 #include <stddef.h>
21 
22 #ifdef DECAF_DLL
23 #ifdef DECAF_EXPORTS
24 #define DECAF_API __declspec(dllexport)
25 #else
26 #define DECAF_API __declspec(dllimport)
27 #endif
28 #else
29 #define DECAF_API
30 #endif
31 
32 #ifndef NULL
33 #define NULL 0
34 #endif
35 
41 #if defined(HAVE_CONFIG_H)
42 
43  /* config.h is generated by the ./configure script and it only used by unix like systems. */
44  #include <config.h>
45 
46 #else /* !defined(HAVE_CONFIG_H) */
47 
52  #if defined(_WIN32)
53 
54  #ifndef HAVE_OBJBASE_H
55  #define HAVE_OBJBASE_H
56  #endif
57  #ifndef HAVE_RPCDCE_H
58  #define HAVE_RPCDCE_H
59  #endif
60  #ifndef HAVE_WINSOCK2_H
61  #define HAVE_WINSOCK2_H
62  #endif
63  #ifndef HAVE_STRUCT_ADDRINFO
64  #define HAVE_STRUCT_ADDRINFO
65  #endif
66  #ifndef HAVE_SYS_TIMEB_H
67  #define HAVE_SYS_TIMEB_H
68  #endif
69  #ifndef HAVE_FTIME
70  #define HAVE_FTIME
71  #endif
72  #ifndef HAVE_WINDOWS_H
73  #define HAVE_WINDOWS_H
74  #endif
75  #ifndef HAVE_PROCESS_H
76  #define HAVE_PROCESS_H
77  #endif
78  #ifdef _NATIVE_WCHAR_T_DEFINED
79  #define HAVE_WCHAR_T
80  #endif
81 
82  #if defined(_MSC_VER) && _MSC_VER >= 1400
83  #ifndef _CRT_SECURE_NO_DEPRECATE
84  #define _CRT_SECURE_NO_DEPRECATE
85  #endif
86  #pragma warning(disable: 4996)
87  #pragma warning(disable: 4250)
88  #pragma warning(disable: 4351)
89  #pragma warning(disable: 4822)
90  #endif
91 
92  #if defined(_MSC_VER) && _MSC_VER < 1600
93  #ifndef _SECURE_SCL
94  #define _SECURE_SCL 1
95  #endif
96  #ifndef _SCL_SECURE_NO_WARNINGS
97  #define _SCL_SECURE_NO_WARNINGS 1
98  #endif
99  #endif
100 
101  /*
102  * Has windows.h already been included? If so, our preferences don't matter,
103  * but we will still need the winsock things no matter what was included.
104  * If not, include a restricted set of windows headers to our tastes.
105  */
106  #ifndef _WINDOWS_
107  #ifndef WIN32_LEAN_AND_MEAN
108  #define WIN32_LEAN_AND_MEAN
109  #endif
110  #ifndef _WIN32_WINNT
111 
112  /*
113  * Restrict the server to a subset of Windows XP header files by default
114  */
115  #define _WIN32_WINNT 0x0501
116  #endif
117  #ifndef NOUSER
118  #define NOUSER
119  #endif
120  #ifndef NOMCX
121  #define NOMCX
122  #endif
123  #ifndef NOIME
124  #define NOIME
125  #endif
126  #include <windows.h>
127 
128  /*
129  * Add a _very_few_ declarations missing from the restricted set of headers
130  * (If this list becomes extensive, re-enable the required headers above!)
131  * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
132  */
133  #define SW_HIDE 0
134  #ifndef _WIN32_WCE
135  #include <winsock2.h>
136  #include <ws2tcpip.h>
137  #include <mswsock.h>
138  #else
139  #include <winsock.h>
140  #endif
141  #endif /* !_WINDOWS_ */
142 
143  #else
144  #ifndef HAVE_UUID_UUID_H
145  #define HAVE_UUID_UUID_H
146  #endif
147  #ifndef HAVE_UUID_T
148  #define HAVE_UUID_T
149  #endif
150  #ifndef HAVE_PTHREAD_H
151  #define HAVE_PTHREAD_H
152  #endif
153  #endif
154 
155 #endif /* !defined(HAVE_CONFIG_H) */
156 
157 #ifdef __GNUC__
158  #define DECAF_UNUSED __attribute__ ((__unused__))
159 #else
160  #define DECAF_UNUSED
161 #endif
162 
163 #if defined(_WIN32)
164  #define DECAF_STDCALL __stdcall
165 #else
166  #define DECAF_STDCALL
167 #endif
168 
169 #endif /*_DECAF_UTIL_CONFIG_H_*/