]> git.draconx.ca Git - dxcommon.git/commitdiff
gl-patches: Don't force HAVE_LONG_LONG_INT.
authorNick Bowler <nbowler@draconx.ca>
Thu, 18 Jan 2024 02:30:04 +0000 (21:30 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 18 Jan 2024 02:30:04 +0000 (21:30 -0500)
Gnulib nowadays just assumes long long works but forces these
definitions, it doesn't actually need them set so it is just
pointless at best.

m4/gl-patches.m4

index f16dd1b27e0afb9d97057a39a1e4ab95401cf29c..b30f62c9be426572142acd896bb884863eceb9f8 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright © 2023 Nick Bowler
+# Copyright © 2023-2024 Nick Bowler
 #
 # Monkey patches for gnulib macros.
 #
@@ -44,3 +44,14 @@ _DX_GL_PATCH([gl-threadlib-mingw-default],
 # gnulib and bloat downstream configure scripts for no real reason.
 _DX_GL_PATCH([gl-no-warnings],
   [m4_ifdef([gl_CC_GNULIB_WARNINGS], [AC_DEFUN([gl_CC_GNULIB_WARNINGS])])])
+
+# Avoid gnulib stdint.m4 from forcing HAVE_(UNSIGNED_)LONG_LONG_INT as this
+# breaks anything which actually tries to use AC_TYPE_LONG_LONG_INT to work
+# with missing long long, and is otherwise pointless.
+#
+# Gnulib itself doesn't care about these definitions and unconditionally uses
+# long long.  So by itself, this won't fix any failures in Gnulib due to an
+# actually missing 'long long' but also should not create new problems.
+_DX_GL_PATCH([stdint-no-fake-longlong],
+  [DX_PATCH_MACRO([gl_STDINT_H],
+    [AC_DEFINE(\[HAVE[_UNSIGNED]*_LONG_LONG_INT\][^)]*.], [dnl])])