Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 1 | // (C) Copyright John Maddock 2001 - 2003. |
| 2 | // (C) Copyright Bill Kempf 2001. |
| 3 | // (C) Copyright Aleksey Gurtovoy 2003. |
| 4 | // (C) Copyright Rene Rivera 2005. |
| 5 | // Use, modification and distribution are subject to the |
| 6 | // Boost Software License, Version 1.0. (See accompanying file |
| 7 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 8 | |
| 9 | // See http://www.boost.org for most recent version. |
| 10 | |
| 11 | // Win32 specific config options: |
| 12 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 13 | #define NDNBOOST_PLATFORM "Win32" |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 14 | |
| 15 | // Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION. |
| 16 | #if defined(__MINGW32__) |
| 17 | # include <_mingw.h> |
| 18 | #endif |
| 19 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 20 | #if defined(__GNUC__) && !defined(NDNBOOST_NO_SWPRINTF) |
| 21 | # define NDNBOOST_NO_SWPRINTF |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 22 | #endif |
| 23 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 24 | // Default defines for NDNBOOST_SYMBOL_EXPORT and NDNBOOST_SYMBOL_IMPORT |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 25 | // If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport), |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 26 | // its ndnboost/config/compiler/ file must define NDNBOOST_SYMBOL_EXPORT and |
| 27 | // NDNBOOST_SYMBOL_IMPORT |
| 28 | #ifndef NDNBOOST_SYMBOL_EXPORT |
| 29 | # define NDNBOOST_HAS_DECLSPEC |
| 30 | # define NDNBOOST_SYMBOL_EXPORT __declspec(dllexport) |
| 31 | # define NDNBOOST_SYMBOL_IMPORT __declspec(dllimport) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 32 | #endif |
| 33 | |
| 34 | #if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 35 | # define NDNBOOST_HAS_STDINT_H |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 36 | # ifndef __STDC_LIMIT_MACROS |
| 37 | # define __STDC_LIMIT_MACROS |
| 38 | # endif |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 39 | # define NDNBOOST_HAS_DIRENT_H |
| 40 | # define NDNBOOST_HAS_UNISTD_H |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 41 | #endif |
| 42 | |
| 43 | #if defined(__MINGW32__) && (__GNUC__ >= 4) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 44 | # define NDNBOOST_HAS_EXPM1 |
| 45 | # define NDNBOOST_HAS_LOG1P |
| 46 | # define NDNBOOST_HAS_GETTIMEOFDAY |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 47 | #endif |
| 48 | // |
| 49 | // Win32 will normally be using native Win32 threads, |
| 50 | // but there is a pthread library avaliable as an option, |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 51 | // we used to disable this when NDNBOOST_DISABLE_WIN32 was |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 52 | // defined but no longer - this should allow some |
| 53 | // files to be compiled in strict mode - while maintaining |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 54 | // a consistent setting of NDNBOOST_HAS_THREADS across |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 55 | // all translation units (needed for shared_ptr etc). |
| 56 | // |
| 57 | |
| 58 | #ifdef _WIN32_WCE |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 59 | # define NDNBOOST_NO_ANSI_APIS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 60 | #else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 61 | # define NDNBOOST_HAS_GETSYSTEMTIMEASFILETIME |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 62 | #endif |
| 63 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 64 | #ifndef NDNBOOST_HAS_PTHREADS |
| 65 | # define NDNBOOST_HAS_WINTHREADS |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 66 | #endif |
| 67 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 68 | #ifndef NDNBOOST_DISABLE_WIN32 |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 69 | // WEK: Added |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 70 | #define NDNBOOST_HAS_FTIME |
| 71 | #define NDNBOOST_WINDOWS 1 |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 72 | |
| 73 | #endif |