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