]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Avoid symbol clashes with "va_*" from "stdarg.h"
authorAlvarito050506 <donfrutosgomez@gmail.com>
Mon, 17 Jan 2022 19:00:16 +0000 (16:00 -0300)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 16 Feb 2022 17:30:20 +0000 (18:30 +0100)
A few more symbol clashes with the va_* macros from stdarg.h, that seem to
happen only in some systems, like Alpine Linux or NetBSD.

codegen/valaccodemethodcallmodule.vala
codegen/valaccodemethodmodule.vala

index 914458611d52d68ff89ea5a8200ca03551ca3c7d..548e63b754bf3ac35c55f0e00ff418abe40bc748 100644 (file)
@@ -1093,11 +1093,11 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                ccode.add_declaration ("va_list", new CCodeVariableDeclarator ("ap"));
                ccode.add_declaration ("char*", new CCodeVariableDeclarator ("result"));
 
-               var va_start = new CCodeFunctionCall (new CCodeIdentifier ("va_start"));
-               va_start.add_argument (new CCodeIdentifier ("ap"));
-               va_start.add_argument (new CCodeIdentifier ("format"));
+               var vastart = new CCodeFunctionCall (new CCodeIdentifier ("va_start"));
+               vastart.add_argument (new CCodeIdentifier ("ap"));
+               vastart.add_argument (new CCodeIdentifier ("format"));
 
-               ccode.add_expression (va_start);
+               ccode.add_expression (vastart);
 
                if (context.profile == Profile.POSIX) {
                        cfile.add_include ("stdio.h");
@@ -1121,11 +1121,11 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
 
                ccode.add_assignment (new CCodeIdentifier ("result"), malloc);
 
-               va_start = new CCodeFunctionCall (new CCodeIdentifier ("va_start"));
-               va_start.add_argument (new CCodeIdentifier ("ap"));
-               va_start.add_argument (new CCodeIdentifier ("format"));
+               vastart = new CCodeFunctionCall (new CCodeIdentifier ("va_start"));
+               vastart.add_argument (new CCodeIdentifier ("ap"));
+               vastart.add_argument (new CCodeIdentifier ("format"));
 
-               ccode.add_expression (va_start);
+               ccode.add_expression (vastart);
 
                vsnprintf = new CCodeFunctionCall (new CCodeIdentifier ("vsnprintf"));
                vsnprintf.add_argument (new CCodeIdentifier ("result"));
index 0648f1483a3f20b6372972813b622f509f87aa6a..83bdb5f21a757f21192e0754e614f437265ef966 100644 (file)
@@ -1309,12 +1309,12 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                                vcall.add_argument (carg);
                        }
 
-                       var va_start = new CCodeFunctionCall (new CCodeIdentifier ("va_start"));
-                       va_start.add_argument (new CCodeIdentifier ("_vala_va_list_obj"));
-                       va_start.add_argument (carg);
+                       var vastart = new CCodeFunctionCall (new CCodeIdentifier ("va_start"));
+                       vastart.add_argument (new CCodeIdentifier ("_vala_va_list_obj"));
+                       vastart.add_argument (carg);
 
                        ccode.add_declaration ("va_list", new CCodeVariableDeclarator ("_vala_va_list_obj"));
-                       ccode.add_expression (va_start);
+                       ccode.add_expression (vastart);
 
                        vcall.add_argument (new CCodeIdentifier("_vala_va_list_obj"));
                }