summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-08-21 00:39:31 +0200
committerLuca Barbieri <[email protected]>2010-08-21 00:51:29 +0200
commit9960200d5eef97e38d5565cfc1775e3d8f7800a2 (patch)
treeaded3d92bff63de382c9caa9ff2ad2cbbf358961 /src/gallium
parent7f80041efae5be95ef53b8164e67027d234f9574 (diff)
p_compiler: add replacement va_copy
This might technically not always be correct, because va_copy might be a function, or a system might not have va_copy, and not work with assignment. Hopefully this is never the case. Without configure tests, it doesn't seem possible to do better.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/include/pipe/p_compiler.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 1fa3ec8300a..0a5be43f6bf 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -79,6 +79,14 @@ typedef unsigned char boolean;
#define FALSE false
#endif
+#ifndef va_copy
+#ifdef __va_copy
+#define va_copy(dest, src) __va_copy((dest), (src))
+#else
+#define va_copy(dest, src) (dest) = (src)
+#endif
+#endif
+
/* Function inlining */
#ifndef INLINE
# ifdef __cplusplus