[Patches] Fix compiler warning on Linux
M.-A. Lemburg
mal@lemburg.com
Tue, 30 May 2000 15:06:56 +0200
Fredrik Lundh wrote:
>
> M.-A. Lemburg wrote:> > umm. according to my copy of features.h, __USE_XOPEN is an
> > > *internal* GNU-specific thingie. any reason you cannot do this
> > > in a portable way, and use
> > >
> > > #define _XOPEN_SOURCE
> > >
> > > instead, just as the unix specifications say?
> > >
> > > (see GNU's features.h for a discussion of environment defines)
> >
> > Doesn't defining _GNU_SOURCE fix the above too ?
>
> if you have a GNU compiler, sure.
>
> but _XOPEN_SOURCE is a vendor-independent standard
> (http://www.unix-systems.org).
>
> maybe Python should set this variable on a system-wide
> level? after all, if the source code assumes X/Open API's,
> explicitly saying so cannot really hurt...
>
> /* force susv2 compatibility, where available */
> #define _XOPEN_SOURCE 500
>
Ok, didn't know that... (all reports I had about warnings
due to strptime() mentioned Linux and on that platform you usually
have a GNU compiler ;-).
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/