Mesa (master): p_compiler: add replacement va_copy
Luca Barbieri
lb at kemper.freedesktop.org
Fri Aug 20 22:51:38 UTC 2010
Module: Mesa
Branch: master
Commit: 9960200d5eef97e38d5565cfc1775e3d8f7800a2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9960200d5eef97e38d5565cfc1775e3d8f7800a2
Author: Luca Barbieri <luca at luca-barbieri.com>
Date: Sat Aug 21 00:39:31 2010 +0200
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.
---
src/gallium/include/pipe/p_compiler.h | 8 ++++++++
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 1fa3ec8..0a5be43 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
More information about the mesa-commit
mailing list