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

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