Bug 7095 - Please support getconf -v XBS5_*LP*OFF*
Summary: Please support getconf -v XBS5_*LP*OFF*
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.6
: P3 minor
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-11 21:56 UTC by lacos
Modified: 2014-07-04 05:31 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lacos 2008-12-11 21:56:33 UTC
(1) http://sources.redhat.com/glibc/ states about glibc:

"It follows all relevant standards ([...] Unix98 [...])."

(2) The Single UNIX(R) Specification, Version 2 specifies getconf under

http://opengroup.org/onlinepubs/007908799/xcu/getconf.html

in part as follows:

"If the command:

getconf _XBS5_ILP32_OFF32

does not write "-1\n" or "undefined\n" to standard output, then commands of the
form:

getconf -v XBS5_ILP32_OFF32 ...

will determine values for configuration variables corresponding to the
XBS5_ILP32_OFF32 compilation environment specified in c89, EXTENDED DESCRIPTION."

(3) On my machine, using 2.3.6 from Debian Etch:

$ getconf _XBS5_ILP32_OFF32
1

$ getconf -v XBS5_ILP32_OFF32 XBS5_ILP32_OFF32_CFLAGS
getconf: unknown specification "XBS5_ILP32_OFF32"

$ getconf XBS5_ILP32_OFF32_CFLAGS
-m32

In other words, getconf knows how to handle the CFLAGS getconf name, but it
doesn't recognize the specification (programming environment) getconf name.

(4) I checked the "specs" array in the current version of libc/posix/getconf.c
(CVS version 1.48). It still only contains the SUSv3 (UNIX 03) specification
names. (Jakub Jelinek posted

http://sourceware.org/ml/libc-hacker/2004-11/msg00062.html

on 26 Nov 2004, and cvs annotate says Ulrich Drepper merged the patch in v1.36
the same day, and the lines I deem to be relevant weren't touched since then.)

I'd like to ask you to add the four XBS5 specification names so that glibc's
getconf can be correctly interrogated by programs aiming at SUSv2 conformance
(as SUSv2 isn't obsolete yet).

Thanks,
lacos
Comment 1 Ulrich Drepper 2009-02-07 08:19:54 UTC
I agree old environments should be supported.  It should be fixed in cvs.