aboutsummaryrefslogtreecommitdiff
path: root/libstudxml/details/build2/config.h
blob: b47f252fffd40926273bb7a6f04ff4b7adc2ce50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* file      : libstudxml/details/build2/config.h
 * copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC
 * license   : MIT; see accompanying LICENSE file
 */

/* Static configuration file for the build2 build. */

#ifndef LIBSTUDXML_DETAILS_CONFIG_H
#define LIBSTUDXML_DETAILS_CONFIG_H

/* Define LIBSTUDXML_BUILD2 for the installed case. */
#ifndef LIBSTUDXML_BUILD2
#  define LIBSTUDXML_BUILD2
#endif

#ifdef __FreeBSD__
#  include <sys/endian.h> /* BYTE_ORDER */
#else
#  if defined(_WIN32)
#    ifndef BYTE_ORDER
#      define BIG_ENDIAN    4321
#      define LITTLE_ENDIAN 1234
#      define BYTE_ORDER    LITTLE_ENDIAN
#    endif
#  else
#    include <sys/param.h>  /* BYTE_ORDER/__BYTE_ORDER */
#    ifndef BYTE_ORDER
#      ifdef __BYTE_ORDER
#        define BYTE_ORDER    __BYTE_ORDER
#        define BIG_ENDIAN    __BIG_ENDIAN
#        define LITTLE_ENDIAN __LITTLE_ENDIAN
#      else
#        error no BYTE_ORDER/__BYTE_ORDER define
#      endif
#    endif
#  endif
#endif

#if BYTE_ORDER == BIG_ENDIAN
#  define LIBSTUDXML_BYTEORDER 4321
#else
#  define LIBSTUDXML_BYTEORDER 1234
#endif

#endif /* LIBSTUDXML_DETAILS_CONFIG_H */