From: Alan W. I. <ir...@be...> - 2005-04-09 05:49:00
|
The recent AMD-64 fortran troubles were caused by a mismatch between the long type of PLINT (64 bits on AMD-64) and fortran integer*4 which is 32 bits on AMD-64 as well as IA-32, and from its name I believe it is always going to be 32 bits on all platforms. To make sure such mismatches do not happen on any platform, I think what we need is to define PLINT as a 32-bit integer on all platforms. Assuming you all agree with this change, should we implement 32-bit integers following what is currently done for PLUNICODE? The proposed new code would look like this. #if defined(HAVE_STDINT_H) #include <stdint.h> /* This is apparently portable if stdint.h exists. */ typedef uint32_t PLUNICODE; typedef int32_t PLINT; #else /* A reasonable back-up in case stdint.h does not exist on the platform. */ typedef unsigned int PLUNICODE; typedef int PLINT; #endif Arjen and Andrew Roach, I presume for windows that stdint.h does not exist and we would fall through to typedef int PLINT for that case. Do you see any windows issues for such a solution? Maurice, I would appreciate your discussion as well since you probably have the most cross-platform Unix and fortran experience here. Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |