1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
Jip J. Dekker 3e72b0e857 Squashed 'software/gecode_on_record/' content from commit 37ed9bda4
git-subtree-dir: software/gecode_on_record
git-subtree-split: 37ed9bda495ea87e63217c19a374b5a93bb0078e
2021-06-16 14:03:52 +10:00

87 lines
2.6 KiB
C++

// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Darin Adler 2001.
// (C) Copyright Douglas Gregor 2002.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version.
// generic BSD config options:
#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
#error "This platform is not BSD"
#endif
#ifdef __FreeBSD__
#define GECODE_BOOST_PLATFORM "FreeBSD " GECODE_BOOST_STRINGIZE(__FreeBSD__)
#elif defined(__NetBSD__)
#define GECODE_BOOST_PLATFORM "NetBSD " GECODE_BOOST_STRINGIZE(__NetBSD__)
#elif defined(__OpenBSD__)
#define GECODE_BOOST_PLATFORM "OpenBSD " GECODE_BOOST_STRINGIZE(__OpenBSD__)
#elif defined(__DragonFly__)
#define GECODE_BOOST_PLATFORM "DragonFly " GECODE_BOOST_STRINGIZE(__DragonFly__)
#endif
//
// is this the correct version check?
// FreeBSD has <nl_types.h> but does not
// advertise the fact in <unistd.h>:
//
#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__)
# define GECODE_BOOST_HAS_NL_TYPES_H
#endif
//
// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h>
// and not in <unistd.h>
//
#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\
|| defined(__OpenBSD__) || defined(__DragonFly__)
# define GECODE_BOOST_HAS_PTHREADS
#endif
//
// No wide character support in the BSD header files:
//
#if defined(__NetBSD__)
#define __NetBSD_GCC__ (__GNUC__ * 1000000 \
+ __GNUC_MINOR__ * 1000 \
+ __GNUC_PATCHLEVEL__)
// XXX - the following is required until c++config.h
// defines _GLIBCXX_HAVE_SWPRINTF and friends
// or the preprocessor conditionals are removed
// from the cwchar header.
#define _GLIBCXX_HAVE_SWPRINTF 1
#endif
#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \
|| (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__))
# define GECODE_BOOST_NO_CWCHAR
#endif
//
// The BSD <ctype.h> has macros only, no functions:
//
#if !defined(__OpenBSD__) || defined(__DragonFly__)
# define GECODE_BOOST_NO_CTYPE_FUNCTIONS
#endif
//
// thread API's not auto detected:
//
#define GECODE_BOOST_HAS_SCHED_YIELD
#define GECODE_BOOST_HAS_NANOSLEEP
#define GECODE_BOOST_HAS_GETTIMEOFDAY
#define GECODE_BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
#define GECODE_BOOST_HAS_SIGACTION
// boilerplate code:
#define GECODE_BOOST_HAS_UNISTD_H
#include <gecode/third-party/boost/config/posix_features.hpp>