activemq-cpp-3.6.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  #ifndef _SECURE_SCL
93  #define _SECURE_SCL 1
94  #endif
95  #ifndef _SCL_SECURE_NO_WARNINGS
96  #define _SCL_SECURE_NO_WARNINGS 1
97  #endif
98 
99  /*
100  * Has windows.h already been included? If so, our preferences don't matter,
101  * but we will still need the winsock things no matter what was included.
102  * If not, include a restricted set of windows headers to our tastes.
103  */
104  #ifndef _WINDOWS_
105  #ifndef WIN32_LEAN_AND_MEAN
106  #define WIN32_LEAN_AND_MEAN
107  #endif
108  #ifndef _WIN32_WINNT
109 
110  /*
111  * Restrict the server to a subset of Windows XP header files by default
112  */
113  #define _WIN32_WINNT 0x0501
114  #endif
115  #ifndef NOUSER
116  #define NOUSER
117  #endif
118  #ifndef NOMCX
119  #define NOMCX
120  #endif
121  #ifndef NOIME
122  #define NOIME
123  #endif
124  #include <windows.h>
125 
126  /*
127  * Add a _very_few_ declarations missing from the restricted set of headers
128  * (If this list becomes extensive, re-enable the required headers above!)
129  * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
130  */
131  #define SW_HIDE 0
132  #ifndef _WIN32_WCE
133  #include <winsock2.h>
134  #include <ws2tcpip.h>
135  #include <mswsock.h>
136  #else
137  #include <winsock.h>
138  #endif
139  #endif /* !_WINDOWS_ */
140 
141  #else
142  #ifndef HAVE_UUID_UUID_H
143  #define HAVE_UUID_UUID_H
144  #endif
145  #ifndef HAVE_UUID_T
146  #define HAVE_UUID_T
147  #endif
148  #ifndef HAVE_PTHREAD_H
149  #define HAVE_PTHREAD_H
150  #endif
151  #endif
152 
153 #endif /* !defined(HAVE_CONFIG_H) */
154 
155 #ifdef __GNUC__
156  #define DECAF_UNUSED __attribute__ ((__unused__))
157 #else
158  #define DECAF_UNUSED
159 #endif
160 
161 #if defined(_WIN32)
162  #define DECAF_STDCALL __stdcall
163 #else
164  #define DECAF_STDCALL
165 #endif
166 
167 #endif /*_DECAF_UTIL_CONFIG_H_*/