[PATCH] dfa: pacify Oracle Solaris Studio 12.6

2023-03-18 Thread Paul Eggert
Without this patch, the compiler complains “statement not reached”.
* lib/dfa.c (lex): Refactor to omit unreachable statement.
---
 ChangeLog |  4 
 lib/dfa.c | 12 ++--
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 00f18855bd..7d7f85a54b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2023-03-18  Paul Eggert  
 
+   dfa: pacify Oracle Solaris Studio 12.6
+   Without this patch, the compiler complains “statement not reached”.
+   * lib/dfa.c (lex): Refactor to omit unreachable statement.
+
Update MODULES.html.sh
* MODULES.html.sh: Add some recently-added modules.
This is by no means a complete update.  I needed to point
diff --git a/lib/dfa.c b/lib/dfa.c
index 20502a802f..d54aab40fd 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -1202,8 +1202,13 @@ lex (struct dfa *dfa)
  On the plus side, this avoids having a duplicate of the
  main switch inside the backslash case.  On the minus side,
  it means that just about every case tests the backslash flag.  */
-  for (int i = 0; i < 2; ++i)
+  for (int i = 0; ; i++)
 {
+  /* This loop should consume at most a backslash and some other
+ character.  */
+  if (2 <= i)
+abort ();
+
   if (! dfa->lex.left)
 return dfa->lex.lasttok = END;
   int c = fetch_wc (dfa);
@@ -1591,11 +1596,6 @@ lex (struct dfa *dfa)
   return dfa->lex.lasttok = c;
 }
 }
-
-  /* The above loop should consume at most a backslash
- and some other character.  */
-  abort ();
-  return END;   /* keeps pedantic compilers happy.  */
 }
 
 static void
-- 
2.37.2




[PATCH] Update MODULES.html.sh

2023-03-18 Thread Paul Eggert
* MODULES.html.sh: Add some recently-added modules.
This is by no means a complete update.  I needed to point
to something about ‘time’ so I added ‘time’, and then added
more modules until I ran out of, errr, time.
Assuming MODULES.html.sh is still useful,
at some point a more-complete update should be done.
---
 ChangeLog   | 10 ++
 MODULES.html.sh | 86 +
 2 files changed, 96 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 173cd45bff..00f18855bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2023-03-18  Paul Eggert  
+
+   Update MODULES.html.sh
+   * MODULES.html.sh: Add some recently-added modules.
+   This is by no means a complete update.  I needed to point
+   to something about ‘time’ so I added ‘time’, and then added
+   more modules until I ran out of, errr, time.
+   Assuming MODULES.html.sh is still useful,
+   at some point a more-complete update should be done.
+
 2023-03-17  Bruno Haible  
 
*printf-posix: ISO C 23: Add %b directive for binary output of integers.
diff --git a/MODULES.html.sh b/MODULES.html.sh
index 937e9c02d8..6c8bf965c6 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -1701,6 +1701,7 @@ func_all_modules ()
   func_module eealloc
   func_module free-posix
   func_module malloc-gnu
+  func_module memalign
   func_module realloc-gnu
   func_module reallocarray
   func_module pagealign_alloc
@@ -1728,6 +1729,8 @@ func_all_modules ()
   func_module fprintftime
   func_module nstrftime
   func_module strftime-fixes
+  func_module time
+  func_module time-h
   func_module time_rz
   func_module year2038
   func_end_table
@@ -1744,9 +1747,18 @@ func_all_modules ()
   func_echo "$element"
 
   func_begin_table
+  func_module aligned-malloc
+  func_module ialloc
+  func_module idx
+  func_module immutable
+  func_module malloc-h
+  func_module ssfmalloc
+  func_module stack
   func_module xsize
   func_module xalloc
   func_module xalloc-die
+  func_module alignalloc
+  func_module xalignalloc
   func_module alloca
   func_module alloca-opt
   func_module malloca
@@ -1824,7 +1836,9 @@ func_all_modules ()
   func_module strcasestr-simple
   func_module strchrnul
   func_module streq
+  func_module strerrorname_np
   func_module strerror_r-posix
+  func_module string-buffer
   func_module strnlen
   func_module strnlen1
   func_module strndup
@@ -1836,6 +1850,7 @@ func_all_modules ()
   func_module trim
   func_module fstrcmp
   func_module xstrndup
+  func_module wmempcpy
   func_end_table
 
   element="Mathematics "
