Update hwloc to v1.11.12
[charm.git] / contrib / hwloc / include / hwloc / autogen / config.h.in
blob19c2846c4627e1d10575e98c6737c94f82190558
1 /* -*- c -*-
2 * Copyright © 2009 CNRS
3 * Copyright © 2009-2014 Inria. All rights reserved.
4 * Copyright © 2009-2012 Université Bordeaux
5 * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
6 * See COPYING in top-level directory.
7 */
9 /* The configuration file */
11 #ifndef HWLOC_CONFIG_H
12 #define HWLOC_CONFIG_H
14 #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
15 # define __hwloc_restrict __restrict
16 #else
17 # if __STDC_VERSION__ >= 199901L
18 # define __hwloc_restrict restrict
19 # else
20 # define __hwloc_restrict
21 # endif
22 #endif
24 /* Note that if we're compiling C++, then just use the "inline"
25 keyword, since it's part of C++ */
26 #if defined(c_plusplus) || defined(__cplusplus)
27 # define __hwloc_inline inline
28 #elif defined(_MSC_VER) || defined(__HP_cc)
29 # define __hwloc_inline __inline
30 #else
31 # define __hwloc_inline __inline__
32 #endif
35 * Note: this is public. We can not assume anything from the compiler used
36 * by the application and thus the HWLOC_HAVE_* macros below are not
37 * fetched from the autoconf result here. We only automatically use a few
38 * well-known easy cases.
41 /* Some handy constants to make the logic below a little more readable */
42 #if defined(__cplusplus) && \
43 (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR >= 4))
44 #define GXX_ABOVE_3_4 1
45 #else
46 #define GXX_ABOVE_3_4 0
47 #endif
49 #if !defined(__cplusplus) && \
50 (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
51 #define GCC_ABOVE_2_95 1
52 #else
53 #define GCC_ABOVE_2_95 0
54 #endif
56 #if !defined(__cplusplus) && \
57 (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
58 #define GCC_ABOVE_2_96 1
59 #else
60 #define GCC_ABOVE_2_96 0
61 #endif
63 #if !defined(__cplusplus) && \
64 (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
65 #define GCC_ABOVE_3_3 1
66 #else
67 #define GCC_ABOVE_3_3 0
68 #endif
70 /* Maybe before gcc 2.95 too */
71 #ifdef HWLOC_HAVE_ATTRIBUTE_UNUSED
72 #define __HWLOC_HAVE_ATTRIBUTE_UNUSED HWLOC_HAVE_ATTRIBUTE_UNUSED
73 #elif defined(__GNUC__)
74 # define __HWLOC_HAVE_ATTRIBUTE_UNUSED (GXX_ABOVE_3_4 || GCC_ABOVE_2_95)
75 #else
76 # define __HWLOC_HAVE_ATTRIBUTE_UNUSED 0
77 #endif
78 #if __HWLOC_HAVE_ATTRIBUTE_UNUSED
79 # define __hwloc_attribute_unused __attribute__((__unused__))
80 #else
81 # define __hwloc_attribute_unused
82 #endif
84 #ifdef HWLOC_HAVE_ATTRIBUTE_MALLOC
85 #define __HWLOC_HAVE_ATTRIBUTE_MALLOC HWLOC_HAVE_ATTRIBUTE_MALLOC
86 #elif defined(__GNUC__)
87 # define __HWLOC_HAVE_ATTRIBUTE_MALLOC (GXX_ABOVE_3_4 || GCC_ABOVE_2_96)
88 #else
89 # define __HWLOC_HAVE_ATTRIBUTE_MALLOC 0
90 #endif
91 #if __HWLOC_HAVE_ATTRIBUTE_MALLOC
92 # define __hwloc_attribute_malloc __attribute__((__malloc__))
93 #else
94 # define __hwloc_attribute_malloc
95 #endif
97 #ifdef HWLOC_HAVE_ATTRIBUTE_CONST
98 #define __HWLOC_HAVE_ATTRIBUTE_CONST HWLOC_HAVE_ATTRIBUTE_CONST
99 #elif defined(__GNUC__)
100 # define __HWLOC_HAVE_ATTRIBUTE_CONST (GXX_ABOVE_3_4 || GCC_ABOVE_2_95)
101 #else
102 # define __HWLOC_HAVE_ATTRIBUTE_CONST 0
103 #endif
104 #if __HWLOC_HAVE_ATTRIBUTE_CONST
105 # define __hwloc_attribute_const __attribute__((__const__))
106 #else
107 # define __hwloc_attribute_const
108 #endif
110 #ifdef HWLOC_HAVE_ATTRIBUTE_PURE
111 #define __HWLOC_HAVE_ATTRIBUTE_PURE HWLOC_HAVE_ATTRIBUTE_PURE
112 #elif defined(__GNUC__)
113 # define __HWLOC_HAVE_ATTRIBUTE_PURE (GXX_ABOVE_3_4 || GCC_ABOVE_2_96)
114 #else
115 # define __HWLOC_HAVE_ATTRIBUTE_PURE 0
116 #endif
117 #if __HWLOC_HAVE_ATTRIBUTE_PURE
118 # define __hwloc_attribute_pure __attribute__((__pure__))
119 #else
120 # define __hwloc_attribute_pure
121 #endif
123 #ifndef __hwloc_attribute_deprecated /* allow the user to disable these warnings by defining this macro to nothing */
124 #ifdef HWLOC_HAVE_ATTRIBUTE_DEPRECATED
125 #define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED HWLOC_HAVE_ATTRIBUTE_DEPRECATED
126 #elif defined(__GNUC__)
127 # define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED (GXX_ABOVE_3_4 || GCC_ABOVE_3_3)
128 #else
129 # define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED 0
130 #endif
131 #if __HWLOC_HAVE_ATTRIBUTE_DEPRECATED
132 # define __hwloc_attribute_deprecated __attribute__((__deprecated__))
133 #else
134 # define __hwloc_attribute_deprecated
135 #endif
136 #endif
138 #ifdef HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS
139 #define __HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS
140 #elif defined(__GNUC__)
141 # define __HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS (GXX_ABOVE_3_4 || GCC_ABOVE_3_3)
142 #else
143 # define __HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 0
144 #endif
145 #if __HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS
146 # define __hwloc_attribute_may_alias __attribute__((__may_alias__))
147 #else
148 # define __hwloc_attribute_may_alias
149 #endif
151 #ifdef HWLOC_C_HAVE_VISIBILITY
152 # if HWLOC_C_HAVE_VISIBILITY
153 # define HWLOC_DECLSPEC __attribute__((__visibility__("default")))
154 # else
155 # define HWLOC_DECLSPEC
156 # endif
157 #else
158 # define HWLOC_DECLSPEC
159 #endif
161 /* Defined to 1 on Linux */
162 #undef HWLOC_LINUX_SYS
164 /* Defined to 1 if the CPU_SET macro works */
165 #undef HWLOC_HAVE_CPU_SET
167 /* Defined to 1 if you have the `windows.h' header. */
168 #undef HWLOC_HAVE_WINDOWS_H
169 #undef hwloc_pid_t
170 #undef hwloc_thread_t
172 #ifdef HWLOC_HAVE_WINDOWS_H
174 # include <windows.h>
175 typedef DWORDLONG hwloc_uint64_t;
177 #else /* HWLOC_HAVE_WINDOWS_H */
179 # ifdef hwloc_thread_t
180 # include <pthread.h>
181 # endif /* hwloc_thread_t */
183 /* Defined to 1 if you have the <stdint.h> header file. */
184 # undef HWLOC_HAVE_STDINT_H
186 # include <unistd.h>
187 # ifdef HWLOC_HAVE_STDINT_H
188 # include <stdint.h>
189 # endif
190 typedef uint64_t hwloc_uint64_t;
192 #endif /* HWLOC_HAVE_WINDOWS_H */
194 /* Whether we need to re-define all the hwloc public symbols or not */
195 #undef HWLOC_SYM_TRANSFORM
197 /* The hwloc symbol prefix */
198 #undef HWLOC_SYM_PREFIX
200 /* The hwloc symbol prefix in all caps */
201 #undef HWLOC_SYM_PREFIX_CAPS
203 #endif /* HWLOC_CONFIG_H */