Some more minor changes:

* [PATCH 1/3] doc: avoid overfull \hbox issues in find.texi
  https://git.sv.gnu.org/cgit/findutils.git/commit/?id=1b3863220

* [PATCH 2/3] tests: avoid FP on Solaris 11
  https://git.sv.gnu.org/cgit/findutils.git/commit/?id=21e23d1e6

* [PATCH 3/3] maint: avoid warning for printing pid_t on Solaris 11
  https://git.sv.gnu.org/cgit/findutils.git/commit/?id=62b59ea8b

Pushed.

Have a nice day,
Berny
>From 1b3863220725e4ac1151c7b1b081f1844deb63ab Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <m...@bernhard-voelker.de>
Date: Wed, 6 Jan 2021 10:46:45 +0100
Subject: [PATCH 1/3] doc: avoid overfull \hbox issues in find.texi

"Overfull \hbox" results lines exceeding the page width, and therefore
may not even be readable.  At least they are ugly.

* doc/find.texi (node O_NOFOLLOW): Break long example lines into
the next lines.  While at it, update the version in that example to
4.8.0 (in good faith we'll have it in 2021), because we shouldn't
have a "*-git" version there.
---
 doc/find.texi | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/doc/find.texi b/doc/find.texi
index be74b167..f8bfcba0 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -5251,14 +5251,16 @@ find --version
 This will tell you the version number and which features are enabled.
 For example, if I run this on my system now, this gives:
 @example
-find (GNU findutils) 4.5.11-git
-Copyright (C) 2012 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
+find (GNU findutils) 4.8.0
+Copyright (C) 2021 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later \
+<https://gnu.org/licenses/gpl.html>.
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
 
 Written by Eric B. Decker, James Youngman, and Kevin Dalley.
-Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2)
+Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION \
+FTS(FTS_CWDFD) CBO(level=2)
 @end example
 
 Here, you can see that I am running a version of @code{find} which was
-- 
2.29.2

>From 21e23d1e60ab049e6905546cf92815dc8beb2b66 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <m...@bernhard-voelker.de>
Date: Wed, 6 Jan 2021 17:20:30 +0100
Subject: [PATCH 2/3] tests: avoid FP on Solaris 11

'ls -i' outputs leading blanks before the inode number on Solaris 11.
The 'exp' reference file should not contain them.

* tests/find/printf_inode.sh (make_canonical): Strip off leading
blanks.
---
 tests/find/printf_inode.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/find/printf_inode.sh b/tests/find/printf_inode.sh
index 79559821..53925d2b 100755
--- a/tests/find/printf_inode.sh
+++ b/tests/find/printf_inode.sh
@@ -20,7 +20,11 @@
 print_ver_ find oldfind
 
 make_canonical() {
-  sed -e 's/ /_/g'
+  sed -e '
+    # Solaris ls outputs with leading padding blanks; strip them.
+    s/^ *//g;
+    # Squeeze blanks between inode number and name to one underscore.
+    s/ /_/g'
 }
 
 # Create a file.
-- 
2.29.2

>From 62b59ea8b734e72398f388e23c35bd42e6cbc38a Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <m...@bernhard-voelker.de>
Date: Wed, 6 Jan 2021 17:35:33 +0100
Subject: [PATCH 3/3] maint: avoid warning for printing pid_t on Solaris 11

The type pid_t is defined as long on Solaris 11.  Therefore, GCC
issued a -Wformat warning there when attempting to print as %d.

* find/exec.c: (launch): When writing the debug message, treat child_pid
as the wider long type.
---
 find/exec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/find/exec.c b/find/exec.c
index 6ea9f3a1..ab63d60e 100644
--- a/find/exec.c
+++ b/find/exec.c
@@ -373,9 +373,11 @@ launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv)
   int ex = WEXITSTATUS (execp->last_child_status);
   if (options.debug_options & DebugExec)
     {
+      /* pid_t is of type long on Solaris 11.  Cast CHILD_PID for use with
+       * %ld as long as gnulib doesn't provide portable PRIdPID. */
       fprintf (stderr,
-               "DebugExec: process (PID=%d) terminated with exit status: %d\n",
-               child_pid, ex);
+               "DebugExec: process (PID=%ld) terminated with exit status: %d\n",
+               (long) child_pid, ex);
     }
 
   if (0 == ex)
-- 
2.29.2

Reply via email to