* SUSv2 c89 compilation environment symbols missing @ 2016-12-30 22:30 Laine Gholson 2016-12-30 22:42 ` Rich Felker 0 siblings, 1 reply; 6+ messages in thread From: Laine Gholson @ 2016-12-30 22:30 UTC (permalink / raw) To: musl musl defines, e.g _SC_XBS5_ILP32_OFF32, but not _CS_XBS5_ILP32_OFF32_CFLAGS see http://pubs.opengroup.org/onlinepubs/7908799/xcu/getconf.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SUSv2 c89 compilation environment symbols missing 2016-12-30 22:30 SUSv2 c89 compilation environment symbols missing Laine Gholson @ 2016-12-30 22:42 ` Rich Felker 2016-12-30 22:44 ` Laine Gholson 0 siblings, 1 reply; 6+ messages in thread From: Rich Felker @ 2016-12-30 22:42 UTC (permalink / raw) To: musl On Fri, Dec 30, 2016 at 04:30:13PM -0600, Laine Gholson wrote: > musl defines, e.g _SC_XBS5_ILP32_OFF32, but not _CS_XBS5_ILP32_OFF32_CFLAGS > see http://pubs.opengroup.org/onlinepubs/7908799/xcu/getconf.html That's an ancient standard; the current one is here: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/getconf.html It does not mention the macros you asked about. But it's also describing the getconf utility, not the unistd.h header. The latter is here: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html and I don't see anything about the above macros. For what it's worth, even the old version corresponding to the page you linked doesn't seem to specify them: http://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html Rich ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SUSv2 c89 compilation environment symbols missing 2016-12-30 22:42 ` Rich Felker @ 2016-12-30 22:44 ` Laine Gholson 2016-12-30 22:54 ` Rich Felker 0 siblings, 1 reply; 6+ messages in thread From: Laine Gholson @ 2016-12-30 22:44 UTC (permalink / raw) To: musl yes I know SUSv2 is obsolete, but then why does musl even bother to define _SC_XBS5_ILP32_OFF32 then? On 12/30/16 16:42, Rich Felker wrote: > On Fri, Dec 30, 2016 at 04:30:13PM -0600, Laine Gholson wrote: >> musl defines, e.g _SC_XBS5_ILP32_OFF32, but not _CS_XBS5_ILP32_OFF32_CFLAGS >> see http://pubs.opengroup.org/onlinepubs/7908799/xcu/getconf.html > > That's an ancient standard; the current one is here: > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/getconf.html > > It does not mention the macros you asked about. But it's also > describing the getconf utility, not the unistd.h header. The latter is > here: > > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html > > and I don't see anything about the above macros. For what it's worth, > even the old version corresponding to the page you linked doesn't seem > to specify them: > > http://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html > > Rich > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SUSv2 c89 compilation environment symbols missing 2016-12-30 22:44 ` Laine Gholson @ 2016-12-30 22:54 ` Rich Felker 2017-01-17 23:36 ` Laine Gholson 0 siblings, 1 reply; 6+ messages in thread From: Rich Felker @ 2016-12-30 22:54 UTC (permalink / raw) To: musl On Fri, Dec 30, 2016 at 04:44:04PM -0600, Laine Gholson wrote: > yes I know SUSv2 is obsolete, but then why does musl even bother to define _SC_XBS5_ILP32_OFF32 then? I'm not sure; I suppose it could be removed. Since we match the numeric values of the macros on glibc (for limited abi compat) I probably just included all the ones glibc had. Rich > On 12/30/16 16:42, Rich Felker wrote: > >On Fri, Dec 30, 2016 at 04:30:13PM -0600, Laine Gholson wrote: > >>musl defines, e.g _SC_XBS5_ILP32_OFF32, but not _CS_XBS5_ILP32_OFF32_CFLAGS > >>see http://pubs.opengroup.org/onlinepubs/7908799/xcu/getconf.html > > > >That's an ancient standard; the current one is here: > > > >http://pubs.opengroup.org/onlinepubs/9699919799/utilities/getconf.html > > > >It does not mention the macros you asked about. But it's also > >describing the getconf utility, not the unistd.h header. The latter is > >here: > > > >http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html > > > >and I don't see anything about the above macros. For what it's worth, > >even the old version corresponding to the page you linked doesn't seem > >to specify them: > > > >http://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html > > > >Rich > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SUSv2 c89 compilation environment symbols missing 2016-12-30 22:54 ` Rich Felker @ 2017-01-17 23:36 ` Laine Gholson 2017-01-18 3:26 ` A. Wilcox 0 siblings, 1 reply; 6+ messages in thread From: Laine Gholson @ 2017-01-17 23:36 UTC (permalink / raw) To: musl then remove the macros, half-supporting something is worse than not supporting it at all or add the rest as glibc does (in bits/confname.h line 572) On 12/30/16 16:54, Rich Felker wrote: > On Fri, Dec 30, 2016 at 04:44:04PM -0600, Laine Gholson wrote: >> yes I know SUSv2 is obsolete, but then why does musl even bother to define _SC_XBS5_ILP32_OFF32 then? > > I'm not sure; I suppose it could be removed. Since we match the > numeric values of the macros on glibc (for limited abi compat) I > probably just included all the ones glibc had. > > Rich > > >> On 12/30/16 16:42, Rich Felker wrote: >>> On Fri, Dec 30, 2016 at 04:30:13PM -0600, Laine Gholson wrote: >>>> musl defines, e.g _SC_XBS5_ILP32_OFF32, but not _CS_XBS5_ILP32_OFF32_CFLAGS >>>> see http://pubs.opengroup.org/onlinepubs/7908799/xcu/getconf.html >>> >>> That's an ancient standard; the current one is here: >>> >>> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/getconf.html >>> >>> It does not mention the macros you asked about. But it's also >>> describing the getconf utility, not the unistd.h header. The latter is >>> here: >>> >>> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html >>> >>> and I don't see anything about the above macros. For what it's worth, >>> even the old version corresponding to the page you linked doesn't seem >>> to specify them: >>> >>> http://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html >>> >>> Rich >>> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SUSv2 c89 compilation environment symbols missing 2017-01-17 23:36 ` Laine Gholson @ 2017-01-18 3:26 ` A. Wilcox 0 siblings, 0 replies; 6+ messages in thread From: A. Wilcox @ 2017-01-18 3:26 UTC (permalink / raw) To: musl -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 17/01/17 17:36, Laine Gholson wrote: > then remove the macros, half-supporting something is worse than > not supporting it at all I am highly interested in what you are using that needs SUSv2 confstr macros. That isn't snark, either; I didn't know anything that would build against musl (or even a compiler that can link against musl) would specifically require C89 confstr macros and not be easily portable to at least the C99 ones. >>>> On Fri, Dec 30, 2016 at 04:30:13PM -0600, Laine Gholson >>>> wrote: >>>>> musl defines, e.g _SC_XBS5_ILP32_OFF32, but not >>>>> _CS_XBS5_ILP32_OFF32_CFLAGS see >>>>> http://pubs.opengroup.org/onlinepubs/7908799/xcu/getconf.html The >>>>> argument you are making is for confstr, not getconf, so that we are clear. getconf is a shell utility, and confstr is a C function: http://pubs.opengroup.org/onlinepubs/7908799/xsh/confstr.html Note that those macros were marked as LEGACY and only available under XSI option for the 2004 edition (Issue 6) of the POSIX standard. The 2008/2016 edition (Issue 7) of the POSIX standard removes them. Considering musl's first public code drop was 2011-02-12, I highly doubt that it targets Issue 6 as Issue 7 had already existed for three years. (Rich can correct me here if I'm wrong.) As I see it, you have two options here: - - Port the software you want to build to the new macros defined in a newer edition (ideally Issue 7) of the POSIX standard. Using preprocessor conditionals, you should even be able to retain backwards compatibility with the SUSv2 macros if you need that for any reason. - - Use a library that specifically implements SUSv2. The Open Group maintains a register of compliant implementations[1], and it looks like Solaris 9 will meet your needs on SPARC and x86 while AIX 5.1 and 5.2 will on PowerPC. [1]: http://www.opengroup.org/csq/search/t=XU2.html - -- A. Wilcox (awilfox) Project Lead, Adélie Linux http://adelielinux.org ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-18 3:26 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-12-30 22:30 SUSv2 c89 compilation environment symbols missing Laine Gholson 2016-12-30 22:42 ` Rich Felker 2016-12-30 22:44 ` Laine Gholson 2016-12-30 22:54 ` Rich Felker 2017-01-17 23:36 ` Laine Gholson 2017-01-18 3:26 ` A. Wilcox
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/musl/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).