Ticket #19386: patch-bytes.h.2.diff

File patch-bytes.h.2.diff, 727 bytes (added by vike2000, 15 years ago)

supposed to work on both os 10.4 and .5. see sourceforge.net/forum/forum.php?thread_id=3137807&forum_id=900998

  • bytes.h

    old new  
    3434      | (((x) & 0x00000000000000ffull) << 56))
    3535
    3636#else
     37
     38#ifdef __APPLE__
     39#include <machine/endian.h>
     40#define __BIG_ENDIAN            BIG_ENDIAN
     41#define __LITTLE_ENDIAN         LITTLE_ENDIAN
     42
     43#include <libkern/OSByteOrder.h>
     44#define __BYTE_ORDER            BYTE_ORDER
     45#define __FLOAT_WORD_ORDER      BYTE_ORDER
     46
     47#define __bswap_32                      OSSwapConstInt32
     48#define __bswap_64                      OSSwapConstInt64
     49
     50#else
    3751#include <endian.h>
    3852#include <byteswap.h>
    3953
     
    4155typedef __uint32_t uint32_t;
    4256#endif
    4357
     58#endif
     59
    4460#if !defined(__BYTE_ORDER) || !defined(__FLOAT_WORD_ORDER)
    4561#error "Undefined byte and float word order!"
    4662#endif