root/oscpack/tags/release_1_0_2/osc/OscHostEndianness.h

Revision 54, 2.3 kB (checked in by ross, 3 years ago)

update to support MacOSX Intel compilation from Martin Kaltenbrunner

  • Property svn:eol-style set to native
Line 
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(__APPLE__)
53
54 #if defined(__LITTLE_ENDIAN__)
55 #define OSC_HOST_LITTLE_ENDIAN 1
56 #undef OSC_HOST_BIG_ENDIAN
57 #else
58 #define OSC_HOST_BIG_ENDIAN 1
59 #undef OSC_HOST_LITTLE_ENDIAN
60 #endif
61
62 #else
63
64 #error please edit OSCHostEndianness.h to configure endianness
65
66 #endif
67
68 #endif /* OSC_HOSTENDIANNESS_H */
69
Note: See TracBrowser for help on using the browser.