Blame SOURCES/0001-patch-8.2.3406-on-some-systems-tests-fail-without-_R.patch

44ca1a
From 3ae5fc9a6a881e0be381e4cc70080ac5908d7520 Mon Sep 17 00:00:00 2001
44ca1a
From: Bram Moolenaar <Bram@vim.org>
44ca1a
Date: Mon, 6 Sep 2021 18:57:30 +0200
44ca1a
Subject: [PATCH] patch 8.2.3406: on some systems tests fail without _REENTRANT
44ca1a
44ca1a
Problem:    On some systems tests fail without _REENTRANT. (Elimar
44ca1a
            Riesebieter)
44ca1a
Solution:   Add -D_REENTRANT in configure. (closes #7402)
44ca1a
---
44ca1a
 src/auto/configure | 4 ++++
44ca1a
 src/configure.ac   | 6 ++++++
44ca1a
 src/version.c      | 2 ++
44ca1a
 3 files changed, 12 insertions(+)
44ca1a
44ca1a
diff --git a/src/auto/configure b/src/auto/configure
44ca1a
index fba6a19b5..4f4363224 100755
44ca1a
--- a/src/auto/configure
44ca1a
+++ b/src/auto/configure
44ca1a
@@ -14960,6 +14960,10 @@ $as_echo "no" >&6; }
44ca1a
   fi
44ca1a
 fi
44ca1a
 
44ca1a
+if `echo "$CFLAGS" | grep -v D_XEENTRANT >/dev/null`; then
44ca1a
+  CFLAGS="$CFLAGS -D_REENTRANT"
44ca1a
+fi
44ca1a
+
44ca1a
 DEPEND_CFLAGS_FILTER=
44ca1a
 if test "$GCC" = yes; then
44ca1a
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
44ca1a
diff --git a/src/configure.ac b/src/configure.ac
44ca1a
index 5ec955757..4cd6dea1f 100644
44ca1a
--- a/src/configure.ac
44ca1a
+++ b/src/configure.ac
44ca1a
@@ -4504,6 +4504,12 @@ if test "$MACOS_X" = "yes"; then
44ca1a
   fi
44ca1a
 fi
44ca1a
 
44ca1a
+dnl On some systems REENTRANT needs to be defined.  It should not hurt to use
44ca1a
+dnl it everywhere.
44ca1a
+if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
44ca1a
+  CFLAGS="$CFLAGS -D_REENTRANT"
44ca1a
+fi
44ca1a
+
44ca1a
 dnl gcc 3.1 changed the meaning of -MM.  The only solution appears to be to
44ca1a
 dnl use "-isystem" instead of "-I" for all non-Vim include dirs.
44ca1a
 dnl But only when making dependencies, cproto and lint don't take "-isystem".
44ca1a
-- 
44ca1a
2.31.1
44ca1a