activemq-cpp-3.3.0
|
00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one or more 00003 * contributor license agreements. See the NOTICE file distributed with 00004 * this work for additional information regarding copyright ownership. 00005 * The ASF licenses this file to You under the Apache License, Version 2.0 00006 * (the "License"); you may not use this file except in compliance with 00007 * the License. You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 #ifndef _DECAF_UTIL_CONFIG_H_ 00018 #define _DECAF_UTIL_CONFIG_H_ 00019 00020 #ifdef DECAF_DLL 00021 #ifdef DECAF_EXPORTS 00022 #define DECAF_API __declspec(dllexport) 00023 #else 00024 #define DECAF_API __declspec(dllimport) 00025 #endif 00026 #else 00027 #define DECAF_API 00028 #endif 00029 00030 // 00031 // The purpose of this header is to try to detect the supported headers 00032 // of the platform when the ./configure script is not being used to generate 00033 // the config.h file. 00034 // 00035 #if defined(HAVE_CONFIG_H) 00036 00037 // config.h is generated by the ./configure script and it only 00038 // used by unix like systems (including cygwin) 00039 #include <config.h> 00040 00041 #else /* !defined(HAVE_CONFIG_H) */ 00042 00043 // Not using ./configure script and make system.. chances are your using the native build tools 00044 // of Windows or OS X to do this build 00045 00046 #if defined(_WIN32) 00047 00048 #ifndef HAVE_OBJBASE_H 00049 #define HAVE_OBJBASE_H 00050 #endif 00051 #ifndef HAVE_RPCDCE_H 00052 #define HAVE_RPCDCE_H 00053 #endif 00054 #ifndef HAVE_WINSOCK2_H 00055 #define HAVE_WINSOCK2_H 00056 #endif 00057 #ifndef HAVE_STRUCT_ADDRINFO 00058 #define HAVE_STRUCT_ADDRINFO 00059 #endif 00060 #ifndef HAVE_SYS_TIMEB_H 00061 #define HAVE_SYS_TIMEB_H 00062 #endif 00063 #ifndef HAVE_FTIME 00064 #define HAVE_FTIME 00065 #endif 00066 #ifndef HAVE_WINDOWS_H 00067 #define HAVE_WINDOWS_H 00068 #endif 00069 #ifndef HAVE_PROCESS_H 00070 #define HAVE_PROCESS_H 00071 #endif 00072 00073 #if defined(_MSC_VER) && _MSC_VER >= 1400 00074 #ifndef _CRT_SECURE_NO_DEPRECATE 00075 #define _CRT_SECURE_NO_DEPRECATE 00076 #endif 00077 #pragma warning(disable: 4996) 00078 #pragma warning(disable: 4250) 00079 #pragma warning(disable: 4351) 00080 #pragma warning(disable: 4822) 00081 #endif 00082 00083 #ifndef _SECURE_SCL 00084 #define _SECURE_SCL 1 00085 #endif 00086 #ifndef _SCL_SECURE_NO_WARNINGS 00087 #define _SCL_SECURE_NO_WARNINGS 1 00088 #endif 00089 00090 /* Has windows.h already been included? If so, our preferences don't matter, 00091 * but we will still need the winsock things no matter what was included. 00092 * If not, include a restricted set of windows headers to our tastes. 00093 */ 00094 #ifndef _WINDOWS_ 00095 #ifndef WIN32_LEAN_AND_MEAN 00096 #define WIN32_LEAN_AND_MEAN 00097 #endif 00098 #ifndef _WIN32_WINNT 00099 00100 /* 00101 * Restrict the server to a subset of Windows XP header files by default 00102 */ 00103 #define _WIN32_WINNT 0x0501 00104 #endif 00105 #ifndef NOUSER 00106 #define NOUSER 00107 #endif 00108 #ifndef NOMCX 00109 #define NOMCX 00110 #endif 00111 #ifndef NOIME 00112 #define NOIME 00113 #endif 00114 #include <windows.h> 00115 00116 /* 00117 * Add a _very_few_ declarations missing from the restricted set of headers 00118 * (If this list becomes extensive, re-enable the required headers above!) 00119 * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now 00120 */ 00121 #define SW_HIDE 0 00122 #ifndef _WIN32_WCE 00123 #include <winsock2.h> 00124 #include <ws2tcpip.h> 00125 #include <mswsock.h> 00126 #else 00127 #include <winsock.h> 00128 #endif 00129 #endif /* !_WINDOWS_ */ 00130 00131 #else 00132 #ifndef HAVE_UUID_UUID_H 00133 #define HAVE_UUID_UUID_H 00134 #endif 00135 #ifndef HAVE_UUID_T 00136 #define HAVE_UUID_T 00137 #endif 00138 #ifndef HAVE_PTHREAD_H 00139 #define HAVE_PTHREAD_H 00140 #endif 00141 #endif 00142 00143 #endif /* !defined(HAVE_CONFIG_H) */ 00144 00145 // Macro to mark attributes as unused 00146 #ifdef __GNUC__ 00147 #define DECAF_UNUSED __attribute__ ((__unused__)) 00148 #else 00149 #define DECAF_UNUSED 00150 #endif 00151 00152 #endif /*_DECAF_UTIL_CONFIG_H_*/