Ticket #62: os2.hpp

File os2.hpp, 1.8 KB (added by psmedley, 10 years ago)
Line 
1// (C) Copyright John Maddock 2001 - 2003.
2// (C) Copyright Darin Adler 2001.
3// (C) Copyright Douglas Gregor 2002.
4// Use, modification and distribution are subject to the
5// Boost Software License, Version 1.0. (See accompanying file
6// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
8// See http://www.boost.org for most recent version.
9
10// generic BSD config options:
11
12#if !defined(__OS2__)
13#error "This platform is not OS/2"
14#endif
15
16#define BOOST_PLATFORM "OS2 " BOOST_STRINGIZE(__OS2__)
17
18//
19// is this the correct version check?
20// FreeBSD has <nl_types.h> but does not
21// advertise the fact in <unistd.h>:
22//
23
24# define BOOST_HAS_NL_TYPES_H
25
26//
27// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h>
28// and not in <unistd.h>
29//
30# define BOOST_HAS_PTHREADS
31# define BOOST_HAS_PTHREAD_YIELD
32//
33// No wide character support in the BSD header files:
34//
35#define BOOST_NO_CWCHAR
36#define BOOST_NO_CWCTYPE
37#define BOOST_IOSTREAMS_NO_WIDE_STREAMS
38#define BOOST_NO_STD_WSTRING
39
40//
41// The BSD <ctype.h> has macros only, no functions:
42//
43#if !defined(__OpenBSD__)
44# define BOOST_NO_CTYPE_FUNCTIONS
45#endif
46
47//
48// thread API's not auto detected:
49//
50#define BOOST_HAS_NANOSLEEP
51#define BOOST_HAS_GETTIMEOFDAY
52#define BOOST_HAS_SIGACTION
53
54
55// some EAI_ definitions
56#define EAI_SERVICE EPROTOTYPE
57#define EAI_SOCKTYPE ESOCKTNOSUPPORT
58#define EAI_AGAIN EAGAIN
59#define EAI_BADFLAGS EINVAL
60#define EAI_FAIL ECONNABORTED
61#define EAI_FAMILY EAFNOSUPPORT
62#define EAI_MEMORY EOVERFLOW
63#define EAI_NONAME EHOSTUNREACH
64#define EAI_NODATA EAI_NONAME
65
66#ifndef NI_MAXHOST
67#define NI_MAXHOST 1025
68#endif
69
70#ifndef NI_MAXSERV
71#define NI_MAXSERV 32
72#endif
73
74// boilerplate code:
75#define BOOST_HAS_UNISTD_H
76#include <boost/config/posix_features.hpp>
77
78
79
80
81
82