pkgsrc-Users 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:

> I don't know when the conditions are going to be true; clearly, they
> were not for my packages.

> First -- what should be done in the base system about the declaration
> of strptime?  Should it always be declared?  If not, should the man
> page be fixed?  (I should probably send-pr this point.)

A detail I think you might be missing is that _NETBSD_SOURCE is
defined by default, in <sys/featuretest.h>, which <time.h> pulls in
(the comments in that file may be helpful to understanding the
situation). So a program compiled with no special definitions or flags
*does* see the definition of strptime(), which agrees with the man
page. The circumstance in which _NETBSD_SOURCE isn't defined is when
some other feature-environment symbol, like _POSIX_C_SOURCE, is
defined.

> Second -- what should be in the packages (www/liferea and
> mail/claws-mail-rssyl) to cope with this?

Probably (a) not defining whatever feature macro it's currently
defining, out of a misguided sense of cleanliness, or (b) selectively
adding _XOPEN_SOURCE to the set of feature macros it defines, to get a
XOPEN function.

        - Nathan



Home | Main Index | Thread Index | Old Index