more POSIX 2008 cleanup: strnlen(), rindex() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject more POSIX 2008 cleanup: strnlen(), rindex()
Date
Msg-id 98ce805c-6103-421b-adc3-fcf8f3dddbe3@eisentraut.org
Whole thread Raw
Responses Re: more POSIX 2008 cleanup: strnlen(), rindex()
List pgsql-hackers
It has previously been established that POSIX 2008 is the baseline for 
PostgreSQL code (modulo Windows).  Looking through the POSIX 2008 
changes, I found a few more things we can clean up with respect to that.

The first patch removes the configure checks for strnlen(), since that 
is now required, and I see that all buildfarm members support.  There 
was some discussion in the commit messages that added these checks 
(e.g., commit 8a241792f96) that suggests it was once required, but I did 
not find any information about which platforms were affected then.  But 
that's 8 years ago now, so I think it might be obsolete.

The second patch replaces the single remaining use of rindex() with the 
equivalent strrchr().  rindex() has been removed from POSIX.
Attachment

pgsql-hackers by date:

Previous
From: "Jelte Fennema-Nio"
Date:
Subject: Re: Decouple C++ support in Meson's PGXS from LLVM enablement
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: more POSIX 2008 cleanup: strnlen(), rindex()