front_idill/extern/fajran-npTuioClient/TuioClient/oscpack/osc/OscHostEndianness.h
author bastiena
Thu, 12 Apr 2012 15:33:25 +0200
changeset 28 9ccef81f02ab
parent 21 e4e5f02787a1
permissions -rw-r--r--
Charset set to UTF-8 without bom tab replaced by 4 spaces \r\n replaced by \n in non cs files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     1
/*
28
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
     2
    oscpack -- Open Sound Control packet manipulation library
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
     3
    http://www.audiomulch.com/~rossb/oscpack
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     4
28
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
     5
    Copyright (c) 2004-2005 Ross Bencina <rossb@audiomulch.com>
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     6
28
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
     7
    Permission is hereby granted, free of charge, to any person obtaining
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
     8
    a copy of this software and associated documentation files
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
     9
    (the "Software"), to deal in the Software without restriction,
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    10
    including without limitation the rights to use, copy, modify, merge,
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    11
    publish, distribute, sublicense, and/or sell copies of the Software,
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    12
    and to permit persons to whom the Software is furnished to do so,
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    13
    subject to the following conditions:
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    14
28
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    15
    The above copyright notice and this permission notice shall be
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    16
    included in all copies or substantial portions of the Software.
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    17
28
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    18
    Any person wishing to distribute modifications to the Software is
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    19
    requested to send the modifications to the original developer so that
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    20
    they can be incorporated into the canonical version.
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    21
28
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    22
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    23
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    24
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    25
    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    26
    ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    27
    CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 21
diff changeset
    28
    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    29
*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    30
#ifndef OSC_HOSTENDIANNESS_H
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    31
#define OSC_HOSTENDIANNESS_H
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    32
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    33
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    34
    Make sure either OSC_HOST_LITTLE_ENDIAN or OSC_HOST_BIG_ENDIAN is defined
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    35
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    36
    If you know a way to enhance the detection below for Linux and/or MacOSX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    37
    please let me know! I've tried a few things which don't work.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    38
*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    39
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    40
#if defined(OSC_HOST_LITTLE_ENDIAN) || defined(OSC_HOST_BIG_ENDIAN)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    41
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    42
// you can define one of the above symbols from the command line
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    43
// then you don't have to edit this file.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    44
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    45
#elif defined(__WIN32__) || defined(WIN32)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    46
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    47
// assume that __WIN32__ is only defined on little endian systems
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    48
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    49
#define OSC_HOST_LITTLE_ENDIAN 1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    50
#undef OSC_HOST_BIG_ENDIAN
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    51
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    52
#elif defined(__APPLE__)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    53
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    54
#if defined(__LITTLE_ENDIAN__)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    55
#define OSC_HOST_LITTLE_ENDIAN 1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    56
#undef OSC_HOST_BIG_ENDIAN
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    57
#else
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    58
#define OSC_HOST_BIG_ENDIAN 1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    59
#undef OSC_HOST_LITTLE_ENDIAN
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    60
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    61
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    62
#else
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    63
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    64
#error please edit OSCHostEndianness.h to configure endianness
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    65
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    66
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    67
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    68
#endif /* OSC_HOSTENDIANNESS_H */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    69