glsl: Use the C99 variadic macro syntax. 89/7189/1
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 27 Jun 2013 06:41:36 +0000 (07:41 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 27 Jun 2013 06:44:11 +0000 (07:44 +0100)
MSVC does not support the old GCC syntax.

See also
http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html

src/glsl/builtin_types.cpp
src/glsl/glsl_types.h

index 93c2d38..722eda2 100644 (file)
@@ -42,8 +42,8 @@
  * convenience pointers (glsl_type::foo_type).
  * @{
  */
-#define DECL_TYPE(NAME, REST...)                                \
-   const glsl_type glsl_type::_##NAME##_type = glsl_type(REST, #NAME); \
+#define DECL_TYPE(NAME, ...)                                    \
+   const glsl_type glsl_type::_##NAME##_type = glsl_type(__VA_ARGS__, #NAME); \
    const glsl_type *const glsl_type::NAME##_type = &glsl_type::_##NAME##_type;
 
 #define STRUCT_TYPE(NAME)                                       \
index b7ddb1c..cb52080 100644 (file)
@@ -158,7 +158,7 @@ struct glsl_type {
     */
    /*@{*/
 #undef  DECL_TYPE
-#define DECL_TYPE(NAME, REST...) \
+#define DECL_TYPE(NAME, ...) \
    static const glsl_type *const NAME##_type;
 #undef  STRUCT_TYPE
 #define STRUCT_TYPE(NAME) \
@@ -534,7 +534,7 @@ private:
     */
    /*@{*/
 #undef  DECL_TYPE
-#define DECL_TYPE(NAME, REST...) static const glsl_type _##NAME##_type;
+#define DECL_TYPE(NAME, ...) static const glsl_type _##NAME##_type;
 #undef  STRUCT_TYPE
 #define STRUCT_TYPE(NAME)        static const glsl_type _struct_##NAME##_type;
 #include "builtin_type_macros.h"