diff options
author | Anthony Green <green@gcc.gnu.org> | 2012-03-04 21:11:09 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2012-03-04 21:11:09 +0000 |
commit | 34fa7690ac66c6d3c5ddb1d35d267836e3c23f3d (patch) | |
tree | 3289bacfc83a97eaf50f42a61d0b9a06f4c76e9c /libffi/src/ia64 | |
parent | 8b59af5c6af6e67e151b72e48074f58b677b2e42 (diff) | |
download | gcc-34fa7690ac66c6d3c5ddb1d35d267836e3c23f3d.zip gcc-34fa7690ac66c6d3c5ddb1d35d267836e3c23f3d.tar.gz gcc-34fa7690ac66c6d3c5ddb1d35d267836e3c23f3d.tar.bz2 |
Merge upstream libffi
From-SVN: r184897
Diffstat (limited to 'libffi/src/ia64')
-rw-r--r-- | libffi/src/ia64/ffi.c | 4 | ||||
-rw-r--r-- | libffi/src/ia64/ffitarget.h | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/libffi/src/ia64/ffi.c b/libffi/src/ia64/ffi.c index 79e29b4..9533ef6 100644 --- a/libffi/src/ia64/ffi.c +++ b/libffi/src/ia64/ffi.c @@ -1,6 +1,7 @@ /* ----------------------------------------------------------------------- ffi.c - Copyright (c) 1998, 2007, 2008, 2012 Red Hat, Inc. Copyright (c) 2000 Hewlett Packard Company + Copyright (c) 2011 Anthony Green IA64 Foreign Function Interface @@ -429,7 +430,8 @@ ffi_prep_closure_loc (ffi_closure* closure, struct ffi_ia64_trampoline_struct *tramp; struct ia64_fd *fd; - FFI_ASSERT (cif->abi == FFI_UNIX); + if (cif->abi != FFI_UNIX) + return FFI_BAD_ABI; tramp = (struct ffi_ia64_trampoline_struct *)closure->tramp; fd = (struct ia64_fd *)(void *)ffi_closure_unix; diff --git a/libffi/src/ia64/ffitarget.h b/libffi/src/ia64/ffitarget.h index d85c049..e68cea6 100644 --- a/libffi/src/ia64/ffitarget.h +++ b/libffi/src/ia64/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 IA-64. 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 + #ifndef LIBFFI_ASM typedef unsigned long long ffi_arg; typedef signed long long ffi_sarg; @@ -34,8 +39,8 @@ typedef signed long long ffi_sarg; typedef enum ffi_abi { FFI_FIRST_ABI = 0, FFI_UNIX, /* Linux and all Unix variants use the same conventions */ - FFI_DEFAULT_ABI = FFI_UNIX, - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_UNIX } ffi_abi; #endif |