From c5fdfa9c2de62904fe22bb14cb969814746675a0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@meta.com>
Date: Fri, 17 Apr 2026 09:49:00 -0700
Subject: [PATCH 1/2] maint: avoid syntax-check doubled-word false positive

* znew.in: "if if ..." looks odd but is totally fine per POSIX.
It triggered the "make syntax-check" doubled word failure. Adding braces
makes it more readable to me and avoids the syntax-check failure.
* NEWS: fix typo: s/propery/properly/
* lib/.gitignore: Update.
* m4/.gitignore: Likewise.
---
 NEWS           |  2 +-
 lib/.gitignore |  3 +++
 m4/.gitignore  |  1 +
 znew.in        | 12 ++++++------
 4 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/NEWS b/NEWS
index ae79648..70a5abd 100644
--- a/NEWS
+++ b/NEWS
@@ -16,7 +16,7 @@ GNU gzip NEWS                                    -*- outline -*-
   [bug present since the beginning]

   When decompressing an .lzh file, the output is no longer corrupted
-  when an internal bit buffer is not propery cleared.
+  when an internal bit buffer is not properly cleared.
   [bug present since the beginning]

   On old-fashioned or limited platforms lacking mktemp, gzexe, zdiff
diff --git a/lib/.gitignore b/lib/.gitignore
index 063934d..14e9df7 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -233,3 +233,6 @@
 /xmalloc.c
 /yesno.c
 /yesno.h
+/locale.in.h
+/setlocale_null-unlocked.c
+/setlocale_null.h
diff --git a/m4/.gitignore b/m4/.gitignore
index f88e1b1..21b9015 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -151,3 +151,4 @@
 /xalloc.m4
 /yesno.m4
 /zzgnulib.m4
+/locale_h.m4
diff --git a/znew.in b/znew.in
index 40a2f5d..da08d2c 100644
--- a/znew.in
+++ b/znew.in
@@ -113,12 +113,12 @@ for i do
         command -v mktemp >/dev/null 2>&1
         mktemp_status=$?
       fi
-      if if test $mktemp_status -eq 0; then
-           tmp=`mktemp "$n.XXXXXXXXX"`
-         else
-           tmp=$n.$$
-           (umask 77; set -C; > "$tmp")
-         fi && cp -p "$n.Z" "$tmp"; then
+      if { if test $mktemp_status -eq 0; then
+             tmp=`mktemp "$n.XXXXXXXXX"`
+           else
+             tmp=$n.$$
+             (umask 77; set -C; > "$tmp")
+           fi; } && cp -p "$n.Z" "$tmp"; then
         :
       else
         printf '%s\n' "cannot backup $n.Z"
-- 
2.53.0


From 53f648764dac659ef4e39e27f4cbc6596f73de5a Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@meta.com>
Date: Fri, 17 Apr 2026 10:14:16 -0700
Subject: [PATCH 2/2] build: avoid new build failure due to missing setlocale.h

* bootstrap.conf (gnulib_modules): Add setlocale-null-unlocked.
This is not the right place to add this: the gnulib setlocale
module probably needs an added dependency. I expect to revert
this change once gnulib is fixed.
---
 bootstrap.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bootstrap.conf b/bootstrap.conf
index cdd1e78..4936b6e 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -52,6 +52,7 @@ openat-safer
 readme-release
 realloc-posix
 savedir
+setlocale-null-unlocked
 sigaction
 sigprocmask
 stat-time
-- 
2.53.0

