EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
osdWireConfig.h
1 /*************************************************************************\
2 * SPDX-License-Identifier: EPICS
3 * EPICS BASE is distributed subject to a Software License Agreement found
4 * in file LICENSE that is included with this distribution.
5 \*************************************************************************/
6 
7 /*
8  * Default version of osdWireConfig.h that might
9  * work on UNIX like systems that define <sys/param.h>
10  *
11  * Author Jeffrey O. Hill
13  */
14 
15 #ifndef osdWireConfig_h
16 #define osdWireConfig_h
17 
18 /* This file must be usable from both C and C++ */
19 
20 /* if compilation fails because this wasnt found then you may need to define an OS
21  specific osdWireConfig.h */
22 #include <sys/param.h>
23 
24 #ifdef __BYTE_ORDER
25 # if __BYTE_ORDER == __LITTLE_ENDIAN
26 # define EPICS_BYTE_ORDER EPICS_ENDIAN_LITTLE
27 # elif __BYTE_ORDER == __BIG_ENDIAN
28 # define EPICS_BYTE_ORDER EPICS_ENDIAN_BIG
29 # else
30 # error EPICS hasnt been ported to run on the <sys/param.h> specified __BYTE_ORDER
31 # endif
32 #else
33 # ifdef BYTE_ORDER
34 # if BYTE_ORDER == LITTLE_ENDIAN
35 # define EPICS_BYTE_ORDER EPICS_ENDIAN_LITTLE
36 # elif BYTE_ORDER == BIG_ENDIAN
37 # define EPICS_BYTE_ORDER EPICS_ENDIAN_BIG
38 # else
39 # error EPICS hasnt been ported to run on the <sys/param.h> specified BYTE_ORDER
40 # endif
41 # else
42 # error <sys/param.h> doesnt specify __BYTE_ORDER or BYTE_ORDER - is an OS specific osdWireConfig.h needed?
43 # endif
44 #endif
45 
46 #ifdef __FLOAT_WORD_ORDER
47 # if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN
48 # define EPICS_FLOAT_WORD_ORDER EPICS_ENDIAN_LITTLE
49 # elif __FLOAT_WORD_ORDER == __BIG_ENDIAN
50 # define EPICS_FLOAT_WORD_ORDER EPICS_ENDIAN_BIG
51 # else
52 # error EPICS hasnt been ported to <sys/param.h> specified __FLOAT_WORD_ORDER
53 # endif
54 #else
55 # ifdef FLOAT_WORD_ORDER
56 # if FLOAT_WORD_ORDER == LITTLE_ENDIAN
57 # define EPICS_FLOAT_WORD_ORDER EPICS_ENDIAN_LITTLE
58 # elif FLOAT_WORD_ORDER == BIG_ENDIAN
59 # define EPICS_FLOAT_WORD_ORDER EPICS_ENDIAN_BIG
60 # else
61 # error EPICS hasnt been ported to <sys/param.h> specified FLOAT_WORD_ORDER
62 # endif
63 # else
64  /* assume that if neither __FLOAT_WORD_ORDER nor FLOAT_WORD_ORDER are
65  defined then weird fp ordered archs like arm nwfp aren't supported */
66 # define EPICS_FLOAT_WORD_ORDER EPICS_BYTE_ORDER
67 # endif
68 #endif
69 
70 #endif /* ifdef osdWireConfig_h */