libDwm-0.6.0
DwmPortability.hh
Go to the documentation of this file.
1 /* include/DwmPortability.hh. Generated from DwmPortability.hh.in by configure. */
2 //===========================================================================
3 // @(#) $Name$
4 // @(#) $Id: DwmPortability.hh.in 9022 2017-04-11 21:22:10Z dwm $
5 //===========================================================================
6 // Copyright (c) Daniel W. McRobb 2006-2007
7 // All rights reserved.
8 //
9 // Redistribution and use in source and binary forms, with or without
10 // modification, are permitted provided that the following conditions
11 // are met:
12 //
13 // 1. Redistributions of source code must retain the above copyright
14 // notice, this list of conditions and the following disclaimer.
15 // 2. Redistributions in binary form must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the distribution.
18 // 3. The names of the authors and copyright holders may not be used to
19 // endorse or promote products derived from this software without
20 // specific prior written permission.
21 //
22 // IN NO EVENT SHALL DANIEL W. MCROBB BE LIABLE TO ANY PARTY FOR
23 // DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
24 // INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE,
25 // EVEN IF DANIEL W. MCROBB HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
26 // DAMAGE.
27 //
28 // THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND
29 // DANIEL W. MCROBB HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
30 // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. DANIEL W. MCROBB MAKES NO
31 // REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, EITHER
32 // IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33 // WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
34 // OR THAT THE USE OF THIS SOFTWARE WILL NOT INFRINGE ANY PATENT,
35 // TRADEMARK OR OTHER RIGHTS.
36 //===========================================================================
37 
38 //---------------------------------------------------------------------------
41 //---------------------------------------------------------------------------
42 
43 /* #undef HAVE_CFBYTE_ORDER_H */
44 /* #undef HAVE_BYTESWAP_H */
45 /* #undef HAVE_ENDIAN_H */
46 #define HAVE_KVM_H 1
47 
48 //---------------------------------------------------------------------------
49 // Deal with lack of be64toh() and htobe64() on OS X and Linux
50 //---------------------------------------------------------------------------
51 #ifdef HAVE_CFBYTE_ORDER_H
52  // define be64toh() and htobe64() for OS X
53  #include <CoreFoundation/CFByteOrder.h>
54  #ifndef be64toh
55  #define be64toh(x) CFSwapInt64BigToHost((x))
56  #endif
57  #ifndef htobe64
58  #define htobe64(x) CFSwapInt64HostToBig((x))
59  #endif
60 #else
61  #ifdef HAVE_BYTESWAP_H
62  extern "C" {
63  #include <byteswap.h>
64  }
65  #ifdef HAVE_ENDIAN_H
66  extern "C" {
67  #include <endian.h>
68  }
69  #endif
70  #ifndef be64toh
71  #if __BYTE_ORDER == __LITTLE_ENDIAN
72  #define be64toh(x) bswap_64((x))
73  #else
74  #define be64toh(x) (x)
75  #endif
76  #endif
77  #ifndef htobe64
78  #if __BYTE_ORDER == __LITTLE_ENDIAN
79  #define htobe64(x) bswap_64((x))
80  #else
81  #define htobe64(x) (x)
82  #endif
83  #endif
84  #endif
85 
86  #ifndef be64toh
87  #if defined(__OpenBSD__)
88  #define be64toh(x) betoh64((x))
89  #endif
90  #endif
91 
92 #endif
93 
94 #define HAVE_STRTOF 1
95 
96 /* #undef HAVE_CPP0X */
97 /* #undef HAVE_TR1 */
98 /* #undef HAVE_CPP11 */
99 #define HAVE_CPP1Z 1
100 
101 #define HAVE_GPLUSPLUS_VERSION(MAJOR, MINOR) \
102  (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))