* setitimer(2) _XOPEN_SOURCE
@ 2011-06-13 3:06 Solar Designer
0 siblings, 0 replies; only message in thread
From: Solar Designer @ 2011-06-13 3:06 UTC (permalink / raw)
To: musl
Rich,
Here's an observation:
In glibc and on Solaris, setitimer(2) is defined by default.
In musl, it is not defined by default, but is defined with "#define
_XOPEN_SOURCE" or "#define _XOPEN_SOURCE 500" (as well as with some
other settings).
However, plain #define _XOPEN_SOURCE" (without the "500") results in
setitimer() no longer being defined on Solaris. I guess Solaris
interprets plain _XOPEN_SOURCE as requesting an older version of the
standard specification than Solaris assumes by default.
Apparently, setitimer() was "First released in Issue 4, Version 2" and
"Moved from X/OPEN UNIX extension to BASE" in "Issue 5":
So maybe musl should only define setitimer() when _XOPEN_SOURCE is set
to 500 or higher, or when both _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED
are set, or when _XPG4_2 is set? You could want to check if Solaris
defines setitimer() with these (I did not).
Right now, if someone makes a program portable to musl by adding
"#define _XOPEN_SOURCE", they inadvertently break portability to Solaris
(this happened to me). If you require 500+, that won't be the case (the
person will add "#define _XOPEN_SOURCE 500" right away).
Perhaps similar issues exist for other interfaces as well.
This is JFYI.
Alexander
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-13 3:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-13 3:06 setitimer(2) _XOPEN_SOURCE Solar Designer
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).