crc.h: declare each function with _GL_ATTRIBUTE_PURE

2024-09-09 Thread Jim Meyering
gzip has the same tables/code as gnulib's crc module, so while scoping out the gzip change (to use gnulib's crc), I hit this: crc.c: In function 'crc32_update_no_xor': crc.c:77:1: error: function might be candidate for attribute 'pure' [-Werror=sugge st-attribute=pure] 77 | crc32_update_no_xor

striconv, striconveh: Drop workaround for glibc 2.1

2024-09-09 Thread Bruno Haible
glibc 2.2 was released more than 23 years ago. Workarounds for glibc 2.1 are therefore not needed any more. 2024-09-09 Bruno Haible striconv, striconveh: Drop workaround for glibc 2.1. * lib/striconv.c (str_iconv): Remove glibc-2.1 bug workaround. * lib/striconveh.c (i

striconv, striconveh, unicodeio: Drop workaround for glibc 2.1

2024-09-09 Thread Bruno Haible
And more of the same kind. Solaris 9's successor, Solaris 10, was released in 2005. Solaris 9 workarounds therefore can also be dropped. 2024-09-09 Bruno Haible striconv, striconveh, unicodeio: Drop workaround for glibc 2.1. * lib/striconv.c (mem_cd_iconv, str_iconv): Remove g

Re: striconv, striconveh, unicodeio: Drop workaround for glibc 2.1

2024-09-09 Thread Paul Eggert
On 2024-09-09 07:06, Bruno Haible wrote: And more of the same kind. Solaris 9's successor, Solaris 10, was released in 2005. Solaris 9 workarounds therefore can also be dropped. Yes, sounds good. The rule I suggest is that if a distro's supplier no longer supports it, we needn't support it eit

Re: striconv, striconveh, unicodeio: Drop workaround for glibc 2.1

2024-09-09 Thread Jeffrey Walton
On Mon, Sep 9, 2024 at 4:04 PM Paul Eggert wrote: > > On 2024-09-09 07:06, Bruno Haible wrote: > > And more of the same kind. Solaris 9's successor, Solaris 10, was released > > in 2005. Solaris 9 workarounds therefore can also be dropped. > > Yes, sounds good. The rule I suggest is that if a dist

Re: striconv, striconveh, unicodeio: Drop workaround for glibc 2.1

2024-09-09 Thread Paul Eggert
On 2024-09-09 13:38, Jeffrey Walton wrote: Apple is notorious for deprecating support quickly in an effort to drive hardware sales. Sure, but people who run macOS releases before macOS 12 (the oldest Apple still supports) are kinda on their own no matter what we do. Although Gnulib still con

string-desc: Fix undefined behaviour

2024-09-09 Thread Bruno Haible
Running some gnulib tests with clang's UBSAN, I get this error in the file test-string-desc.sh.log: string-desc-contains.c:39:13: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/include/string.h:391:33: note: nonnull attribute specified here SUMMARY

Re: string-desc: Fix undefined behaviour

2024-09-09 Thread Jeffrey Walton
On Mon, Sep 9, 2024 at 8:08 PM Bruno Haible wrote: > > Running some gnulib tests with clang's UBSAN, I get this error in the file > test-string-desc.sh.log: > > string-desc-contains.c:39:13: runtime error: null pointer passed as > argument 1, which is declared to never be null > /usr/include/

Re: string-desc: Fix undefined behaviour

2024-09-09 Thread Bruno Haible
Jeffrey Walton wrote: > >if (needle._nbytes == 0) > > return 0; > > + if (haystack._nbytes == 0) > > +return -1; > >void *found = > > memmem (haystack._data, haystack._nbytes, needle._data, > > needle._nbytes); > >if (found != NULL) > > Clang is complaining haystack._da