[petsc-dev] __USE_GNU

Jed Brown jedbrown at mcs.anl.gov
Sat May 12 01:34:26 CDT 2012


$ cat a.c
#define _POSIX_C_SOURCE 200112L
#include <string.h>
#define __USE_GNU
#include <time.h>

$ gcc -c a.c
In file included from a.c:4:0:
/usr/include/time.h:226:5: error: unknown type name ‘__locale_t’


1. Shri, why is __USE_GNU being defined directly?

2. If we are defining _GNU_SOURCE, it _must_ be defined before any system
headers are included, see PETSC_DESIRE_FEATURE_TEST_MACROS (petscsys.h and
config/PETSc/Configure.py:configureFeatureTestMacros()).

3. I pushed http://petsc.cs.iit.edu/petsc/petsc-dev/rev/81ca8251e64d, but
we need a more complete solution (including #2).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120512/a60e9a81/attachment.html>


More information about the petsc-dev mailing list