#ifndef _TRAMPOLINE_H
#define _TRAMPOLINE_H

/*
 * Copyright 1995-1999, 2005 Bruno Haible, <bruno@clisp.org>
 *
 * This is free software distributed under the GNU General Public Licence
 * described in the file COPYING. Contact the author if you don't have this
 * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied,
 * on this software.
 */

#if !defined(LIBFFCALL_VERSION)
# define LIBFFCALL_VERSION @LIBFFCALL_VERSION@
#endif

/* These definitions are adjusted by `configure' automatically. */

/* CPU */
#ifndef __i386__
#undef __i386__
#endif
#ifndef __m68k__
#undef __m68k__
#endif
#ifndef __mips__
#undef __mips__
#endif
#ifndef __mipsn32__
#undef __mipsn32__
#endif
#ifndef __mips64__
#undef __mips64__
#endif
#ifndef __sparc__
#undef __sparc__
#endif
#ifndef __sparc64__
#undef __sparc64__
#endif
#ifndef __alpha__
#undef __alpha__
#endif
#ifndef __hppa__
#undef __hppa__
#endif
#ifndef __arm__
#undef __arm__
#endif
#ifndef __powerpc__
#undef __powerpc__
#endif
#ifndef __powerpc64__
#undef __powerpc64__
#endif
#ifndef __s390__
#undef __s390__
#endif
#ifndef __m88k__
#undef __m88k__
#endif
#ifndef __convex__
#undef __convex__
#endif
#ifndef __ia64__
#undef __ia64__
#endif
#ifndef __x86_64__
#undef __x86_64__
#endif

#ifdef __cplusplus
typedef int (*__TR_function) (...);
#else
typedef int (*__TR_function) ();
#endif
extern __TR_function alloc_trampoline (__TR_function, void*, void*);
extern void free_trampoline (__TR_function);
extern int is_trampoline (void*);
extern __TR_function trampoline_address (void*);
extern void* trampoline_variable (void*);
extern void* trampoline_data (void*);

#endif /* _TRAMPOLINE_H */
