andrew@0: /* andrew@0: oscpack -- Open Sound Control packet manipulation library andrew@0: http://www.audiomulch.com/~rossb/oscpack andrew@0: andrew@0: Copyright (c) 2004-2005 Ross Bencina andrew@0: andrew@0: Permission is hereby granted, free of charge, to any person obtaining andrew@0: a copy of this software and associated documentation files andrew@0: (the "Software"), to deal in the Software without restriction, andrew@0: including without limitation the rights to use, copy, modify, merge, andrew@0: publish, distribute, sublicense, and/or sell copies of the Software, andrew@0: and to permit persons to whom the Software is furnished to do so, andrew@0: subject to the following conditions: andrew@0: andrew@0: The above copyright notice and this permission notice shall be andrew@0: included in all copies or substantial portions of the Software. andrew@0: andrew@0: Any person wishing to distribute modifications to the Software is andrew@0: requested to send the modifications to the original developer so that andrew@0: they can be incorporated into the canonical version. andrew@0: andrew@0: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, andrew@0: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF andrew@0: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. andrew@0: IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR andrew@0: ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF andrew@0: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION andrew@0: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. andrew@0: */ andrew@0: #ifndef OSC_HOSTENDIANNESS_H andrew@0: #define OSC_HOSTENDIANNESS_H andrew@0: andrew@0: /* andrew@0: Make sure either OSC_HOST_LITTLE_ENDIAN or OSC_HOST_BIG_ENDIAN is defined andrew@0: andrew@0: If you know a way to enhance the detection below for Linux and/or MacOSX andrew@0: please let me know! I've tried a few things which don't work. andrew@0: */ andrew@0: andrew@0: #if defined(OSC_HOST_LITTLE_ENDIAN) || defined(OSC_HOST_BIG_ENDIAN) andrew@0: andrew@0: // you can define one of the above symbols from the command line andrew@0: // then you don't have to edit this file. andrew@0: andrew@0: #elif defined(__WIN32__) || defined(WIN32) andrew@0: andrew@0: // assume that __WIN32__ is only defined on little endian systems andrew@0: andrew@0: #define OSC_HOST_LITTLE_ENDIAN 1 andrew@0: #undef OSC_HOST_BIG_ENDIAN andrew@0: andrew@0: #elif defined(__APPLE__) andrew@0: andrew@0: #if defined(__LITTLE_ENDIAN__) andrew@0: #define OSC_HOST_LITTLE_ENDIAN 1 andrew@0: #undef OSC_HOST_BIG_ENDIAN andrew@0: #else andrew@0: #define OSC_HOST_BIG_ENDIAN 1 andrew@0: #undef OSC_HOST_LITTLE_ENDIAN andrew@0: #endif andrew@0: andrew@0: #else andrew@0: andrew@0: #error please edit OSCHostEndianness.h to configure endianness andrew@0: andrew@0: #endif andrew@0: andrew@0: #endif /* OSC_HOSTENDIANNESS_H */ andrew@0: