<div class="gmail_quote">On Sun, Apr 24, 2011 at 03:46, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
 Looks like we need a patch to deal with the "illegal" placement of XOPEN_SOURCE and BSD_SOURCE in the source code so this issue doesn't keep coming up.</blockquote></div><br><div>What exactly is the error? Note that we already changed _XOPEN_SOURCE to _POSIX_C_SOURCE (in dev) because Open Solaris did not like the former. One possible fix could be the ugly</div>
<div><br></div><div>#ifndef _BSD_SOURCE</div><div>#  define _BSD_SOURCE</div><div>#endif</div><div><br></div><div><br></div><div>I really do not want to put feature test macros in public headers (our usual model with finding which header declares certain functions) because they change which symbols are available in headers and introduce order dependence. That is, a user writing</div>
<div><br></div><div>#include <stdlib.h></div><div>#include <petsc.h></div><div><br></div><div>would not bring in atoll(), but including petsc.h first would have it (and lots of other symbols). I don't think a library should ever change the language "dialect" that a user writes their code in.</div>
<div><br></div><div><br></div><div>I don't really understand why Solaris is having a problem with our defining feature test macros. As far as I know, we are using them as recommended. Searching for solaris feature test macros brings up results like the following man page that explains how to set them.</div>
<div><br></div><div><a href="http://www.cims.nyu.edu/cgi-systems/man.cgi?section=5&topic=standards">http://www.cims.nyu.edu/cgi-systems/man.cgi?section=5&topic=standards</a></div>