From: Rico Tzschichholz Date: Thu, 25 Jan 2024 12:26:39 +0000 (+0100) Subject: glib-2.0,posix: Define _GNU_SOURCE for sincos*() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e1defe0bdf0b084dd2fc2b5b9b471b37d3f45b3;p=thirdparty%2Fvala.git glib-2.0,posix: Define _GNU_SOURCE for sincos*() Fixes https://gitlab.gnome.org/GNOME/vala/issues/1519 --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index ee14f186a..9b572784b 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -1701,7 +1701,9 @@ namespace GLib { public static float sinhf (float x); public static double tanh (double x); public static float tanhf (float x); + [CCode (feature_test_macro = "_GNU_SOURCE")] public static void sincos (double x, out double sinx, out double cosx); + [CCode (feature_test_macro = "_GNU_SOURCE")] public static void sincosf (float x, out float sinx, out float cosx); public static double acosh (double x); public static float acoshf (float x); diff --git a/vapi/posix.vapi b/vapi/posix.vapi index 8651cdc9a..caa0f41f8 100644 --- a/vapi/posix.vapi +++ b/vapi/posix.vapi @@ -810,9 +810,9 @@ namespace Posix { public double tanh (double x); [CCode (cheader_filename = "math.h")] public float tanhf (float x); - [CCode (cheader_filename = "math.h")] + [CCode (cheader_filename = "math.h", feature_test_macro = "_GNU_SOURCE")] public void sincos (double x, out double sinx, out double cosx); - [CCode (cheader_filename = "math.h")] + [CCode (cheader_filename = "math.h", feature_test_macro = "_GNU_SOURCE")] public void sincosf (float x, out float sinx, out float cosx); [CCode (cheader_filename = "math.h")] public double acosh (double x);