<div>$ cat a.c</div><div>#define _POSIX_C_SOURCE 200112L</div><div>#include <string.h></div><div>#define __USE_GNU</div><div>#include <time.h></div><div><br></div><div>$ gcc -c a.c</div><div>In file included from a.c:4:0:</div>
<div>/usr/include/time.h:226:5: error: unknown type name ‘__locale_t’</div><div><br></div><div><br></div><div>1. Shri, why is __USE_GNU being defined directly?</div><div><br></div><div>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()).</div>
<div><br></div><div>3. I pushed <a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/81ca8251e64d">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/81ca8251e64d</a>, but we need a more complete solution (including #2).</div>