New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
compiler_config.hpp in vendors/XIOS/current/extern/boost/include/boost/date_time – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/date_time/compiler_config.hpp @ 3408

Last change on this file since 3408 was 3408, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

  • Property svn:keywords set to Id
File size: 6.2 KB
Line 
1#ifndef DATE_TIME_COMPILER_CONFIG_HPP___
2#define DATE_TIME_COMPILER_CONFIG_HPP___
3
4/* Copyright (c) 2002-2004 CrystalClear Software, Inc.
5 * Subject to the Boost Software License, Version 1.0. (See accompanying
6 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7 * Author: Jeff Garland, Bart Garst
8 * $Date: 2008-11-12 14:37:53 -0500 (Wed, 12 Nov 2008) $
9 */
10
11#include <cstdlib>
12#include <boost/config.hpp>
13#include <boost/detail/workaround.hpp>
14
15// With boost release 1.33, date_time will be using a different,
16// more flexible, IO system. This new system is not compatible with
17// old compilers. The original date_time IO system remains for those
18// compilers. They must define this macro to use the legacy IO.
19//     (defined(__BORLANDC__) && (__BORLANDC__ <= 0x0581) ) )   &&
20 #if(  BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) \
21    || BOOST_WORKAROUND( __GNUC__, < 3)                         \
22    || (BOOST_WORKAROUND( _MSC_VER, <= 1300) )                  \
23    )                                                           \
24    && !defined(USE_DATE_TIME_PRE_1_33_FACET_IO)
25# define USE_DATE_TIME_PRE_1_33_FACET_IO
26#endif
27
28
29// This file performs some local compiler configurations
30
31#include <boost/date_time/locale_config.hpp> //set up locale configurations
32
33//Set up a configuration parameter for platforms that have
34//GetTimeOfDay
35#if defined(BOOST_HAS_GETTIMEOFDAY) || defined(BOOST_HAS_FTIME)
36#define BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK
37#endif
38
39// To Force no default constructors for date & ptime, un-comment following
40//#define DATE_TIME_NO_DEFAULT_CONSTRUCTOR
41
42// Include extensions to date_duration - comment out to remove this feature
43#define BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
44// these extensions are known to cause problems with gcc295
45#if defined(__GNUC__) && (__GNUC__ < 3)
46#undef BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
47#endif
48
49#if (defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) || BOOST_WORKAROUND( __BORLANDC__,  BOOST_TESTED_AT(0x581) ) )
50#define BOOST_DATE_TIME_NO_MEMBER_INIT
51#endif
52
53// include these types before we try to re-define them
54#include <boost/cstdint.hpp>
55
56//Define INT64_C for compilers that don't have it
57#if (!defined(INT64_C))
58#define INT64_C(value)  int64_t(value)
59#endif
60
61
62/* Workaround for Borland iterator error. Error was "Cannot convert 'istream *' to 'wistream *' in function istream_iterator<>::istream_iterator() */
63#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_RW_LIB)
64#define BOOST_DATE_TIME_NO_WISTREAM_ITERATOR
65#endif
66
67
68// Borland v5.64 does not have the following in std namespace; v5.5.1 does
69#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_STLPORT)
70#include <locale>
71namespace std {
72  using stlport::tolower;
73  using stlport::ctype;
74  using stlport::use_facet;
75}
76#endif
77
78// workaround for errors associated with output for date classes
79// modifications and input streaming for time classes.
80// Compilers affected are:
81// gcc295, msvc (neither with STLPort), any borland
82//
83#if (((defined(__GNUC__) && (__GNUC__ < 3)) || \
84      (defined(_MSC_VER) && (_MSC_VER < 1300)) ) && \
85      !defined(_STLP_OWN_IOSTREAMS) ) || \
86      BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) )
87#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
88#endif
89
90// The macro marks up places where compiler complains for missing return statement or
91// uninitialized variables after calling to boost::throw_exception.
92// BOOST_UNREACHABLE_RETURN doesn't work since even compilers that support
93// unreachable statements detection emit such warnings.
94#if defined(_MSC_VER)
95// Use special MSVC extension to markup unreachable code
96#  define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) __assume(false)
97#elif !defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION)
98// Call to a non-returning function should suppress the warning
99#  if defined(BOOST_NO_STDC_NAMESPACE)
100namespace std {
101    using ::abort;
102}
103#  endif // defined(BOOST_NO_STDC_NAMESPACE)
104#  define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) std::abort()
105#else
106// For other poor compilers the specified expression is compiled. Usually, this would be a return statement.
107#  define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) x
108#endif
109
110/* The following handles the definition of the necessary macros
111 * for dll building on Win32 platforms.
112 *
113 * For code that will be placed in the date_time .dll,
114 * it must be properly prefixed with BOOST_DATE_TIME_DECL.
115 * The corresponding .cpp file must have BOOST_DATE_TIME_SOURCE
116 * defined before including its header. For examples see:
117 * greg_month.hpp & greg_month.cpp
118 *
119 */
120
121#ifdef BOOST_HAS_DECLSPEC // defined in config system
122   // we need to import/export our code only if the user has specifically
123   // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
124   // libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK
125   // if they want just this one to be dynamically liked:
126#  if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
127      // export if this is our own source, otherwise import:
128#     ifdef BOOST_DATE_TIME_SOURCE
129#       define BOOST_DATE_TIME_DECL __declspec(dllexport)
130#     else
131#       define BOOST_DATE_TIME_DECL __declspec(dllimport)
132#     endif  // BOOST_DATE_TIME_SOURCE
133#  endif  // DYN_LINK
134#endif  // BOOST_HAS_DECLSPEC
135//
136// if BOOST_WHATEVER_DECL isn't defined yet define it now:
137#ifndef BOOST_DATE_TIME_DECL
138#  define BOOST_DATE_TIME_DECL
139#endif
140
141//
142// Automatically link to the correct build variant where possible.
143//
144#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_DATE_TIME_NO_LIB) && !defined(BOOST_DATE_TIME_SOURCE)
145//
146// Set the name of our library, this will get undef'ed by auto_link.hpp
147// once it's done with it:
148//
149#define BOOST_LIB_NAME boost_date_time
150//
151// If we're importing code from a dll, then tell auto_link.hpp about it:
152//
153#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
154#  define BOOST_DYN_LINK
155#endif
156//
157// And include the header that does the work:
158//
159#include <boost/config/auto_link.hpp>
160#endif  // auto-linking disabled
161
162#if defined(BOOST_HAS_THREADS)
163#  if defined(_MSC_VER) || defined(__MWERKS__) || defined(__MINGW32__) ||  defined(__BORLANDC__)
164     //no reentrant posix functions (eg: localtime_r)
165#  elif (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT)))
166#   define BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS
167#  endif
168#endif
169
170
171#endif
Note: See TracBrowser for help on using the repository browser.