activemq-cpp-3.9.5
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 ACTIVEMQ_UTIL_CONFIG_H_
18#define ACTIVEMQ_UTIL_CONFIG_H_
19
20#ifdef AMQCPP_DLL
21 #ifdef AMQCPP_EXPORTS
22 #define AMQCPP_API __declspec(dllexport)
23 #else
24 #define AMQCPP_API __declspec(dllimport)
25 #endif
26#else
27 #if defined(__GNUC__) && __GNUC__ >= 4
28 #define AMQCPP_API __attribute__ ((visibility("default")))
29 #else
30 #define AMQCPP_API
31 #endif
32#endif
33
34//
35// The purpose of this header is to try to detect the supported headers
36// of the platform when the ./configure script is not being used to generate
37// the config.h file.
38//
39#if defined(HAVE_CONFIG_H)
40
41 // config.h is generated by the ./configure script and it only
42 // used by unix like systems (including cygwin)
43 #include <config.h>
44
45#else /* !defined(HAVE_CONFIG_H) */
46
47 // Not using ./configure script and make system.. chances are your using the native build tools
48 // of Windows or OS X to do this build
49
50 #if defined(_WIN32)
51 #ifndef HAVE_OBJBASE_H
52 #define HAVE_OBJBASE_H
53 #endif
54 #ifndef HAVE_RPCDCE_H
55 #define HAVE_RPCDCE_H
56 #endif
57 #ifndef HAVE_WINSOCK2_H
58 #define HAVE_WINSOCK2_H
59 #endif
60 #ifndef HAVE_STRUCT_ADDRINFO
61 #define HAVE_STRUCT_ADDRINFO
62 #endif
63 #ifndef HAVE_SYS_TIMEB_H
64 #define HAVE_SYS_TIMEB_H
65 #endif
66 #ifndef HAVE_FTIME
67 #define HAVE_FTIME
68 #endif
69 #ifndef HAVE_WINDOWS_H
70 #define HAVE_WINDOWS_H
71 #endif
72 #if defined(_MSC_VER) && _MSC_VER < 1600
73 #ifndef _SECURE_SCL
74 #define _SECURE_SCL 1
75 #endif
76 #ifndef _SCL_SECURE_NO_WARNINGS
77 #define _SCL_SECURE_NO_WARNINGS 1
78 #endif
79 #endif
80
81 #else
82 #ifndef HAVE_UUID_UUID_H
83 #define HAVE_UUID_UUID_H
84 #endif
85 #ifndef HAVE_UUID_T
86 #define HAVE_UUID_T
87 #endif
88 #ifndef HAVE_PTHREAD_H
89 #define HAVE_PTHREAD_H
90 #endif
91 #endif
92
93#endif /* !defined(HAVE_CONFIG_H) */
94
95// Macro to mark attributes as unused
96#ifdef __GNUC__
97 #define AMQCPP_UNUSED __attribute__ ((__unused__))
98#else
99 #define AMQCPP_UNUSED
100#endif
101
102
103#endif /*ACTIVEMQ_UTIL_CONFIG_H_*/