summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe/p_compiler.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-05-21 08:28:53 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-05-23 09:16:55 +0100
commit9343779a8c800cf72e38b09b6f5087a0df258c08 (patch)
tree592cfe74bb614bb7e6232baee628f2fc9e4cdffb /src/gallium/include/pipe/p_compiler.h
parentd3e64caef6f8654af1a84825803e517ab8221c68 (diff)
gallium: define PIPE_CDECL calling convention, which really is cdecl everywhere
Diffstat (limited to 'src/gallium/include/pipe/p_compiler.h')
-rw-r--r--src/gallium/include/pipe/p_compiler.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index a4b772bc4f..01d1807b1c 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -103,6 +103,17 @@ typedef unsigned int uintptr_t;
#endif
+/* This should match linux gcc cdecl semantics everywhere, so that we
+ * just codegen one calling convention on all platforms.
+ */
+#ifdef WIN32
+#define PIPE_CDECL __cdecl
+#else
+#define PIPE_CDECL
+#endif
+
+
+
#if defined __GNUC__
#define ALIGN16_DECL(TYPE, NAME, SIZE) TYPE NAME##___aligned[SIZE] __attribute__(( aligned( 16 ) ))
#define ALIGN16_ASSIGN(NAME) NAME##___aligned
@@ -115,12 +126,16 @@ typedef unsigned int uintptr_t;
-/** For calling code-gen'd functions */
+/**
+ * For calling code-gen'd functions, phase out in favor of
+ * PIPE_CDECL, above, which really means cdecl on all platforms, not
+ * like the below...
+ */
#if !defined(XSTDCALL)
#if defined(WIN32)
-#define XSTDCALL __stdcall
+#define XSTDCALL __stdcall /* phase this out */
#else
-#define XSTDCALL
+#define XSTDCALL /* XXX: NOTE! not STDCALL! */
#endif
#endif