From: Rico Tzschichholz Date: Thu, 15 Apr 2021 14:49:14 +0000 (+0200) Subject: vala: Add Profile.LIBC as synonym for POSIX and accept "libc" profile X-Git-Tag: 0.53.1~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a08b52bd817b648a5eadee2b9cb179561587329;p=thirdparty%2Fvala.git vala: Add Profile.LIBC as synonym for POSIX and accept "libc" profile --- diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index 4cc7b2967..222e82d2e 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -185,6 +185,7 @@ class Vala.Compiler { case null: case "gobject-2.0": case "gobject": profile = Profile.GOBJECT; break; + case "libc": profile = Vala.Profile.LIBC; break; case "posix": profile = Profile.POSIX; break; default: throw new OptionError.FAILED ("Invalid --profile argument '%s'", val); } diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index dc1421e6c..9fc211f7a 100644 --- a/vala/valacodecontext.vala +++ b/vala/valacodecontext.vala @@ -607,7 +607,9 @@ public class Vala.CodeContext { } break; case Profile.POSIX: + // case Profile.LIBC: this.profile = profile; + add_define ("LIBC"); add_define ("POSIX"); if (include_stdpkg) { diff --git a/vala/valaprofile.vala b/vala/valaprofile.vala index 1ef0bd516..50350a85f 100644 --- a/vala/valaprofile.vala +++ b/vala/valaprofile.vala @@ -22,5 +22,6 @@ public enum Vala.Profile { GOBJECT, - POSIX + LIBC, + POSIX = LIBC } diff --git a/valadoc/valadoc.vala b/valadoc/valadoc.vala index 68d8b8fa4..0854be157 100644 --- a/valadoc/valadoc.vala +++ b/valadoc/valadoc.vala @@ -128,6 +128,7 @@ public class ValaDoc : Object { case null: case "gobject-2.0": case "gobject": profile = Vala.Profile.GOBJECT; break; + case "libc": profile = Vala.Profile.LIBC; break; case "posix": profile = Vala.Profile.POSIX; break; default: throw new OptionError.FAILED ("Invalid --profile argument '%s'", val); }