On 5/16/24 12:21 AM, Grisha Levit wrote:
Since 9c430f6b changed some files to no longer include config.h, building with glibc and an -std= in CFLAGS fails because getopt, used in support/bashversion.c and mksyntax.c, is guarded by _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE
Yes. This was inspired by https://lists.gnu.org/archive/html/bug-bash/2024-04/msg00158.html There's increasing variation between C library versions, even down to standards support (musl is particularly egregious here). This smacks you in the face when cross-compiling: config.h is for the target system compilation, but the build-time tools run on the host. So we have this buildconf.h file for the subset of functionality the build tools need. I didn't figure getopt() was part of that, since it's been part of POSIX since 1992, but I guess we have to accommodate it. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature