<div class="gmail_quote">On Wed, Nov 9, 2011 at 15:04, Lisandro Dalcin <span dir="ltr"><<a href="mailto:dalcinl@gmail.com">dalcinl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":33w">Yes, or just include stdlib.h and define to NULL.<br></div></blockquote><div><br></div><div>NULL is in C89, but I know we have found systems where it was not defined, otherwise we would just use NULL instead of PETSC_NULL everywhere. Is this still the case, or just a historical mishap that _everyone_ has fixed?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":33w"><div class="im">
> 2) Can we at least fix it for C by using #define PETSC_NULL ((void*) 0) in C and using 0 in C++. After all nobody really uses PETSc from C++ :-)<br>
><br>
<br>
</div>actually, we could try to define PETS_NULL as "0" in 32bits and "0L"<br>
in 64bits (OS X, Linux)... For WinDog 64, this does not work, I do not<br>
remember if there is some way to specify literals for __in64 ...<br>
perhaps ((__in64)0) would do...</div></blockquote><div><br></div><div>We already test for long long, so we have access to something equivalent to uintptr_t. </div></div>