GNULib Bug: `sys_wait` module have no "WEXITED".

2024-07-16 Thread anlex N
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html

I am using the sys_wait module in MinGW.


Re: GNULib Bug: `sys_wait` module have no "WEXITED".

2024-07-16 Thread Bruno Haible
anlex N wrote:
> https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html
> 
> I am using the sys_wait module in MinGW.

There's no point for Gnulib's  replacement to define
WEXITED, WNOWAIT, WSTOPPED, since these are only intended as options
to waitid() [1], as long as Gnulib does not provide a replacement for
waitid() [2]. And a replacement for waitid() is not needed, since
programs prefer waitpid() over waitid().

Bruno

[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html
[2] https://www.gnu.org/software/gnulib/manual/html_node/waitid.html






Re: announce-gen: Fix copyright year in --version output.

2024-07-16 Thread Simon Josefsson via Gnulib discussion list
Collin Funk  writes:

> Hi Simon,
>
> Simon Josefsson  writes:
>
>> That's better, but doesn't all this just hides the problem that 'make
>> update-copyright' doesn't bump the copyright for these two files?  I
>> think the policy is to bump copyright year to 2025 as soon as possible
>> after 2025-01-01 even if there are no other changes (which would bump
>> $VERSION) since we publish the file via git.  If we use your patch here,
>> that wouldn't happen until some change is made that bumps $VERSION,
>> which seems wrong.
>>
>> I think this patch should be reverted, and gnulib's 'make
>> update-copyright' should be teached to update this file too.  What do
>> you think?  Do you want to propose a patch to it?
>
> Maybe, I am misreading but I think using $VERSION makes more sense
> according to the GNU Coding Standards [1]:
>
> This copyright notice only needs to mention the most recent year in
> which changes were made—there’s no need to list the years for previous
> versions’ changes.

Thanks for digging up the reference.  I wonder if something changed
here.  Can someone remind me why we do the 'make update-copyright'
dance?  I recall 'make syntax-check' failing when this is not done, so
maybe those self tests shouldn't be failing.

> The useless-if-before-free script I updated recently to account for
> nullptr in C23. And I know that announce-gen has been updated since
> 2022. Does updating the copyright header count as a change?

I think so, but then again, if the policy doesn't recommend bumping
these changes yearly, maybe we should stop doing it.

> If your method is preferred then maybe I can add a second pass to
> update-copyright to check for variables named COPYRIGHT_YEAR:
>
> # Perl
> my $COPYRIGHT_YEAR = '2024';
> our $COPYRIGHT_YEAR = '2024';
> # Shell
> COPYRIGHT_YEAR='2024'
>
> Thoughts?

Yes, I think some special cases are handled already.

> P.S. Also does pushing to git update the $VERSION variable for you? I
> thought that was done through saving the file in Emacs. Or manually for
> non-Emacs users.

I don't think we have any push magic for gnulib at all.  So this is
emacs magic.

/Simon


signature.asc
Description: PGP signature


Re: announce-gen: Fix copyright year in --version output.

2024-07-16 Thread Bruno Haible
Simon Josefsson wrote:
> > Maybe, I am misreading but I think using $VERSION makes more sense
> > according to the GNU Coding Standards [1]:
> >
> > This copyright notice only needs to mention the most recent year in
> > which changes were made—there’s no need to list the years for previous
> > versions’ changes.
> 
> Thanks for digging up the reference.  I wonder if something changed
> here.  Can someone remind me why we do the 'make update-copyright'
> dance?

The GNU Maintainers Guide and the GNU Coding Standards have different sections
  - about the copyright notice in source files
https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
  - about the --version output of programs
https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html

Neither is a superset of the other one.

update-copyright deals with the *copyright notices* only, not with the
--version output.

We run 'make update-copyright' every year, because updating the copyright
notices lazily is
  - more tedious,
  - more error-prone
than doing it at once.

Bruno






useless-if-before-free: Add bug reporting address to --help.

2024-07-16 Thread Collin Funk
Bruno said a while ago that the following programs are missing bug
report emails in --help output [1]:

> announce-gen --help
> gitlog-to-changelog --help
> mktempd --help
> update-copyright --help
> useless-if-before-free --help
> vcs-to-changelog.py --help

The attached 3 patches improve the --help and --version output of some
programs that already have them implemented.

The following programs still need to be written:

mktempd --help
update-copyright --help
vcs-to-changelog.py --help

I'll get around to them eventually if no one else does. :)

Collin

[1] https://lists.gnu.org/archive/html/bug-gnulib/2024-06/msg00141.html

>From d149dd240d9b50b0c85ac8b2a97af82e3c98464e Mon Sep 17 00:00:00 2001
From: Collin Funk 
Date: Tue, 16 Jul 2024 19:15:10 -0700
Subject: [PATCH 1/3] useless-if-before-free: Add bug reporting address to
 --help.

* build-aux/useless-if-before-free (usage): Add bug reporting address.
---
 ChangeLog| 5 +
 build-aux/useless-if-before-free | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 08322a3aca..7bcb133557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-07-16  Collin Funk  
+
+	useless-if-before-free: Add bug reporting address to --help.
+	* build-aux/useless-if-before-free (usage): Add bug reporting address.
+
 2024-07-15  Paul Eggert  
 
 	strnlen: port to Android 5.0 (API 21)
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index 39ce39ab31..a90ced5d2d 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -36,7 +36,7 @@
 eval 'exec perl -wSx "$0" "$@"'
  if 0;
 
-my $VERSION = '2024-07-14 03:13'; # UTC
+my $VERSION = '2024-07-17 02:10'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -98,6 +98,7 @@ and "kfree" calls in the linux kernel sources:
 
 git ls-files -z |xargs -0 $ME --name=kfree
 
+Send patches and bug reports to .
 EOF
 }
   exit $exit_code;
