Re: declaration of strptime

On Wed, 09 Jan 2008 17:21:52 -0500
nathanw%MIT.EDU@localhost (Nathan J. Williams) wrote:
> >
> > 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.
>
Thanks -- that helps a lot. I'm going to report bugs upstream in the
two packages I'm having trouble with, commit fixes to pkgsrc for the
current versions, and send-pr the #include file issues.
--Steve Bellovin, http://www.cs.columbia.edu/~smb