From fbf085d972ea2009f0382968685d994d0621315d Mon Sep 17 00:00:00 2001 From: hartmann Date: Mon, 9 Feb 2004 08:22:49 +0000 Subject: [PATCH] Add support for other platforms. git-svn-id: https://svn.dealii.org/trunk@8424 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/boost/config/platform/aix.hpp | 32 +++++++++ .../include/boost/config/platform/amigaos.hpp | 15 ++++ .../include/boost/config/platform/beos.hpp | 25 +++++++ .../include/boost/config/platform/bsd.hpp | 65 +++++++++++++++++ .../include/boost/config/platform/cygwin.hpp | 39 ++++++++++ .../include/boost/config/platform/hpux.hpp | 58 +++++++++++++++ .../include/boost/config/platform/irix.hpp | 28 ++++++++ .../include/boost/config/platform/macos.hpp | 66 +++++++++++++++++ .../include/boost/config/platform/solaris.hpp | 19 +++++ .../include/boost/config/platform/win32.hpp | 72 +++++++++++++++++++ 10 files changed, 419 insertions(+) create mode 100644 deal.II/contrib/boost/include/boost/config/platform/aix.hpp create mode 100644 deal.II/contrib/boost/include/boost/config/platform/amigaos.hpp create mode 100644 deal.II/contrib/boost/include/boost/config/platform/beos.hpp create mode 100644 deal.II/contrib/boost/include/boost/config/platform/bsd.hpp create mode 100644 deal.II/contrib/boost/include/boost/config/platform/cygwin.hpp create mode 100644 deal.II/contrib/boost/include/boost/config/platform/hpux.hpp create mode 100644 deal.II/contrib/boost/include/boost/config/platform/irix.hpp create mode 100644 deal.II/contrib/boost/include/boost/config/platform/macos.hpp create mode 100644 deal.II/contrib/boost/include/boost/config/platform/solaris.hpp create mode 100644 deal.II/contrib/boost/include/boost/config/platform/win32.hpp diff --git a/deal.II/contrib/boost/include/boost/config/platform/aix.hpp b/deal.II/contrib/boost/include/boost/config/platform/aix.hpp new file mode 100644 index 0000000000..f1bb1b2f2d --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/aix.hpp @@ -0,0 +1,32 @@ +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +// IBM/Aix specific config options: + +#define BOOST_PLATFORM "IBM Aix" + +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_CLOCK_GETTIME + +// This needs support in "boost/cstdint.hpp" exactly like FreeBSD. +// This platform has header named which includes all +// the things needed. +#define BOOST_HAS_STDINT_H + +// Threading API's: +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_DELAY_NP +#define BOOST_HAS_SCHED_YIELD +//#define BOOST_HAS_PTHREAD_YIELD + +// boilerplate code: +#include + + + diff --git a/deal.II/contrib/boost/include/boost/config/platform/amigaos.hpp b/deal.II/contrib/boost/include/boost/config/platform/amigaos.hpp new file mode 100644 index 0000000000..7aa85d1928 --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/amigaos.hpp @@ -0,0 +1,15 @@ + +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +#define BOOST_PLATFORM "AmigaOS" + +#define BOOST_DISABLE_THREADS +#define BOOST_NO_CWCHAR +#define BOOST_NO_STD_WSTRING +#define BOOST_NO_INTRINSIC_WCHAR_T + diff --git a/deal.II/contrib/boost/include/boost/config/platform/beos.hpp b/deal.II/contrib/boost/include/boost/config/platform/beos.hpp new file mode 100644 index 0000000000..b2c0de5f38 --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/beos.hpp @@ -0,0 +1,25 @@ +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +// BeOS specific config options: + +#define BOOST_PLATFORM "BeOS" + +#define BOOST_NO_CWCHAR +#define BOOST_NO_CWCTYPE +#define BOOST_HAS_UNISTD_H + +#define BOOST_HAS_BETHREADS + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +// boilerplate code: +#include + + diff --git a/deal.II/contrib/boost/include/boost/config/platform/bsd.hpp b/deal.II/contrib/boost/include/boost/config/platform/bsd.hpp new file mode 100644 index 0000000000..9adf3a5c77 --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/bsd.hpp @@ -0,0 +1,65 @@ +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +// generic BSD config options: + +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) +#error "This platform is not BSD" +#endif + +#ifdef __FreeBSD__ +#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) +#elif defined(__NetBSD__) +#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) +#elif defined(__OpenBSD__) +#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) +#endif + +// +// is this the correct version check? +// FreeBSD has but does not +// advertise the fact in : +// +#if defined(__FreeBSD__) && (__FreeBSD__ >= 3) +# define BOOST_HAS_NL_TYPES_H +#endif + +// +// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in +// and not in +// +#if defined(__FreeBSD__) && (__FreeBSD__ <= 3) +# define BOOST_HAS_PTHREADS +#endif + +// +// No wide character support in the BSD header files: +// +#define BOOST_NO_CWCHAR + +// +// The BSD has macros only, no functions: +// +#define BOOST_NO_CTYPE_FUNCTIONS + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_SIGACTION + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + + + diff --git a/deal.II/contrib/boost/include/boost/config/platform/cygwin.hpp b/deal.II/contrib/boost/include/boost/config/platform/cygwin.hpp new file mode 100644 index 0000000000..ad5ae94f12 --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/cygwin.hpp @@ -0,0 +1,39 @@ +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +// cygwin specific config options: + +#define BOOST_PLATFORM "Cygwin" +#define BOOST_NO_CWCTYPE +#define BOOST_NO_CWCHAR +#define BOOST_NO_SWPRINTF +#define BOOST_HAS_DIRENT_H + +// +// Threading API: +// See if we have POSIX threads, if we do use them, otherwise +// revert to native Win threads. +#define BOOST_HAS_UNISTD_H +#include +#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_SIGACTION +#else +# if !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_WINTHREADS +# endif +# define BOOST_HAS_FTIME +#endif + +// boilerplate code: +#include + + + diff --git a/deal.II/contrib/boost/include/boost/config/platform/hpux.hpp b/deal.II/contrib/boost/include/boost/config/platform/hpux.hpp new file mode 100644 index 0000000000..6b63d6db6f --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/hpux.hpp @@ -0,0 +1,58 @@ +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +// hpux specific config options: + +#define BOOST_PLATFORM "HP-UX" + +// In principle, HP-UX has a nice under the name +// However, it has the following problem: +// Use of UINT32_C(0) results in "0u l" for the preprocessed source +// (verifyable with gcc 2.95.3, assumed for HP aCC) +// #define BOOST_HAS_STDINT_H + +#define BOOST_NO_SWPRINTF +#define BOOST_NO_CWCTYPE + +#ifdef __GNUC__ + // GNU C on HP-UX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + +// the following are always available: +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_SCHED_YIELD +#endif +#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#endif +#ifndef BOOST_HAS_NL_TYPES_H +# define BOOST_HAS_NL_TYPES_H +#endif +#ifndef BOOST_HAS_NANOSLEEP +# define BOOST_HAS_NANOSLEEP +#endif +#ifndef BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_GETTIMEOFDAY +#endif +#ifndef BOOST_HAS_DIRENT_H +# define BOOST_HAS_DIRENT_H +#endif +#ifndef BOOST_HAS_CLOCK_GETTIME +# define BOOST_HAS_CLOCK_GETTIME +#endif +#ifndef BOOST_HAS_SIGACTION +# define BOOST_HAS_SIGACTION +#endif + diff --git a/deal.II/contrib/boost/include/boost/config/platform/irix.hpp b/deal.II/contrib/boost/include/boost/config/platform/irix.hpp new file mode 100644 index 0000000000..60059bd914 --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/irix.hpp @@ -0,0 +1,28 @@ +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +// SGI Irix specific config options: + +#define BOOST_PLATFORM "SGI Irix" + +#define BOOST_NO_SWPRINTF +// +// these are not auto detected by POSIX feature tests: +// +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE + +#ifdef __GNUC__ + // GNU C on IRIX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +#endif + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + diff --git a/deal.II/contrib/boost/include/boost/config/platform/macos.hpp b/deal.II/contrib/boost/include/boost/config/platform/macos.hpp new file mode 100644 index 0000000000..047cbf52fc --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/macos.hpp @@ -0,0 +1,66 @@ +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +// Mac OS specific config options: + +#define BOOST_PLATFORM "Mac OS" + +#if __MACH__ && !defined(_MSL_USING_MSL_C) + +// Using the Mac OS X system BSD-style C library. + +# define BOOST_NO_CTYPE_FUNCTIONS +# define BOOST_NO_CWCHAR +# ifndef BOOST_HAS_UNISTD_H +# define BOOST_HAS_UNISTD_H +# endif +// boilerplate code: +# ifndef TARGET_CARBON +# include +# endif +# ifndef BOOST_HAS_STDINT_H +# define BOOST_HAS_STDINT_H +# endif + +// +// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday, +// of these only pthreads are advertised in , so set the +// other options explicitly: +// +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_SIGACTION + +# ifndef __APPLE_CC__ + +// GCC strange "ignore std" mode works better if you pretend everything +// is in the std namespace, for the most part. + +# define BOOST_NO_STDC_NAMESPACE +# endif + +#else + +// Using the MSL C library. + +// We will eventually support threads in non-Carbon builds, but we do +// not support this yet. +# if TARGET_CARBON + +# define BOOST_HAS_MPTASKS + +// The MP task implementation of Boost Threads aims to replace MP-unsafe +// parts of the MSL, so we turn on threads unconditionally. +# define BOOST_HAS_THREADS + +// The remote call manager depends on this. +# define BOOST_BIND_ENABLE_PASCAL + +# endif + +#endif + diff --git a/deal.II/contrib/boost/include/boost/config/platform/solaris.hpp b/deal.II/contrib/boost/include/boost/config/platform/solaris.hpp new file mode 100644 index 0000000000..3a21a5ea15 --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/solaris.hpp @@ -0,0 +1,19 @@ +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +// sun specific config options: + +#define BOOST_PLATFORM "Sun Solaris" + +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#define BOOST_HAS_UNISTD_H +#include + + + diff --git a/deal.II/contrib/boost/include/boost/config/platform/win32.hpp b/deal.II/contrib/boost/include/boost/config/platform/win32.hpp new file mode 100644 index 0000000000..89e36ba8dd --- /dev/null +++ b/deal.II/contrib/boost/include/boost/config/platform/win32.hpp @@ -0,0 +1,72 @@ +// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and +// distribute this software is granted provided this copyright notice appears +// in all copies. This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. + +// See http://www.boost.org for most recent version. + +// Win32 specific config options: + +#define BOOST_PLATFORM "Win32" + +#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF) +# define BOOST_NO_SWPRINTF +#endif + +// +// Win32 will normally be using native Win32 threads, +// but there is a pthread library avaliable as an option, +// we used to disable this when BOOST_DISABLE_WIN32 was +// defined but no longer - this should allow some +// files to be compiled in strict mode - while maintaining +// a consistent setting of BOOST_HAS_THREADS across +// all translation units (needed for shared_ptr etc). +// +#ifndef BOOST_HAS_PTHREADS +# define BOOST_HAS_WINTHREADS +#endif + +#ifndef BOOST_DISABLE_WIN32 +// WEK: Added +#define BOOST_HAS_FTIME + +#endif + +// +// disable min/max macros: +// +#ifdef min +# undef min +#endif +#ifdef max +# undef max +#endif +#ifndef NOMINMAX +# define NOMINMAX +#endif + +#ifdef BOOST_MSVC +namespace std{ + // Apparently, something in the Microsoft libraries requires the "long" + // overload, because it calls the min/max functions with arguments of + // slightly different type. (If this proves to be incorrect, this + // whole "BOOST_MSVC" section can be removed.) + inline long min(long __a, long __b) { + return __b < __a ? __b : __a; + } + inline long max(long __a, long __b) { + return __a < __b ? __b : __a; + } + // The "long double" overload is required, otherwise user code calling + // min/max for floating-point numbers will use the "long" overload. + // (SourceForge bug #495495) + inline long double min(long double __a, long double __b) { + return __b < __a ? __b : __a; + } + inline long double max(long double __a, long double __b) { + return __a < __b ? __b : __a; + } +} +using std::min; +using std::max; +# endif -- 2.39.5