diff options
Diffstat (limited to 'libffi/src/mips/ffitarget.h')
-rw-r--r-- | libffi/src/mips/ffitarget.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/libffi/src/mips/ffitarget.h b/libffi/src/mips/ffitarget.h index d0fc983a74f..717d65951c3 100644 --- a/libffi/src/mips/ffitarget.h +++ b/libffi/src/mips/ffitarget.h @@ -1,5 +1,6 @@ /* -----------------------------------------------------------------*-C-*- - ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + ffitarget.h - Copyright (c) 2012 Anthony Green + Copyright (c) 1996-2003 Red Hat, Inc. Target configuration macros for MIPS. Permission is hereby granted, free of charge, to any person obtaining @@ -27,6 +28,10 @@ #ifndef LIBFFI_TARGET_H #define LIBFFI_TARGET_H +#ifndef LIBFFI_H +#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." +#endif + #ifdef linux # include <asm/sgidefs.h> #elif defined(__rtems__) @@ -36,7 +41,7 @@ #define _MIPS_SIM_ABI32 1 #define _MIPS_SIM_NABI32 2 #define _MIPS_SIM_ABI64 3 -#else +#elif !defined(__OpenBSD__) # include <sgidefs.h> #endif @@ -51,7 +56,7 @@ # endif #if !defined(_MIPS_SIM) --- something is very wrong -- +# error -- something is very wrong -- #else # if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64)) # define FFI_MIPS_N32 @@ -59,7 +64,7 @@ # if (_MIPS_SIM==_ABIO32 && defined(_ABIO32)) # define FFI_MIPS_O32 # else --- this is an unsupported platform -- +# error -- this is an unsupported platform -- # endif # endif #endif @@ -194,30 +199,29 @@ typedef enum ffi_abi { FFI_O32_SOFT_FLOAT, FFI_N32_SOFT_FLOAT, FFI_N64_SOFT_FLOAT, + FFI_LAST_ABI, #ifdef FFI_MIPS_O32 #ifdef __mips_soft_float - FFI_DEFAULT_ABI = FFI_O32_SOFT_FLOAT, + FFI_DEFAULT_ABI = FFI_O32_SOFT_FLOAT #else - FFI_DEFAULT_ABI = FFI_O32, + FFI_DEFAULT_ABI = FFI_O32 #endif #else # if _MIPS_SIM==_ABI64 # ifdef __mips_soft_float - FFI_DEFAULT_ABI = FFI_N64_SOFT_FLOAT, + FFI_DEFAULT_ABI = FFI_N64_SOFT_FLOAT # else - FFI_DEFAULT_ABI = FFI_N64, + FFI_DEFAULT_ABI = FFI_N64 # endif # else # ifdef __mips_soft_float - FFI_DEFAULT_ABI = FFI_N32_SOFT_FLOAT, + FFI_DEFAULT_ABI = FFI_N32_SOFT_FLOAT # else - FFI_DEFAULT_ABI = FFI_N32, + FFI_DEFAULT_ABI = FFI_N32 # endif # endif #endif - - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 } ffi_abi; #define FFI_EXTRA_CIF_FIELDS unsigned rstruct_flag |