[DEV] correct some Little and big enddian error

This commit is contained in:
Edouard DUPIN 2014-04-19 00:21:24 +02:00
parent 841f407905
commit e05a06288a

View File

@ -40,22 +40,19 @@
#if !(defined WIN32 && defined WINCE) #if !(defined WIN32 && defined WINCE)
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#if BYTE_ORDER==LITTLE_ENDIAN
union magic {
struct {
ogg_int32_t lo;
ogg_int32_t hi;
} halves;
ogg_int64_t whole;
};
#endif
#if BYTE_ORDER==BIG_ENDIAN #if BYTE_ORDER==BIG_ENDIAN
union magic {
struct {
ogg_int32_t hi;
ogg_int32_t lo;
} halves;
ogg_int64_t whole;
};
#else
union magic { union magic {
struct { struct {
ogg_int32_t hi;
ogg_int32_t lo; ogg_int32_t lo;
ogg_int32_t hi;
} halves; } halves;
ogg_int64_t whole; ogg_int64_t whole;
}; };