Started the process of improving configure support, and merging C types
and library support into a single header. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401357
This commit is contained in:
parent
43c632905d
commit
0e9a85e9de
16 changed files with 155 additions and 643 deletions
|
@ -25,38 +25,24 @@
|
|||
#ifndef _SDL_byteorder_h
|
||||
#define _SDL_byteorder_h
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
/* The two types of endianness */
|
||||
#define SDL_LIL_ENDIAN 1234
|
||||
#define SDL_BIG_ENDIAN 4321
|
||||
|
||||
#ifdef __linux__
|
||||
# include <endian.h>
|
||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
# else
|
||||
# define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
/* Pardon the mess, I'm trying to determine the endianness of this host.
|
||||
I'm doing it by preprocessor defines rather than some sort of configure
|
||||
script so that application code can use this too. The "right" way would
|
||||
be to dynamically generate this file on install, but that's a lot of work.
|
||||
*/
|
||||
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
|
||||
#if (defined(__i386__) || defined(__i386)) || \
|
||||
defined(__ia64__) || defined(WIN32) || \
|
||||
defined(__ia64__) || defined(__x86_64__) || \
|
||||
(defined(__alpha__) || defined(__alpha)) || \
|
||||
(defined(__arm__) || defined(__thumb__)) || \
|
||||
(defined(__sh__) || defined(__sh64__)) || \
|
||||
(defined(__mips__) && defined(__MIPSEL__)) || \
|
||||
defined(__SYMBIAN32__) || defined(__x86_64__) || \
|
||||
defined(__OS2__) || defined(__LITTLE_ENDIAN__)
|
||||
defined(__SYMBIAN32__) || defined(__OS2__)
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#else
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#endif /* __linux__ */
|
||||
#endif /* !SDL_BYTEORDER */
|
||||
|
||||
#endif /* _SDL_byteorder_h */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue