Updated POSIX feature detection code (moved file inclusion to individual platform configs and out of suffix.hpp)

[SVN r11448]
This commit is contained in:
John Maddock
2001-10-26 11:58:23 +00:00
parent 003fceb582
commit 10b5a8cc1c
12 changed files with 55 additions and 26 deletions

View File

@ -17,4 +17,8 @@
#define BOOST_HAS_PTHREAD_DELAY_NP
#define BOOST_HAS_PTHREAD_YIELD
// boilerplate code:
#include <boost/config/posix_features.hpp>

View File

@ -19,5 +19,7 @@
# define BOOST_HAS_THREADS
#endif
// boilerplate code:
#include <boost/config/posix_features.hpp>

View File

@ -37,3 +37,7 @@
// The BSD <ctype.h> has macros only, no functions:
//
#define BOOST_NO_CTYPE_FUNCTIONS
// boilerplate code:
#include <boost/config/posix_features.hpp>

View File

@ -26,5 +26,7 @@
# define BOOST_HAS_FTIME
#endif
// boilerplate code:
#include <boost/config/posix_features.hpp>

View File

@ -17,3 +17,7 @@
#define BOOST_NO_SWPRINTF
#define BOOST_NO_CWCTYPE
// boilerplate code:
#include <boost/config/posix_features.hpp>

View File

@ -11,3 +11,6 @@
#define BOOST_NO_SWPRINTF
// boilerplate code:
#include <boost/config/posix_features.hpp>

View File

@ -48,6 +48,9 @@
# define BOOST_NO_SWPRINTF
#endif
// boilerplate code:
#include <boost/config/posix_features.hpp>
#ifndef __GNUC__
//
// if the compiler is not gcc we still need to be able to parse

View File

@ -17,6 +17,8 @@
# ifndef BOOST_HAS_UNISTD_H
# define BOOST_HAS_UNISTD_H
# endif
// boilerplate code:
# include <boost/config/posix_features.hpp>
# ifndef BOOST_HAS_STDINT_H
# define BOOST_HAS_STDINT_H
# endif

View File

@ -11,6 +11,8 @@
#define BOOST_HAS_GETTIMEOFDAY
// boilerplate code:
#include <boost/config/posix_features.hpp>

View File

@ -52,10 +52,28 @@
// IBM
# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
#elif defined (BOOST_ASSERT_CONFIG)
// this must come last - generate an error if we don't
// recognise the platform:
#else
# if defined(unix) \
|| defined(__unix) \
|| defined(_XOPEN_SOURCE) \
|| defined(_POSIX_SOURCE)
// generic unix platform:
# ifndef BOOST_HAS_UNISTD_H
# define BOOST_HAS_UNISTD_H
# endif
# include <boost/config/posix_features.hpp>
# endif
# if defined (BOOST_ASSERT_CONFIG)
// this must come last - generate an error if we don't
// recognise the platform:
# error "Unknown platform - please configure and report the results to boost.org"
# endif
#endif

View File

@ -30,6 +30,8 @@
#if defined(__MSL__) && (__MSL__ >= 0x5000)
# define BOOST_HAS_STDINT_H
# define BOOST_HAS_UNISTD_H
// boilerplate code:
# include <boost/config/posix_features.hpp>
#endif

View File

@ -22,9 +22,12 @@
# endif
//
// look for long long by looking for the appropriate macros in <climits>
// look for long long by looking for the appropriate macros in <limits.h>.
// Note that we use limits.h rather than climits for maximal portability,
// remember that since these just declare a bunch of macros, there should be
// no namespace issues from this.
//
#include <climits>
#include <limits.h>
# if !defined(BOOST_MSVC) && !defined(__BORLANDC__) \
&& (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
# define BOOST_HAS_LONG_LONG
@ -119,26 +122,6 @@
# define BOOST_NO_SWPRINTF
# endif
//
// If the platform claims to be Unix, then it had better behave like Unix!
//
# if defined(unix) \
|| defined(__unix) \
|| defined(_XOPEN_SOURCE) \
|| defined(_POSIX_SOURCE)
# ifndef BOOST_HAS_UNISTD_H
# define BOOST_HAS_UNISTD_H
# endif
# endif
//
// If we have a <unistd.h> then some options can be deduced from it:
//
# ifdef BOOST_HAS_UNISTD_H
# include <boost/config/posix_features.hpp>
# endif
//
// Turn on threading support if the compiler thinks that it's in
// multithreaded mode. We put this here because there are only a