[petsc-dev] Problem with PETSC_NULL and variadic functions

Satish Balay balay at mcs.anl.gov
Wed Nov 9 15:17:42 CST 2011


On Wed, 9 Nov 2011, Jed Brown wrote:

> On Wed, Nov 9, 2011 at 15:04, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> > actually, we could try to define PETS_NULL as "0" in 32bits and "0L"
> > in 64bits (OS X, Linux)... For WinDog 64, this does not work, I do not
> > remember if there is some way to specify literals for __in64 ...
> > perhaps ((__in64)0) would do...
> 
> We already test for long long, so we have access to something equivalent to
> uintptr_t.

We have the folowing code usage for 64bit ints - that works on windows...

#if defined(PETSC_HAVE___INT64)
typedef __int64 Petsc64bitInt;
#else
typedef long long Petsc64bitInt;
#endif

Satish



More information about the petsc-dev mailing list