Skip to content

Commit

Permalink
More fixes for building on BeOS
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 18, 2006
1 parent e0f42f7 commit a4e7fce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
7 changes: 4 additions & 3 deletions include/SDL_endian.h
Expand Up @@ -52,12 +52,13 @@
extern "C" {
#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
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.
*/
#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)
{
__asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x));
Expand Down
24 changes: 10 additions & 14 deletions include/SDL_stdinc.h
Expand Up @@ -28,23 +28,19 @@
#include "SDL_config.h"

/* AIX requires this to be the first thing in the file. */
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#if HAVE_ALLOCA
# if HAVE_ALLOCA_H
# include <alloca.h>
# elif __GNUC__
# define alloca __builtin_alloca
# elif _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif _AIX
#pragma alloca
# else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
#endif
Expand Down

0 comments on commit a4e7fce

Please sign in to comment.