tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: declaration of strptime
"Steven M. Bellovin" <smb%cs.columbia.edu@localhost> writes:
> The specific problem is that these packages simply followed the Linux
> instructions to "#define _XOPEN_SOURCE"... And between the autoconf
> stuff and the pkgsrc stuff, I can't really tell what's in effect here
> -- all I'm certain of is that strptime() was not being declared
> properly until I patched the #define.
>
> Is there a standard -- from anyone -- that specifies those values?
> (Aside: several NetBSD .h files compare _XOPEN_SOURCE against 4. The
> rationale for that, given the comments in featuretest, is unclear to
> me. Should that be 400? The files I found are stdlib.h, unistd.h,
> time.h, and wordexp.h.)
4 seems wrong. I think featuretest.h is right, and the interesting
things to check are whether it's defined and then how its value
compares to 500, 520, or 600. Figuring this out authoritatively would
involve some trawling through old documents. SUSv3 is the current
torch-bearer there, and it says that the (modern) Right Thing for a
program that wants a strictly-conforming X/Open environment is to
#define _XOPEN_SOURCE to 600; this and more is discussed here:
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html
but you'd have to go digging more to be sure about the other values.
- Nathan
Home |
Main Index |
Thread Index |
Old Index