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

Re: Size of int vs. long vs. void * vs. Fortran INTEGER



On 06/17/2004 08:34 PM, Goswin von Brederlow wrote:

> Normaly thats what your configure script is for.
> 
> Or just use <stdint.h> and then int32_t, int64_t, intptr_t, ....

Unfortunately Cernlib was largely written in the 1970's and 80's long
before configure scripts came about... It uses Imake.  Also, most of it is
in Fortran, and the authors apparently never considered the possibility
that sizeof(void *) might one day be bigger than sizeof(int) on some
machines; they do all kinds of horrible conversions between C pointers, C
ints, Fortran INTEGERs, REALs, etc.

Anyway, the reason I asked was that I want to know what I can change (e.g.
int -> long) to fix things on 64-bit without breaking library ABI
compatibility on 32-bit machines.  (On 64-bit, breaking library
compatibility doesn't matter so much since most of the libs just segfault
right now.)

-- 
Kevin B. McCarty <kmccarty@princeton.edu>   Physics Department
WWW: http://www.princeton.edu/~kmccarty/    Princeton University
GPG: public key ID 4F83C751                 Princeton, NJ 08544



Reply to: