Hello. When compiling gettext from master I get the following warning:

./math.h:46:2: warning: #include_next in file found relative to primary source 
file or found by absolute path; will search from start of include path 
[-Winclude-next-absolute-path]
   46 | #include_next <math.h>

I've attached a patch that seems to fix this. I based it off the following two 
commits:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=f4fccf8efdd09d5e38f49f6ae1962797ce3e8e9c
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=2a5409cf2ac62ed273589c72bb8ae0031f06a219

Let me know if I missed anything. Thanks!

Collin
From 269dfab932a01cfbbb5382b8955f06d065eea149 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Sat, 17 Feb 2024 00:19:17 -0800
Subject: [PATCH] math: Silence -Winclude-next-absolute-path warning.

See commit f4fccf8efdd09d5e38f49f6ae1962797ce3e8e9c for more
information.
* lib/math.c: Write #include <math.h> instead of #include "math.h".

Copyright-paperwork-exempt: Yes
---
 ChangeLog  | 7 +++++++
 lib/math.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 6a990dd0e8..8caa488c56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-02-17  Collin Funk  <collin.fu...@gmail.com>
+
+	math: Silence -Winclude-next-absolute-path warning.
+	See commit f4fccf8efdd09d5e38f49f6ae1962797ce3e8e9c for more
+	information.
+	* lib/math.c: Write #include <math.h> instead of #include "math.h".
+
 2024-02-15  Bruno Haible  <br...@clisp.org>
 
 	nstrftime: Optimize module dependencies.
diff --git a/lib/math.c b/lib/math.c
index 08f4103c3d..78da4d4aca 100644
--- a/lib/math.c
+++ b/lib/math.c
@@ -18,5 +18,5 @@
 #include <config.h>
 
 #define _GL_MATH_INLINE _GL_EXTERN_INLINE
-#include "math.h"
+#include <math.h>
 typedef int dummy;
-- 
2.39.2

Reply via email to