Ticket #19386: patch-bytes.h.diff

File patch-bytes.h.diff, 736 bytes (added by CaptSolo, 16 years ago)
  • bytes.h

    old new  
    3434      | (((x) & 0x00000000000000ffull) << 56))
    3535
    3636#else
     37#ifdef __APPLE__ 
     38#include <machine/endian.h> 
     39#include <libkern/OSByteOrder.h> 
     40#define __BYTE_ORDER BYTE_ORDER 
     41#define __FLOAT_WORD_ORDER BYTE_ORDER 
     42#define __BIG_ENDIAN BIG_ENDIAN 
     43#define __LITTLE_ENDIAN LITTLE_ENDIAN 
     44#define __bswap_32 OSSwapConstInt32 
     45#define __bswap_64 OSSwapConstInt64 
     46#else 
    3747#include <endian.h>
    3848#include <byteswap.h>
    3949
    4050typedef __uint64_t uint64_t;
    4151typedef __uint32_t uint32_t;
    4252#endif
     53#endif
    4354
    4455#if !defined(__BYTE_ORDER) || !defined(__FLOAT_WORD_ORDER)
    4556#error "Undefined byte and float word order!"