Bug fixed for unix error "readlink /proc/self/fd/0" on MacOS.
[Faustine.git] / interpreter / preprocessor / faust-0.9.47mr3 / architecture / osclib / oscpack / osc / OscHostEndianness.h
1 /*
2 oscpack -- Open Sound Control packet manipulation library
3 http://www.audiomulch.com/~rossb/oscpack
4
5 Copyright (c) 2004-2005 Ross Bencina <rossb@audiomulch.com>
6
7 Permission is hereby granted, free of charge, to any person obtaining
8 a copy of this software and associated documentation files
9 (the "Software"), to deal in the Software without restriction,
10 including without limitation the rights to use, copy, modify, merge,
11 publish, distribute, sublicense, and/or sell copies of the Software,
12 and to permit persons to whom the Software is furnished to do so,
13 subject to the following conditions:
14
15 The above copyright notice and this permission notice shall be
16 included in all copies or substantial portions of the Software.
17
18 Any person wishing to distribute modifications to the Software is
19 requested to send the modifications to the original developer so that
20 they can be incorporated into the canonical version.
21
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
27 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 */
30 #ifndef OSC_HOSTENDIANNESS_H
31 #define OSC_HOSTENDIANNESS_H
32
33 /*
34 Make sure either OSC_HOST_LITTLE_ENDIAN or OSC_HOST_BIG_ENDIAN is defined
35
36 If you know a way to enhance the detection below for Linux and/or MacOSX
37 please let me know! I've tried a few things which don't work.
38 */
39
40 #if defined(OSC_HOST_LITTLE_ENDIAN) || defined(OSC_HOST_BIG_ENDIAN)
41
42 // you can define one of the above symbols from the command line
43 // then you don't have to edit this file.
44
45 #elif defined(__WIN32__) || defined(WIN32)
46
47 // assume that __WIN32__ is only defined on little endian systems
48
49 #define OSC_HOST_LITTLE_ENDIAN 1
50 #undef OSC_HOST_BIG_ENDIAN
51
52 #elif defined(__LITTLE_ENDIAN__) || (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
53 #define OSC_HOST_LITTLE_ENDIAN 1
54 #undef OSC_HOST_BIG_ENDIAN
55
56 #elif defined(__BIG_ENDIAN__) || (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
57 #define OSC_HOST_BIG_ENDIAN 1
58 #undef OSC_HOST_LITTLE_ENDIAN
59
60 #else
61
62 #error please edit OSCHostEndianness.h to configure endianness or use -DOSC_HOST_LITTLE_ENDIAN | -DOSC_HOST_BIG_ENDIAN
63
64 #endif
65
66 #endif /* OSC_HOSTENDIANNESS_H */
67