Nugget
eahave.h
1 /*-----------------------------------------------------------------------------
2  * eahave.h
3  *
4  * Copyright (c) Electronic Arts Inc. All rights reserved.
5  *---------------------------------------------------------------------------*/
6 
7 
8 /*-----------------------------------------------------------------------------
9  This file's functionality is preliminary and won't be considered stable until
10  a future EABase version.
11  *---------------------------------------------------------------------------*/
12 
13 
14 /*-----------------------------------------------------------------------------
15  This header identifies if the given facilities are available in the
16  standard build environment the current compiler/linker/standard library/
17  operating system combination. This file may in some cases #include standard
18  headers in order to make availability determinations, such as to check
19  compiler or SDK version numbers. However, it cannot be perfect.
20  This header does not identify compiler features, as those are defined in
21  eacompiler.h and eacompilertraits.h. Rather this header is about library support.
22  This header does not identify platform or library conventions either, such
23  as whether the file paths use \ or / for directory separators.
24 
25  We provide three types of HAVE features here:
26 
27  - EA_HAVE_XXX_FEATURE - Have compiler feature.
28  Identifies if the compiler has or lacks some feature in the
29  current build. Sometimes you need to check to see if the
30  compiler is running in some mode in able to write portable code
31  against it. For example, some compilers (e.g. VC++) have a
32  mode in which all language extensions are disabled. If you want
33  to write code that works with that but still uses the extensions
34  when available then you can check #if defined(EA_HAVE_EXTENSIONS_FEATURE).
35  Features can be forcibly cancelled via EA_NO_HAVE_XXX_FEATURE.
36  EA_NO_HAVE is useful for a build system or user to override the
37  defaults because it happens to know better.
38 
39  - EA_HAVE_XXX_H - Have header file information.
40  Identifies if a given header file is available to the current
41  compile configuration. For example, some compilers provide a
42  malloc.h header, while others don't. For the former we define
43  EA_HAVE_MALLOC_H, while for the latter it remains undefined.
44  If a header is missing then it may still be that the functions
45  the header usually declares are declared in some other header.
46  EA_HAVE_XXX does not include the possibility that our own code
47  provides versions of these headers, and in fact a purpose of
48  EA_HAVE_XXX is to decide if we should be using our own because
49  the system doesn't provide one.
50  Header availability can be forcibly cancelled via EA_NO_HAVE_XXX_H.
51  EA_NO_HAVE is useful for a build system or user to override the
52  defaults because it happens to know better.
53 
54  - EA_HAVE_XXX_DECL - Have function declaration information.
55  Identifies if a given function declaration is provided by
56  the current compile configuration. For example, some compiler
57  standard libraries declare a wcslen function, while others
58  don't. For the former we define EA_HAVE_WCSLEN_DECL, while for
59  the latter it remains undefined. If a declaration of a function
60  is missing then we assume the implementation is missing as well.
61  EA_HAVE_XXX_DECL does not include the possibility that our
62  own code provides versions of these declarations, and in fact a
63  purpose of EA_HAVE_XXX_DECL is to decide if we should be using
64  our own because the system doesn't provide one.
65  Declaration availability can be forcibly cancelled via EA_NO_HAVE_XXX_DECL.
66  EA_NO_HAVE is useful for a build system or user to override the
67  defaults because it happens to know better.
68 
69  - EA_HAVE_XXX_IMPL - Have function implementation information.
70  Identifies if a given function implementation is provided by
71  the current compile and link configuration. For example, it's
72  commonly the case that console platforms declare a getenv function
73  but don't provide a linkable implementation.
74  In this case the user needs to provide such a function manually
75  as part of the link. If the implementation is available then
76  we define EA_HAVE_GETENV_IMPL, otherwise it remains undefined.
77  Beware that sometimes a function may not seem to be present in
78  the Standard Library but in reality you need to link some auxiliary
79  provided library for it. An example of this is the Unix real-time
80  functions such as clock_gettime.
81  EA_HAVE_XXX_IMPL does not include the possibility that our
82  own code provides versions of these implementations, and in fact a
83  purpose of EA_HAVE_XXX_IMPL is to decide if we should be using
84  our own because the system doesn't provide one.
85  Implementation availability can be forcibly cancelled via EA_NO_HAVE_XXX_IMPL.
86  EA_NO_HAVE is useful for a build system or user to override the
87  defaults because it happens to know better.
88 
89  It's not practical to define EA_HAVE macros for every possible header,
90  declaration, and implementation, and so the user must simply know that
91  some headers, declarations, and implementations tend to require EA_HAVE
92  checking. Nearly every C Standard Library we've seen has a <string.h>
93  header, a strlen declaration, and a linkable strlen implementation,
94  so there's no need to provide EA_HAVE support for this. On the other hand
95  it's commonly the case that the C Standard Library doesn't have a malloc.h
96  header or an inet_ntop declaration.
97 
98 ---------------------------------------------------------------------------*/
99 
100 
101 #ifndef INCLUDED_eahave_H
102 #define INCLUDED_eahave_H
103 
104 
105 #include <EABase/eabase.h>
106 
107 
108 #if defined(EA_PRAGMA_ONCE_SUPPORTED)
109  #pragma once // Some compilers (e.g. VC++) benefit significantly from using this. We've measured 3-4% build speed improvements in apps as a result.
110 #endif
111 
112 /* EA_HAVE_XXX_FEATURE */
113 
114 #if !defined(EA_HAVE_EXTENSIONS_FEATURE) && !defined(EA_NO_HAVE_EXTENSIONS_FEATURE)
115  #define EA_HAVE_EXTENSIONS_FEATURE 1
116 #endif
117 
118 
119 /* EA_HAVE_XXX_LIBRARY */
120 
121 // Dinkumware
122 #if !defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && !defined(EA_NO_HAVE_DINKUMWARE_CPP_LIBRARY)
123  #if defined(__cplusplus)
124  EA_DISABLE_ALL_VC_WARNINGS()
125  #include <cstddef> // Need to trigger the compilation of yvals.h without directly using <yvals.h> because it might not exist.
126  EA_RESTORE_ALL_VC_WARNINGS()
127  #endif
128 
129  #if defined(__cplusplus) && defined(_CPPLIB_VER) /* If using the Dinkumware Standard library... */
130  #define EA_HAVE_DINKUMWARE_CPP_LIBRARY 1
131  #else
132  #define EA_NO_HAVE_DINKUMWARE_CPP_LIBRARY 1
133  #endif
134 #endif
135 
136 // GCC libstdc++
137 #if !defined(EA_HAVE_LIBSTDCPP_LIBRARY) && !defined(EA_NO_HAVE_LIBSTDCPP_LIBRARY)
138  #if defined(__GLIBCXX__) /* If using libstdc++ ... */
139  #define EA_HAVE_LIBSTDCPP_LIBRARY 1
140  #else
141  #define EA_NO_HAVE_LIBSTDCPP_LIBRARY 1
142  #endif
143 #endif
144 
145 // Clang libc++
146 #if !defined(EA_HAVE_LIBCPP_LIBRARY) && !defined(EA_NO_HAVE_LIBCPP_LIBRARY)
147  #if EA_HAS_INCLUDE_AVAILABLE
148  #if EA_HAS_INCLUDE(<__config>)
149  #define EA_HAVE_LIBCPP_LIBRARY 1 // We could also #include <ciso646> and check if defined(_LIBCPP_VERSION).
150  #endif
151  #endif
152 
153  #if !defined(EA_HAVE_LIBCPP_LIBRARY)
154  #define EA_NO_HAVE_LIBCPP_LIBRARY 1
155  #endif
156 #endif
157 
158 
159 /* EA_HAVE_XXX_H */
160 
161 // #include <sys/types.h>
162 #if !defined(EA_HAVE_SYS_TYPES_H) && !defined(EA_NO_HAVE_SYS_TYPES_H)
163  #define EA_HAVE_SYS_TYPES_H 1
164 #endif
165 
166 // #include <io.h> (and not sys/io.h or asm/io.h)
167 #if !defined(EA_HAVE_IO_H) && !defined(EA_NO_HAVE_IO_H)
168  // Unix doesn't have Microsoft's <io.h> but has the same functionality in <fcntl.h> and <sys/stat.h>.
169  #if defined(EA_PLATFORM_MICROSOFT)
170  #define EA_HAVE_IO_H 1
171  #else
172  #define EA_NO_HAVE_IO_H 1
173  #endif
174 #endif
175 
176 // #include <inttypes.h>
177 #if !defined(EA_HAVE_INTTYPES_H) && !defined(EA_NO_HAVE_INTTYPES_H)
178  #if !defined(EA_PLATFORM_MICROSOFT)
179  #define EA_HAVE_INTTYPES_H 1
180  #else
181  #define EA_NO_HAVE_INTTYPES_H 1
182  #endif
183 #endif
184 
185 // #include <unistd.h>
186 #if !defined(EA_HAVE_UNISTD_H) && !defined(EA_NO_HAVE_UNISTD_H)
187  #if defined(EA_PLATFORM_UNIX)
188  #define EA_HAVE_UNISTD_H 1
189  #else
190  #define EA_NO_HAVE_UNISTD_H 1
191  #endif
192 #endif
193 
194 // #include <sys/time.h>
195 #if !defined(EA_HAVE_SYS_TIME_H) && !defined(EA_NO_HAVE_SYS_TIME_H)
196  #if !defined(EA_PLATFORM_MICROSOFT) && !defined(_CPPLIB_VER) /* _CPPLIB_VER indicates Dinkumware. */
197  #define EA_HAVE_SYS_TIME_H 1 /* defines struct timeval */
198  #else
199  #define EA_NO_HAVE_SYS_TIME_H 1
200  #endif
201 #endif
202 
203 // #include <ptrace.h>
204 #if !defined(EA_HAVE_SYS_PTRACE_H) && !defined(EA_NO_HAVE_SYS_PTRACE_H)
205  #if defined(EA_PLATFORM_UNIX) && !defined(__CYGWIN__) && (defined(EA_PLATFORM_DESKTOP) || defined(EA_PLATFORM_SERVER))
206  #define EA_HAVE_SYS_PTRACE_H 1 /* declares the ptrace function */
207  #else
208  #define EA_NO_HAVE_SYS_PTRACE_H 1
209  #endif
210 #endif
211 
212 // #include <sys/stat.h>
213 #if !defined(EA_HAVE_SYS_STAT_H) && !defined(EA_NO_HAVE_SYS_STAT_H)
214  #if (defined(EA_PLATFORM_UNIX) && !(defined(EA_PLATFORM_SONY) && defined(EA_PLATFORM_CONSOLE))) || defined(__APPLE__) || defined(EA_PLATFORM_ANDROID)
215  #define EA_HAVE_SYS_STAT_H 1 /* declares the stat struct and function */
216  #else
217  #define EA_NO_HAVE_SYS_STAT_H 1
218  #endif
219 #endif
220 
221 // #include <locale.h>
222 #if !defined(EA_HAVE_LOCALE_H) && !defined(EA_NO_HAVE_LOCALE_H)
223  #define EA_HAVE_LOCALE_H 1
224 #endif
225 
226 // #include <signal.h>
227 #if !defined(EA_HAVE_SIGNAL_H) && !defined(EA_NO_HAVE_SIGNAL_H)
228  #if !defined(EA_PLATFORM_BSD) && !defined(EA_PLATFORM_SONY) && !defined(CS_UNDEFINED_STRING)
229  #define EA_HAVE_SIGNAL_H 1
230  #else
231  #define EA_NO_HAVE_SIGNAL_H 1
232  #endif
233 #endif
234 
235 // #include <sys/signal.h>
236 #if !defined(EA_HAVE_SYS_SIGNAL_H) && !defined(EA_NO_HAVE_SYS_SIGNAL_H)
237  #if defined(EA_PLATFORM_BSD) || defined(EA_PLATFORM_SONY)
238  #define EA_HAVE_SYS_SIGNAL_H 1
239  #else
240  #define EA_NO_HAVE_SYS_SIGNAL_H 1
241  #endif
242 #endif
243 
244 // #include <pthread.h>
245 #if !defined(EA_HAVE_PTHREAD_H) && !defined(EA_NO_HAVE_PTHREAD_H)
246  #if defined(EA_PLATFORM_UNIX) || defined(EA_PLATFORM_APPLE) || defined(EA_PLATFORM_POSIX)
247  #define EA_HAVE_PTHREAD_H 1 /* It can be had under Microsoft/Windows with the http://sourceware.org/pthreads-win32/ library */
248  #else
249  #define EA_NO_HAVE_PTHREAD_H 1
250  #endif
251 #endif
252 
253 // #include <wchar.h>
254 #if !defined(EA_HAVE_WCHAR_H) && !defined(EA_NO_HAVE_WCHAR_H)
255  #if defined(EA_PLATFORM_DESKTOP) && defined(EA_PLATFORM_UNIX) && defined(EA_PLATFORM_SONY) && defined(EA_PLATFORM_APPLE)
256  #define EA_HAVE_WCHAR_H 1
257  #else
258  #define EA_NO_HAVE_WCHAR_H 1
259  #endif
260 #endif
261 
262 // #include <malloc.h>
263 #if !defined(EA_HAVE_MALLOC_H) && !defined(EA_NO_HAVE_MALLOC_H)
264  #if defined(_MSC_VER) || defined(__MINGW32__)
265  #define EA_HAVE_MALLOC_H 1
266  #else
267  #define EA_NO_HAVE_MALLOC_H 1
268  #endif
269 #endif
270 
271 // #include <alloca.h>
272 #if !defined(EA_HAVE_ALLOCA_H) && !defined(EA_NO_HAVE_ALLOCA_H)
273  #if !defined(EA_HAVE_MALLOC_H) && !defined(EA_PLATFORM_SONY)
274  #define EA_HAVE_ALLOCA_H 1
275  #else
276  #define EA_NO_HAVE_ALLOCA_H 1
277  #endif
278 #endif
279 
280 // #include <execinfo.h>
281 #if !defined(EA_HAVE_EXECINFO_H) && !defined(EA_NO_HAVE_EXECINFO_H)
282  #if (defined(EA_PLATFORM_LINUX) || defined(EA_PLATFORM_OSX)) && !defined(EA_PLATFORM_ANDROID)
283  #define EA_HAVE_EXECINFO_H 1
284  #else
285  #define EA_NO_HAVE_EXECINFO_H 1
286  #endif
287 #endif
288 
289 // #include <semaphore.h> (Unix semaphore support)
290 #if !defined(EA_HAVE_SEMAPHORE_H) && !defined(EA_NO_HAVE_SEMAPHORE_H)
291  #if defined(EA_PLATFORM_UNIX)
292  #define EA_HAVE_SEMAPHORE_H 1
293  #else
294  #define EA_NO_HAVE_SEMAPHORE_H 1
295  #endif
296 #endif
297 
298 // #include <dirent.h> (Unix semaphore support)
299 #if !defined(EA_HAVE_DIRENT_H) && !defined(EA_NO_HAVE_DIRENT_H)
300  #if defined(EA_PLATFORM_UNIX) && !defined(EA_PLATFORM_CONSOLE)
301  #define EA_HAVE_DIRENT_H 1
302  #else
303  #define EA_NO_HAVE_DIRENT_H 1
304  #endif
305 #endif
306 
307 // #include <array>, <forward_list>, <ununordered_set>, <unordered_map>
308 #if !defined(EA_HAVE_CPP11_CONTAINERS) && !defined(EA_NO_HAVE_CPP11_CONTAINERS)
309  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) // Dinkumware. VS2010+
310  #define EA_HAVE_CPP11_CONTAINERS 1
311  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4004) // Actually GCC 4.3 supports array and unordered_
312  #define EA_HAVE_CPP11_CONTAINERS 1
313  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
314  #define EA_HAVE_CPP11_CONTAINERS 1
315  #else
316  #define EA_NO_HAVE_CPP11_CONTAINERS 1
317  #endif
318 #endif
319 
320 // #include <atomic>
321 #if !defined(EA_HAVE_CPP11_ATOMIC) && !defined(EA_NO_HAVE_CPP11_ATOMIC)
322  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) // Dinkumware. VS2012+
323  #define EA_HAVE_CPP11_ATOMIC 1
324  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4007)
325  #define EA_HAVE_CPP11_ATOMIC 1
326  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
327  #define EA_HAVE_CPP11_ATOMIC 1
328  #else
329  #define EA_NO_HAVE_CPP11_ATOMIC 1
330  #endif
331 #endif
332 
333 // #include <condition_variable>
334 #if !defined(EA_HAVE_CPP11_CONDITION_VARIABLE) && !defined(EA_NO_HAVE_CPP11_CONDITION_VARIABLE)
335  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) // Dinkumware. VS2012+
336  #define EA_HAVE_CPP11_CONDITION_VARIABLE 1
337  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4007)
338  #define EA_HAVE_CPP11_CONDITION_VARIABLE 1
339  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
340  #define EA_HAVE_CPP11_CONDITION_VARIABLE 1
341  #else
342  #define EA_NO_HAVE_CPP11_CONDITION_VARIABLE 1
343  #endif
344 #endif
345 
346 // #include <mutex>
347 #if !defined(EA_HAVE_CPP11_MUTEX) && !defined(EA_NO_HAVE_CPP11_MUTEX)
348  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) // Dinkumware. VS2012+
349  #define EA_HAVE_CPP11_MUTEX 1
350  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4007)
351  #define EA_HAVE_CPP11_MUTEX 1
352  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
353  #define EA_HAVE_CPP11_MUTEX 1
354  #else
355  #define EA_NO_HAVE_CPP11_MUTEX 1
356  #endif
357 #endif
358 
359 // #include <thread>
360 #if !defined(EA_HAVE_CPP11_THREAD) && !defined(EA_NO_HAVE_CPP11_THREAD)
361  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) // Dinkumware. VS2012+
362  #define EA_HAVE_CPP11_THREAD 1
363  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4007)
364  #define EA_HAVE_CPP11_THREAD 1
365  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
366  #define EA_HAVE_CPP11_THREAD 1
367  #else
368  #define EA_NO_HAVE_CPP11_THREAD 1
369  #endif
370 #endif
371 
372 // #include <future>
373 #if !defined(EA_HAVE_CPP11_FUTURE) && !defined(EA_NO_HAVE_CPP11_FUTURE)
374  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) // Dinkumware. VS2012+
375  #define EA_HAVE_CPP11_FUTURE 1
376  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4005)
377  #define EA_HAVE_CPP11_FUTURE 1
378  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
379  #define EA_HAVE_CPP11_FUTURE 1
380  #else
381  #define EA_NO_HAVE_CPP11_FUTURE 1
382  #endif
383 #endif
384 
385 
386 // #include <type_traits>
387 #if !defined(EA_HAVE_CPP11_TYPE_TRAITS) && !defined(EA_NO_HAVE_CPP11_TYPE_TRAITS)
388  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) // Dinkumware. VS2012+
389  #define EA_HAVE_CPP11_TYPE_TRAITS 1
390  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4007) // Prior versions of libstdc++ have incomplete support for C++11 type traits.
391  #define EA_HAVE_CPP11_TYPE_TRAITS 1
392  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
393  #define EA_HAVE_CPP11_TYPE_TRAITS 1
394  #else
395  #define EA_NO_HAVE_CPP11_TYPE_TRAITS 1
396  #endif
397 #endif
398 
399 // #include <tuple>
400 #if !defined(EA_HAVE_CPP11_TUPLES) && !defined(EA_NO_HAVE_CPP11_TUPLES)
401  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) // Dinkumware. VS2010+
402  #define EA_HAVE_CPP11_TUPLES 1
403  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4003)
404  #define EA_HAVE_CPP11_TUPLES 1
405  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
406  #define EA_HAVE_CPP11_TUPLES 1
407  #else
408  #define EA_NO_HAVE_CPP11_TUPLES 1
409  #endif
410 #endif
411 
412 // #include <regex>
413 #if !defined(EA_HAVE_CPP11_REGEX) && !defined(EA_NO_HAVE_CPP11_REGEX)
414  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) && (defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS) // Dinkumware. VS2012+
415  #define EA_HAVE_CPP11_REGEX 1
416  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4003)
417  #define EA_HAVE_CPP11_REGEX 1
418  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
419  #define EA_HAVE_CPP11_REGEX 1
420  #else
421  #define EA_NO_HAVE_CPP11_REGEX 1
422  #endif
423 #endif
424 
425 // #include <random>
426 #if !defined(EA_HAVE_CPP11_RANDOM) && !defined(EA_NO_HAVE_CPP11_RANDOM)
427  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) // Dinkumware. VS2010+
428  #define EA_HAVE_CPP11_RANDOM 1
429  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4005)
430  #define EA_HAVE_CPP11_RANDOM 1
431  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
432  #define EA_HAVE_CPP11_RANDOM 1
433  #else
434  #define EA_NO_HAVE_CPP11_RANDOM 1
435  #endif
436 #endif
437 
438 // #include <chrono>
439 #if !defined(EA_HAVE_CPP11_CHRONO) && !defined(EA_NO_HAVE_CPP11_CHRONO)
440  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) // Dinkumware. VS2012+
441  #define EA_HAVE_CPP11_CHRONO 1
442  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4007) // chrono was broken in glibc prior to 4.7.
443  #define EA_HAVE_CPP11_CHRONO 1
444  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
445  #define EA_HAVE_CPP11_CHRONO 1
446  #else
447  #define EA_NO_HAVE_CPP11_CHRONO 1
448  #endif
449 #endif
450 
451 // #include <scoped_allocator>
452 #if !defined(EA_HAVE_CPP11_SCOPED_ALLOCATOR) && !defined(EA_NO_HAVE_CPP11_SCOPED_ALLOCATOR)
453  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 540) // Dinkumware. VS2012+
454  #define EA_HAVE_CPP11_SCOPED_ALLOCATOR 1
455  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4007)
456  #define EA_HAVE_CPP11_SCOPED_ALLOCATOR 1
457  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
458  #define EA_HAVE_CPP11_SCOPED_ALLOCATOR 1
459  #else
460  #define EA_NO_HAVE_CPP11_SCOPED_ALLOCATOR 1
461  #endif
462 #endif
463 
464 // #include <initializer_list>
465 #if !defined(EA_HAVE_CPP11_INITIALIZER_LIST) && !defined(EA_NO_HAVE_CPP11_INITIALIZER_LIST)
466  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) && !defined(EA_COMPILER_NO_INITIALIZER_LISTS) // Dinkumware. VS2010+
467  #define EA_HAVE_CPP11_INITIALIZER_LIST 1
468  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_CLANG) && (EA_COMPILER_VERSION >= 301) && !defined(EA_COMPILER_NO_INITIALIZER_LISTS) && !defined(EA_PLATFORM_APPLE)
469  #define EA_HAVE_CPP11_INITIALIZER_LIST 1
470  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBCPP_LIBRARY) && defined(EA_COMPILER_CLANG) && (EA_COMPILER_VERSION >= 301) && !defined(EA_COMPILER_NO_INITIALIZER_LISTS) && !defined(EA_PLATFORM_APPLE)
471  #define EA_HAVE_CPP11_INITIALIZER_LIST 1
472  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4004) && !defined(EA_COMPILER_NO_INITIALIZER_LISTS) && !defined(EA_PLATFORM_APPLE)
473  #define EA_HAVE_CPP11_INITIALIZER_LIST 1
474  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1) && !defined(EA_COMPILER_NO_INITIALIZER_LISTS)
475  #define EA_HAVE_CPP11_INITIALIZER_LIST 1
476  #else
477  #define EA_NO_HAVE_CPP11_INITIALIZER_LIST 1
478  #endif
479 #endif
480 
481 // #include <system_error>
482 #if !defined(EA_HAVE_CPP11_SYSTEM_ERROR) && !defined(EA_NO_HAVE_CPP11_SYSTEM_ERROR)
483  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) && !(defined(_HAS_CPP0X) && _HAS_CPP0X) // Dinkumware. VS2010+
484  #define EA_HAVE_CPP11_SYSTEM_ERROR 1
485  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_CLANG) && (EA_COMPILER_VERSION >= 301) && !defined(EA_PLATFORM_APPLE)
486  #define EA_HAVE_CPP11_SYSTEM_ERROR 1
487  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4004) && !defined(EA_PLATFORM_APPLE)
488  #define EA_HAVE_CPP11_SYSTEM_ERROR 1
489  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
490  #define EA_HAVE_CPP11_SYSTEM_ERROR 1
491  #else
492  #define EA_NO_HAVE_CPP11_SYSTEM_ERROR 1
493  #endif
494 #endif
495 
496 // #include <codecvt>
497 #if !defined(EA_HAVE_CPP11_CODECVT) && !defined(EA_NO_HAVE_CPP11_CODECVT)
498  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) // Dinkumware. VS2010+
499  #define EA_HAVE_CPP11_CODECVT 1
500  // Future versions of libc++ may support this header. However, at the moment there isn't
501  // a reliable way of detecting if this header is available.
502  //#elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4008)
503  // #define EA_HAVE_CPP11_CODECVT 1
504  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
505  #define EA_HAVE_CPP11_CODECVT 1
506  #else
507  #define EA_NO_HAVE_CPP11_CODECVT 1
508  #endif
509 #endif
510 
511 // #include <typeindex>
512 #if !defined(EA_HAVE_CPP11_TYPEINDEX) && !defined(EA_NO_HAVE_CPP11_TYPEINDEX)
513  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) // Dinkumware. VS2010+
514  #define EA_HAVE_CPP11_TYPEINDEX 1
515  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4006)
516  #define EA_HAVE_CPP11_TYPEINDEX 1
517  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
518  #define EA_HAVE_CPP11_TYPEINDEX 1
519  #else
520  #define EA_NO_HAVE_CPP11_TYPEINDEX 1
521  #endif
522 #endif
523 
524 
525 
526 
527 /* EA_HAVE_XXX_DECL */
528 
529 #if !defined(EA_HAVE_mkstemps_DECL) && !defined(EA_NO_HAVE_mkstemps_DECL)
530  #if defined(EA_PLATFORM_APPLE) || defined(CS_UNDEFINED_STRING)
531  #define EA_HAVE_mkstemps_DECL 1
532  #else
533  #define EA_NO_HAVE_mkstemps_DECL 1
534  #endif
535 #endif
536 
537 #if !defined(EA_HAVE_gettimeofday_DECL) && !defined(EA_NO_HAVE_gettimeofday_DECL)
538  #if defined(EA_PLATFORM_POSIX) /* Posix means Linux, Unix, and Macintosh OSX, among others (including Linux-based mobile platforms). */
539  #define EA_HAVE_gettimeofday_DECL 1
540  #else
541  #define EA_NO_HAVE_gettimeofday_DECL 1
542  #endif
543 #endif
544 
545 #if !defined(EA_HAVE_strcasecmp_DECL) && !defined(EA_NO_HAVE_strcasecmp_DECL)
546  #if !defined(EA_PLATFORM_MICROSOFT)
547  #define EA_HAVE_strcasecmp_DECL 1 /* This is found as stricmp when not found as strcasecmp */
548  #define EA_HAVE_strncasecmp_DECL 1
549  #else
550  #define EA_HAVE_stricmp_DECL 1
551  #define EA_HAVE_strnicmp_DECL 1
552  #endif
553 #endif
554 
555 #if !defined(EA_HAVE_mmap_DECL) && !defined(EA_NO_HAVE_mmap_DECL)
556  #if defined(EA_PLATFORM_POSIX)
557  #define EA_HAVE_mmap_DECL 1 /* mmap functionality varies significantly between systems. */
558  #else
559  #define EA_NO_HAVE_mmap_DECL 1
560  #endif
561 #endif
562 
563 #if !defined(EA_HAVE_fopen_DECL) && !defined(EA_NO_HAVE_fopen_DECL)
564  #define EA_HAVE_fopen_DECL 1 /* C FILE functionality such as fopen */
565 #endif
566 
567 #if !defined(EA_HAVE_ISNAN) && !defined(EA_NO_HAVE_ISNAN)
568  #if defined(EA_PLATFORM_MICROSOFT) && !defined(EA_PLATFORM_MINGW)
569  #define EA_HAVE_ISNAN(x) _isnan(x) /* declared in <math.h> */
570  #define EA_HAVE_ISINF(x) !_finite(x)
571  #elif defined(EA_PLATFORM_APPLE)
572  #define EA_HAVE_ISNAN(x) std::isnan(x) /* declared in <cmath> */
573  #define EA_HAVE_ISINF(x) std::isinf(x)
574  #elif defined(EA_PLATFORM_ANDROID)
575  #define EA_HAVE_ISNAN(x) __builtin_isnan(x) /* There are a number of standard libraries for Android and it's hard to tell them apart, so just go with builtins */
576  #define EA_HAVE_ISINF(x) __builtin_isinf(x)
577  #elif defined(__GNUC__) && defined(__CYGWIN__)
578  #define EA_HAVE_ISNAN(x) __isnand(x) /* declared nowhere, it seems. */
579  #define EA_HAVE_ISINF(x) __isinfd(x)
580  #else
581  #define EA_HAVE_ISNAN(x) std::isnan(x) /* declared in <cmath> */
582  #define EA_HAVE_ISINF(x) std::isinf(x)
583  #endif
584 #endif
585 
586 #if !defined(EA_HAVE_itoa_DECL) && !defined(EA_NO_HAVE_itoa_DECL)
587  #if defined(EA_COMPILER_MSVC)
588  #define EA_HAVE_itoa_DECL 1
589  #else
590  #define EA_NO_HAVE_itoa_DECL 1
591  #endif
592 #endif
593 
594 #if !defined(EA_HAVE_nanosleep_DECL) && !defined(EA_NO_HAVE_nanosleep_DECL)
595  #if (defined(EA_PLATFORM_UNIX) && !defined(EA_PLATFORM_SONY)) || defined(EA_PLATFORM_IPHONE) || defined(EA_PLATFORM_OSX) || defined(EA_PLATFORM_SONY) || defined(CS_UNDEFINED_STRING)
596  #define EA_HAVE_nanosleep_DECL 1
597  #else
598  #define EA_NO_HAVE_nanosleep_DECL 1
599  #endif
600 #endif
601 
602 #if !defined(EA_HAVE_utime_DECL) && !defined(EA_NO_HAVE_utime_DECL)
603  #if defined(EA_PLATFORM_MICROSOFT)
604  #define EA_HAVE_utime_DECL _utime
605  #elif EA_PLATFORM_UNIX
606  #define EA_HAVE_utime_DECL utime
607  #else
608  #define EA_NO_HAVE_utime_DECL 1
609  #endif
610 #endif
611 
612 #if !defined(EA_HAVE_ftruncate_DECL) && !defined(EA_NO_HAVE_ftruncate_DECL)
613  #if !defined(__MINGW32__)
614  #define EA_HAVE_ftruncate_DECL 1
615  #else
616  #define EA_NO_HAVE_ftruncate_DECL 1
617  #endif
618 #endif
619 
620 #if !defined(EA_HAVE_localtime_DECL) && !defined(EA_NO_HAVE_localtime_DECL)
621  #define EA_HAVE_localtime_DECL 1
622 #endif
623 
624 #if !defined(EA_HAVE_pthread_getattr_np_DECL) && !defined(EA_NO_HAVE_pthread_getattr_np_DECL)
625  #if defined(EA_PLATFORM_LINUX)
626  #define EA_HAVE_pthread_getattr_np_DECL 1
627  #else
628  #define EA_NO_HAVE_pthread_getattr_np_DECL 1
629  #endif
630 #endif
631 
632 
633 
634 /* EA_HAVE_XXX_IMPL*/
635 
636 #if !defined(EA_HAVE_WCHAR_IMPL) && !defined(EA_NO_HAVE_WCHAR_IMPL)
637  #if defined(EA_PLATFORM_DESKTOP)
638  #define EA_HAVE_WCHAR_IMPL 1 /* Specifies if wchar_t string functions are provided, such as wcslen, wprintf, etc. Implies EA_HAVE_WCHAR_H */
639  #else
640  #define EA_NO_HAVE_WCHAR_IMPL 1
641  #endif
642 #endif
643 
644 #if !defined(EA_HAVE_getenv_IMPL) && !defined(EA_NO_HAVE_getenv_IMPL)
645  #if (defined(EA_PLATFORM_DESKTOP) || defined(EA_PLATFORM_UNIX)) && !defined(EA_PLATFORM_WINRT)
646  #define EA_HAVE_getenv_IMPL 1
647  #else
648  #define EA_NO_HAVE_getenv_IMPL 1
649  #endif
650 #endif
651 
652 #if !defined(EA_HAVE_setenv_IMPL) && !defined(EA_NO_HAVE_setenv_IMPL)
653  #if defined(EA_PLATFORM_UNIX) && defined(EA_PLATFORM_POSIX)
654  #define EA_HAVE_setenv_IMPL 1
655  #else
656  #define EA_NO_HAVE_setenv_IMPL 1
657  #endif
658 #endif
659 
660 #if !defined(EA_HAVE_unsetenv_IMPL) && !defined(EA_NO_HAVE_unsetenv_IMPL)
661  #if defined(EA_PLATFORM_UNIX) && defined(EA_PLATFORM_POSIX)
662  #define EA_HAVE_unsetenv_IMPL 1
663  #else
664  #define EA_NO_HAVE_unsetenv_IMPL 1
665  #endif
666 #endif
667 
668 #if !defined(EA_HAVE_putenv_IMPL) && !defined(EA_NO_HAVE_putenv_IMPL)
669  #if (defined(EA_PLATFORM_DESKTOP) || defined(EA_PLATFORM_UNIX)) && !defined(EA_PLATFORM_WINRT)
670  #define EA_HAVE_putenv_IMPL 1 /* With Microsoft compilers you may need to use _putenv, as they have deprecated putenv. */
671  #else
672  #define EA_NO_HAVE_putenv_IMPL 1
673  #endif
674 #endif
675 
676 #if !defined(EA_HAVE_time_IMPL) && !defined(EA_NO_HAVE_time_IMPL)
677  #define EA_HAVE_time_IMPL 1
678  #define EA_HAVE_clock_IMPL 1
679 #endif
680 
681 // <cstdio> fopen()
682 #if !defined(EA_HAVE_fopen_IMPL) && !defined(EA_NO_HAVE_fopen_IMPL)
683  #define EA_HAVE_fopen_IMPL 1 /* C FILE functionality such as fopen */
684 #endif
685 
686 // <arpa/inet.h> inet_ntop()
687 #if !defined(EA_HAVE_inet_ntop_IMPL) && !defined(EA_NO_HAVE_inet_ntop_IMPL)
688  #if (defined(EA_PLATFORM_UNIX) || defined(EA_PLATFORM_POSIX)) && !defined(EA_PLATFORM_SONY) && !defined(CS_UNDEFINED_STRING)
689  #define EA_HAVE_inet_ntop_IMPL 1 /* This doesn't identify if the platform SDK has some alternative function that does the same thing; */
690  #define EA_HAVE_inet_pton_IMPL 1 /* it identifies strictly the <arpa/inet.h> inet_ntop and inet_pton functions. For example, Microsoft has InetNtop in <Ws2tcpip.h> */
691  #else
692  #define EA_NO_HAVE_inet_ntop_IMPL 1
693  #define EA_NO_HAVE_inet_pton_IMPL 1
694  #endif
695 #endif
696 
697 // <time.h> clock_gettime()
698 #if !defined(EA_HAVE_clock_gettime_IMPL) && !defined(EA_NO_HAVE_clock_gettime_IMPL)
699  #if defined(EA_PLATFORM_LINUX) || defined(__CYGWIN__) || (defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)) || (defined(EA_PLATFORM_POSIX) && defined(_CPPLIB_VER) /*Dinkumware*/)
700  #define EA_HAVE_clock_gettime_IMPL 1 /* You need to link the 'rt' library to get this */
701  #else
702  #define EA_NO_HAVE_clock_gettime_IMPL 1
703  #endif
704 #endif
705 
706 #if !defined(EA_HAVE_getcwd_IMPL) && !defined(EA_NO_HAVE_getcwd_IMPL)
707  #if (defined(EA_PLATFORM_DESKTOP) || defined(EA_PLATFORM_UNIX)) && !defined(EA_PLATFORM_ANDROID) && !defined(EA_PLATFORM_WINRT)
708  #define EA_HAVE_getcwd_IMPL 1 /* With Microsoft compilers you may need to use _getcwd, as they have deprecated getcwd. And in any case it's present at <direct.h> */
709  #else
710  #define EA_NO_HAVE_getcwd_IMPL 1
711  #endif
712 #endif
713 
714 #if !defined(EA_HAVE_tmpnam_IMPL) && !defined(EA_NO_HAVE_tmpnam_IMPL)
715  #if (defined(EA_PLATFORM_DESKTOP) || defined(EA_PLATFORM_UNIX)) && !defined(EA_PLATFORM_ANDROID)
716  #define EA_HAVE_tmpnam_IMPL 1
717  #else
718  #define EA_NO_HAVE_tmpnam_IMPL 1
719  #endif
720 #endif
721 
722 // nullptr, the built-in C++11 type.
723 // This EA_HAVE is deprecated, as EA_COMPILER_NO_NULLPTR is more appropriate, given that nullptr is a compiler-level feature and not a library feature.
724 #if !defined(EA_HAVE_nullptr_IMPL) && !defined(EA_NO_HAVE_nullptr_IMPL)
725  #if defined(EA_COMPILER_NO_NULLPTR)
726  #define EA_NO_HAVE_nullptr_IMPL 1
727  #else
728  #define EA_HAVE_nullptr_IMPL 1
729  #endif
730 #endif
731 
732 // <cstddef> std::nullptr_t
733 // Note that <EABase/nullptr.h> implements a portable nullptr implementation, but this
734 // EA_HAVE specifically refers to std::nullptr_t from the standard libraries.
735 #if !defined(EA_HAVE_nullptr_t_IMPL) && !defined(EA_NO_HAVE_nullptr_t_IMPL)
736  #if defined(EA_COMPILER_CPP11_ENABLED)
737  // VS2010+ with its default Dinkumware standard library.
738  #if defined(_MSC_VER) && (_MSC_VER >= 1600) && defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY)
739  #define EA_HAVE_nullptr_t_IMPL 1
740 
741  #elif defined(EA_HAVE_LIBCPP_LIBRARY) // clang/llvm libc++
742  #define EA_HAVE_nullptr_t_IMPL 1
743 
744  #elif defined(EA_HAVE_LIBSTDCPP_LIBRARY) // GNU libstdc++
745  // Unfortunately __GLIBCXX__ date values don't go strictly in version ordering.
746  #if (__GLIBCXX__ >= 20110325) && (__GLIBCXX__ != 20120702) && (__GLIBCXX__ != 20110428)
747  #define EA_HAVE_nullptr_t_IMPL 1
748  #else
749  #define EA_NO_HAVE_nullptr_t_IMPL 1
750  #endif
751 
752  // We simply assume that the standard library (e.g. Dinkumware) provides std::nullptr_t.
753  #elif defined(__clang__)
754  #define EA_HAVE_nullptr_t_IMPL 1
755 
756  // With GCC compiler >= 4.6, std::nullptr_t is always defined in <cstddef>, in practice.
757  #elif defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4006)
758  #define EA_HAVE_nullptr_t_IMPL 1
759 
760  // The EDG compiler provides nullptr, but uses an older standard library that doesn't support std::nullptr_t.
761  #elif defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 403)
762  #define EA_HAVE_nullptr_t_IMPL 1
763 
764  #else
765  #define EA_NO_HAVE_nullptr_t_IMPL 1
766  #endif
767  #else
768  #define EA_NO_HAVE_nullptr_t_IMPL 1
769  #endif
770 #endif
771 
772 // <exception> std::terminate
773 #if !defined(EA_HAVE_std_terminate_IMPL) && !defined(EA_NO_HAVE_std_terminate_IMPL)
774  #if !defined(EA_PLATFORM_IPHONE) && !defined(EA_PLATFORM_ANDROID)
775  #define EA_HAVE_std_terminate_IMPL 1 /* iOS doesn't appear to provide an implementation for std::terminate under the armv6 target. */
776  #else
777  #define EA_NO_HAVE_std_terminate_IMPL 1
778  #endif
779 #endif
780 
781 // <iterator>: std::begin, std::end, std::prev, std::next, std::move_iterator.
782 #if !defined(EA_HAVE_CPP11_ITERATOR_IMPL) && !defined(EA_NO_HAVE_CPP11_ITERATOR_IMPL)
783  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) && !(defined(_HAS_CPP0X) && _HAS_CPP0X) // Dinkumware. VS2010+
784  #define EA_HAVE_CPP11_ITERATOR_IMPL 1
785  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4006)
786  #define EA_HAVE_CPP11_ITERATOR_IMPL 1
787  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
788  #define EA_HAVE_CPP11_ITERATOR_IMPL 1
789  #else
790  #define EA_NO_HAVE_CPP11_ITERATOR_IMPL 1
791  #endif
792 #endif
793 
794 // <memory>: std::weak_ptr, std::shared_ptr, std::unique_ptr, std::bad_weak_ptr, std::owner_less
795 #if !defined(EA_HAVE_CPP11_SMART_POINTER_IMPL) && !defined(EA_NO_HAVE_CPP11_SMART_POINTER_IMPL)
796  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) && !(defined(_HAS_CPP0X) && _HAS_CPP0X) // Dinkumware. VS2010+
797  #define EA_HAVE_CPP11_SMART_POINTER_IMPL 1
798  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4004)
799  #define EA_HAVE_CPP11_SMART_POINTER_IMPL 1
800  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
801  #define EA_HAVE_CPP11_SMART_POINTER_IMPL 1
802  #else
803  #define EA_NO_HAVE_CPP11_SMART_POINTER_IMPL 1
804  #endif
805 #endif
806 
807 // <functional>: std::function, std::mem_fn, std::bad_function_call, std::is_bind_expression, std::is_placeholder, std::reference_wrapper, std::hash, std::bind, std::ref, std::cref.
808 #if !defined(EA_HAVE_CPP11_FUNCTIONAL_IMPL) && !defined(EA_NO_HAVE_CPP11_FUNCTIONAL_IMPL)
809  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) && !(defined(_HAS_CPP0X) && _HAS_CPP0X) // Dinkumware. VS2010+
810  #define EA_HAVE_CPP11_FUNCTIONAL_IMPL 1
811  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4004)
812  #define EA_HAVE_CPP11_FUNCTIONAL_IMPL 1
813  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
814  #define EA_HAVE_CPP11_FUNCTIONAL_IMPL 1
815  #else
816  #define EA_NO_HAVE_CPP11_FUNCTIONAL_IMPL 1
817  #endif
818 #endif
819 
820 // <exception> std::current_exception, std::rethrow_exception, std::exception_ptr, std::make_exception_ptr
821 #if !defined(EA_HAVE_CPP11_EXCEPTION_IMPL) && !defined(EA_NO_HAVE_CPP11_EXCEPTION_IMPL)
822  #if defined(EA_HAVE_DINKUMWARE_CPP_LIBRARY) && (_CPPLIB_VER >= 520) && !(defined(_HAS_CPP0X) && _HAS_CPP0X) // Dinkumware. VS2010+
823  #define EA_HAVE_CPP11_EXCEPTION_IMPL 1
824  #elif defined(EA_COMPILER_CPP11_ENABLED) && defined(EA_HAVE_LIBSTDCPP_LIBRARY) && defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION >= 4004)
825  #define EA_HAVE_CPP11_EXCEPTION_IMPL 1
826  #elif defined(EA_HAVE_LIBCPP_LIBRARY) && (_LIBCPP_VERSION >= 1)
827  #define EA_HAVE_CPP11_EXCEPTION_IMPL 1
828  #else
829  #define EA_NO_HAVE_CPP11_EXCEPTION_IMPL 1
830  #endif
831 #endif
832 
833 
834 
835 
836 /* Implementations that all platforms seem to have: */
837 /*
838  alloca
839  malloc
840  calloc
841  strtoll
842  strtoull
843  vsprintf
844  vsnprintf
845 */
846 
847 /* Implementations that we don't care about: */
848 /*
849  bcopy -- Just use memmove or some customized equivalent. bcopy offers no practical benefit.
850  strlcpy -- So few platforms have this built-in that we get no benefit from using it. Use EA::StdC::Strlcpy instead.
851  strlcat -- "
852 */
853 
854 
855 
856 /*-----------------------------------------------------------------------------
857  EABASE_USER_HAVE_HEADER
858 
859  This allows the user to define a header file to be #included after the
860  eahave.h's contents are compiled. A primary use of this is to override
861  the contents of this header file. You can define the overhead header
862  file name in-code or define it globally as part of your build file.
863 
864  Example usage:
865  #define EABASE_USER_HAVE_HEADER "MyHaveOverrides.h"
866  #include <EABase/eahave.h>
867 ---------------------------------------------------------------------------*/
868 
869 #ifdef EABASE_USER_HAVE_HEADER
870  #include EABASE_USER_HAVE_HEADER
871 #endif
872 
873 
874 #endif /* Header include guard */
875 
876 
877