Sha256: 956ff8c11298aa6993387027650751e59d824dd11681491b69f7b3466b57fc94

Contents?: true

Size: 914 Bytes

Versions: 25

Compression:

Stored size: 914 Bytes

Contents

#ifndef JFFI_ENDIAN_H
#define JFFI_ENDIAN_H

#include <sys/param.h>
#include <sys/types.h>

#if defined(__linux__) || defined(__CYGWIN__)
#  include_next <endian.h>
#endif

#ifdef __sun
# include <sys/byteorder.h>
# define LITTLE_ENDIAN 1234
# define BIG_ENDIAN 4321
# if defined(_BIG_ENDIAN)
#  define BYTE_ORDER BIG_ENDIAN
# elif defined(_LITTLE_ENDIAN)
#  define BYTE_ORDER LITTLE_ENDIAN
# else
#  error "Cannot determine endian-ness"
# endif
#endif

#if defined(_AIX) && !defined(BYTE_ORDER)
# define LITTLE_ENDIAN 1234
# define BIG_ENDIAN 4321
# if defined(__BIG_ENDIAN__)
#  define BYTE_ORDER BIG_ENDIAN
# elif defined(__LITTLE_ENDIAN__)
#  define BYTE_ORDER LITTLE_ENDIAN
# else
#  error "Cannot determine endian-ness"
# endif
#endif

#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) || !defined(BIG_ENDIAN)
#  error "Cannot determine the endian-ness of this platform"
#endif

#endif /* JFFI_ENDIAN_H */

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
ffi-0.5.4-x86-mingw32 ext/ffi_c/endian.h
ffi-0.5.4 ext/ffi_c/endian.h
ffi-0.5.3-x86-mswin32 ext/ffi_c/endian.h
ffi-0.5.3 ext/ffi_c/endian.h
ffi-0.5.3-x86-mingw32 ext/ffi_c/endian.h