More fixes for building on BeOS
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401372
This commit is contained in:
parent
0449d3bfca
commit
297e20fe1d
2 changed files with 14 additions and 17 deletions
|
@ -52,12 +52,13 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Use inline functions for compilers that support them, and static
|
/* Use __inline__ functions for compilers that support them, and static
|
||||||
functions for those that do not. Because these functions become
|
functions for those that do not. Because these functions become
|
||||||
static for compilers that do not support inline functions, this
|
static for compilers that do not support __inline__ functions, this
|
||||||
header should only be included in files that actually use them.
|
header should only be included in files that actually use them.
|
||||||
*/
|
*/
|
||||||
#if defined(__GNUC__) && defined(__i386__)
|
#if defined(__GNUC__) && defined(__i386__) &&
|
||||||
|
!(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
|
||||||
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
||||||
{
|
{
|
||||||
__asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x));
|
__asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x));
|
||||||
|
|
|
@ -28,23 +28,19 @@
|
||||||
#include "SDL_config.h"
|
#include "SDL_config.h"
|
||||||
|
|
||||||
/* AIX requires this to be the first thing in the file. */
|
/* AIX requires this to be the first thing in the file. */
|
||||||
#ifdef __GNUC__
|
#if HAVE_ALLOCA
|
||||||
# define alloca __builtin_alloca
|
# if HAVE_ALLOCA_H
|
||||||
#else
|
# include <alloca.h>
|
||||||
# ifdef _MSC_VER
|
# elif __GNUC__
|
||||||
|
# define alloca __builtin_alloca
|
||||||
|
# elif _MSC_VER
|
||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
# define alloca _alloca
|
# define alloca _alloca
|
||||||
|
# elif _AIX
|
||||||
|
#pragma alloca
|
||||||
# else
|
# else
|
||||||
# if HAVE_ALLOCA_H
|
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||||
# include <alloca.h>
|
char *alloca ();
|
||||||
# else
|
|
||||||
# ifdef _AIX
|
|
||||||
#pragma alloca
|
|
||||||
# else
|
|
||||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
|
||||||
char *alloca ();
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue