[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mixing Fortran and C (on arm64, ppc64, ppc64el, mips64el and s390x)



peter green <plugwash@p10link.net>:

> From the ppc64 build log (s390x was much the same).

Thank you for taking the trouble to look at the build logs; I just saw
that it was "Installed" and naively assumed it had worked!

Perhaps then the architectures for which "INTEGER" is "long" (or
whatever) really are exactly those architectures for which a pointer
is 64-bit. If that is the case, one could use

> #if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__) || defined(__LP64__)

as you suggest, or just

#if defined(__LP64__)

or:

#include <stdint.h>
#if UINTPTR_MAX == UINT64_MAX

I think that last approach is required to work by the standards, while
__LP64__ is a GCC extension, though I might be wrong.


Reply to: