]> 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>
Tue, 18 Jan 2022 06:40:43 +0000 (07:40 +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 d7ac3f4b0b6348a10bc3692098d426fb7b2265ce..1e0b3ad9580270c72766ebb9a8f072bfdcd47b2d 100644 (file)
@@ -1083,11 +1083,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");
@@ -1111,11 +1111,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 9b9fd36906b5da15ae6f22d74f9983e800002858..77ff73c3120bcafd5b01daf4273349bbfe40c0bd 100644 (file)
@@ -1399,12 +1399,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"));
                }