Fredrik Lundh writes: > what does "fixes warnings" mean? does it change the compiler's > behaviour, or does it just make sure stuff are defined in the right > files? There's a strptime() declaration about halfway down the file in an #if 0 section; this has to be enabled on Linux to get rid of a warning. Defining _GNU_SOURCE at the top of the file also gets rid of the warning, but defining _XOPEN_SOURCE doesn't; in that case I get more: gcc -fpic -g -O2 -I../../Modules/../Include -I.. -DHAVE_CONFIG_H -c ../../Modules/timemodule.c ../../Modules/timemodule.c: In function `inittime': ../../Modules/timemodule.c:652: structure has no member named `tm_gmtoff' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:653: structure has no member named `tm_zone' ../../Modules/timemodule.c:657: structure has no member named `tm_gmtoff' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' ../../Modules/timemodule.c:658: structure has no member named `tm_zone' make[1]: *** [timemodule.o] Error 1 make: *** [sharedmods] Error 2 > how is this different from just a plain (and truly portable) > #define _XOPEN_SOURCE? A valid concern, but most of _GNU_SOURCE is just shorthand to make sure just about every non-conflicting declaration is made, so that differences between other platforms "standard" declarations aren't as much of a problem. But I'm not advocating it for general use; the sources are already working well aside from this one warning in timemodule.c; defining _GNU_SOURCE here is sufficient as far as I can tell. -Fred -- Fred L. Drake, Jr. <fdrake at beopen.com> BeOpen PythonLabs Team Member
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4