function generated inside libcaptive/ke/exports.c file named
functionname_calltype (such as functionname_fastcall etc.).
- Realying function are generated as:<dl>
+ Relaying function are generated as:<dl>
<dt>cdecl</dt><dd>No relaying function generated, just a simple #define.
You won't see this function in the gdb backtrace.
We cannot generate it by C code as we do not know the number of its arguments.
32-bit return value in EAX is always passed back although it may be vain.
Please see the documentation of "captivesym.pl" for more information.
+ Unfortutely the situation is dense during calling from the standard
+ call type forced captive/reactos to the foreign binary W32 code as this
+ code we cannot recompile in any way. All function prototypes leading
+ to the W32 binary code are declared by CAPTIVE_CDECL or CAPTIVE_STDCALL
+ macros from "captive/calltype_reactos.h". These macros have to be
+ #ifdef-ed inside reactos code as they are not available during standalong
+ reactos compilation. CAPTIVE_FASTCALL is not provided but it should not be
+ needed as the non-core kernel code inside foreign W32 binaries usually
+ does not provide any FASTCALL functions. There may be problem if some
+ internal reactos code gets compiled while being called through
+ CAPTIVE_CDECL or CAPTIVE_STDCALL declared protypes - there is currently
+ no such case known.
+
Q: Why do you call the platform "W32"?
A: http://mail.gnu.org/pipermail/libtool/2000-September/000110.html
--- /dev/null
+/* $Id$
+ * Include file for function call types definitions for reactos files for libcaptive
+ * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; exactly version 2 of June 1991 is required
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#ifndef _CAPTIVE_CALLTYPE_REACTOS_H
+#define _CAPTIVE_CALLTYPE_REACTOS_H 1
+
+
+#include <glib/gmacros.h>
+/* captive/?*_reactos.h include files have forbidden any reactos/?* inclusions
+ * as they are being included by reactos/compat.h.
+ */
+
+
+G_BEGIN_DECLS
+
+/**
+ * CAPTIVE_CDECL:
+ *
+ * Function call type declaration for the real #CDECL call type.
+ * As the default #CDECL macro gets disabled (=NOP) during reactos sources
+ * compilation (and gets undefined to cause error during non-reactos sources
+ * compilation) you have the chance to do the real #CDECL declaration
+ * by using #CAPTIVE_CDECL. You must #ifdef it by %LIBCAPTIVE symbol as it
+ * is not available during standalone reactos compilation.
+ *
+ * This macro may be needed to pass control to W32 binary code.
+ */
+#define CAPTIVE_CDECL __attribute__((__cdecl__))
+
+
+/**
+ * CAPTIVE_STDCALL:
+ *
+ * Function call type declaration for the real #STDCALL call type.
+ * As the default #STDCALL macro gets disabled (=NOP) during reactos sources
+ * compilation (and gets undefined to cause error during non-reactos sources
+ * compilation) you have the chance to do the real #STDCALL declaration
+ * by using #CAPTIVE_STDCALL. You must #ifdef it by %LIBCAPTIVE symbol as it
+ * is not available during standalone reactos compilation.
+ *
+ * This macro may be needed to pass control to W32 binary code.
+ */
+#define CAPTIVE_STDCALL __attribute__((__stdcall__))
+
+
+/**
+ * CAPTIVE_FASTCALL:
+ *
+ * You cannot do simple declaration for the real #FASTCALL call type.
+ *
+ * You should not need it as the non-core W32 binary code does not use #FASTCALL
+ * functions.
+ */
+#undef CAPTIVE_FASTCALL
+
+G_END_DECLS
+
+
+#endif /* _CAPTIVE_CALLTYPE_REACTOS_H */