@@ -1873,6 +1888,7 @@ func_all_modules ()
   func_begin_table
   func_module mktime-internal
   func_module parse-datetime
+  func_module parse-datetime2
   func_module timegm
   func_module tzset
   func_end_table
@@ -1885,6 +1901,7 @@ func_all_modules ()
 
   func_begin_table
   func_module unlocked-io
+  func_module unlocked-io-internal
   func_module fwriteerror
   func_module vasnprintf
   func_module vasprintf
@@ -1901,6 +1918,8 @@ func_all_modules ()
   func_begin_table
   func_module fatal-signal
   func_module raise
+  func_module sigabbrev_np
+  func_module sigdescr_np
   func_module strsignal
   func_end_table
 
@@ -1957,13 +1976,20 @@ func_all_modules ()
   func_module crypto/hmac-md5
   func_module crypto/hmac-sha1
   func_module crypto/md2
+  func_module crypto/md2-buffer
   func_module crypto/md4
+  func_module crypto/md4-buffer
   func_module crypto/md5
+  func_module crypto/md5-buffer
   func_module crypto/rijndael
   func_module crypto/sha1
+  func_module crypto/sha1-buffer
   func_module crypto/sha256
+  func_module crypto/sha256-buffer
   func_module crypto/sha512
+  func_module crypto/sha512-buffer
   func_module crypto/sm3
+  func_module crypto/sm3-buffer
   func_end_table
 
   element="Cryptographic computations (high-level)"
@@ -2384,16 +2410,38 @@ func_all_modules ()
 
   func_begin_table
   func_module alignasof
+  func_module nullptr
   func_module stdckdint
   func_end_table
 
+  element="Memory management functions "
+  element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
+  func_section_wrap ansic_ext_stdlib_memory
+  func_wrap H3
+  func_echo "$element"
+
+  func_begin_table
+  func_module aligned_alloc
+  func_end_table
+
   element="String handling "
   element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
   func_section_wrap c23_ext_string
   func_wrap H3
   func_echo "$element"
 
+  func_begin_table
   func_module memset_explicit
+  func_end_table
+
+  element="Date and time "
+  element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"`
+  func_section_wrap c23_ext_string
+  func_wrap H3
+  func_echo "$element"
+
+  func_module timespec_get
+  func_module timespec_getres
 
   element="Support for GNU multiple precision arithmetic"
   func_section_wrap gmp
@@ -2436,7 +2484,10 @@ func_all_modules ()
   func_module arpa_inet
   func_module bind
   func_module calloc-posix
+  func_module chmod
+  fu

coreutils-9.1.198-e68b1.tar.xz on Linux/sparc64

2023-03-18 Thread Sam James

The test-pthread-cond test fails for me.

gnulib-tests/test-pthread-cond.log doesn't have much detail:
```
Starting test_pthread_cond_wait ... OK
Starting test_pthread_cond_timedwait ...FAIL test-pthread-cond (exit
status: 134)
```

Access to the machine is available if needed.

best,
sam


signature.asc
Description: PGP signature


Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers

2023-03-18 Thread Eric Blake
On Sat, Mar 18, 2023 at 11:50:47AM +, Pádraig Brady wrote:
> On 17/03/2023 21:51, Bruno Haible wrote:
> > This set of patches adds support for the %b format string directive, 
> > required
> > by ISO C 23, to the *printf family of functions.
> > 
> > So far, only glibc implements it (since version 2.35). For portability to 
> > the
> > other platforms, use the *printf-posix modules.
> 
> For my reference mainly...
> 
> It's interesting that this conflicts with the POSIX specified %b directive
> for the printf(1) utility.

Another consideration: C23 admits that %#B is not available for
portable use of outputting uppercase '0B...', you would have to
manually write 0B%b instead.  However, since glibc DOES support %B as
the uppercase counterpart to %b, should we add that in gnulib (but
this time under the auspices of *printf-gnu, rather than
*printf-posix)?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers

2023-03-18 Thread Pádraig Brady

On 17/03/2023 21:51, Bruno Haible wrote:

This set of patches adds support for the %b format string directive, required
by ISO C 23, to the *printf family of functions.

So far, only glibc implements it (since version 2.35). For portability to the
other platforms, use the *printf-posix modules.


For my reference mainly...

It's interesting that this conflicts with the POSIX specified %b directive
for the printf(1) utility.

cheers,
Pádraig