-- 
2.45.2

>From 92908fcbc65f83951176591412edd8b4cc7a2eea Mon Sep 17 00:00:00 2001
From: Collin Funk 
Date: Tue, 16 Jul 2024 19:18:22 -0700
Subject: [PATCH 2/3] announce-gen: Add bug reporting address to --help.

* build-aux/announce-gen (usage): Add bug reporting address.
---
 ChangeLog  | 3 +++
 build-aux/announce-gen | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 7bcb133557..10d712f5d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2024-07-16  Collin Funk  
 
+	announce-gen: Add bug reporting address to --help.
+	* build-aux/announce-gen (usage): Add bug reporting address.
+
 	useless-if-before-free: Add bug reporting address to --help.
 	* build-aux/useless-if-before-free (usage): Add bug reporting address.
 
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index a412853429..4b7ba07165 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -35,7 +35,7 @@
 eval 'exec perl -wSx "$0" "$@"'
  if 0;
 
-my $VERSION = '2024-07-14 03:11'; # UTC
+my $VERSION = '2024-07-17 02:16'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -102,6 +102,7 @@ The following are optional:
--help display this help and exit
--version  output version information and exit
 
+Send patches and bug reports to .
 EOF
 }
   exit $exit_code;
-- 
2.45.2

>From b78892521c1aa822f109e2f7db3e8e352d10590a Mon Sep 17 00:00:00 2001
From: Collin Funk 
Date: Tue, 16 Jul 2024 19:21:51 -0700
Subject: [PATCH 3/3] gitlog-to-changelog: Improve --version and --help output.

* build-aux/gitlog-to-changelog (usage): Add bug reporting address.
(print_version): New function.
---
 ChangeLog |  4 
 build-aux/gitlog-to-changelog | 19 +--
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 10d712f5d2..2b9db07b47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2024-07-16  Collin Funk  
 
+	gitlog-to-changelog: Improve --version and --help output.
+	* build-aux/gitlog-to-changelog (usage): Add bug reporting address.
+	(print_version): New function.
+
 	announce-gen: Add bug reporting address to --help.
 	* build-aux/announce-gen (usage): Add bug reporting address.
 
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index a2c348e2cf..90a53ef71e 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -35,12 +35,14 @@
 eval 'exec perl -wSx "$0" "$@"'
  if 0;
 
-my $VERSION = '2024-07-04 10:56'; # UTC
+my $VERSION = '2024-07-17 02:20'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp wri