diff --git a/.cvsignore b/.cvsignore index 9a20707..2413487 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -4.2r1-hrepack-p4.tar.gz +HDF4.2r3.tar.gz diff --git a/hdf-4.2r2-libm.patch b/hdf-4.2r2-libm.patch new file mode 100644 index 0000000..7eeae5d --- /dev/null +++ b/hdf-4.2r2-libm.patch @@ -0,0 +1,22 @@ +--- HDF4.2r2/mfhdf/hdiff/Makefile.in.libm 2008-02-05 14:36:29.000000000 -0700 ++++ HDF4.2r2/mfhdf/hdiff/Makefile.in 2008-02-05 14:36:52.000000000 -0700 +@@ -196,7 +196,7 @@ + hdiff_mattbl.c hdiff_gattr.c hdiff_misc.c hdiff_sds.c \ + hdiff_table.c hdiff_vs.c hdiff_dim.c + +-hdiff_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@ ++hdiff_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a -lm + hdiff_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a + + ############################################################################# +--- HDF4.2r2/mfhdf/hrepack/Makefile.in.libm 2007-09-18 09:12:00.000000000 -0600 ++++ HDF4.2r2/mfhdf/hrepack/Makefile.in 2008-02-05 14:58:41.000000000 -0700 +@@ -232,7 +232,7 @@ + ../hdiff/hdiff_sds.c ../hdiff/hdiff_table.c \ + ../hdiff/hdiff_vs.c ../hdiff/hdiff_dim.c + +-test_hrepack_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a ++test_hrepack_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a -lm + test_hrepack_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a + hrepack_check_SOURCES = hrepack_check.c + hrepack_check_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a diff --git a/hdf-4.2r2-s390.patch b/hdf-4.2r2-s390.patch new file mode 100644 index 0000000..6e67a89 --- /dev/null +++ b/hdf-4.2r2-s390.patch @@ -0,0 +1,339 @@ +--- HDF4.2r2/hdf/src/hdfi.h.orig 2008-02-04 17:27:04.000000000 +0100 ++++ HDF4.2r2/hdf/src/hdfi.h 2008-02-04 17:29:54.000000000 +0100 +@@ -78,6 +78,7 @@ + #define DFMT_POWERPC64 0x1111 + #define DFMT_LINUXPPC 0x1111 + #define DFMT_LINUXSPARC 0x1111 ++#define DFMT_LINUX390 0x1111 + + /* I/O library constants */ + #define UNIXUNBUFIO 1 +@@ -1505,6 +1506,66 @@ + + #endif /* Linux Sparc32/64 */ + ++/* Linux s390/s390x */ ++#if defined __s390__ || defined __s390x__ ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE ++ ++#include /* for unbuffered i/o stuff */ ++#include ++#define DF_MT DFMT_LINUX390 ++typedef void VOID; ++typedef void *VOIDP; ++typedef char *_fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++#ifdef __s390x__ /* 64-bit environment */ ++typedef int int32; ++typedef unsigned int uint32; ++#else /* 32-bit environment */ ++typedef long int int32; ++typedef unsigned long int uint32; ++#endif ++typedef int intn; ++typedef unsigned int uintn; ++typedef int intf; /* size of INTEGERs in Fortran compiler */ ++typedef float float32; ++typedef double float64; ++#ifdef __s390x__ /* 64-bit environment */ ++typedef long hdf_pint_t; /* an integer the same size as a pointer */ ++#else /* 32-bit environment */ ++typedef int hdf_pint_t; /* an integer the same size as a pointer */ ++#endif ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++#ifdef HAVE_FMPOOL ++#define FILELIB PAGEBUFIO /* enable page buffering */ ++#else ++#define FILELIB UNIXBUFIO ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++ ++#ifdef __GNUC__ ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++#endif ++ ++#endif /* Linux s390/s390x */ ++ + /*#ifndef GOT_MACHINE + No machine type has been defined. Your Makefile needs to have someing like + -DSUN or -DUNICOS in order for the HDF internal structures to be defined +--- HDF4.2r2/mfhdf/libsrc/netcdf.h.in.orig 2008-02-04 18:38:14.000000000 +0100 ++++ HDF4.2r2/mfhdf/libsrc/netcdf.h.in 2008-02-04 18:39:00.000000000 +0100 +@@ -295,7 +295,7 @@ + */ + #if defined _CRAYMPP + typedef short nclong; +-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64 || defined __powerpc64__ ++#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64 || defined __powerpc64__ || defined __s390x__ + typedef int nclong; + #else + typedef long nclong; /* default, compatible type */ +--- HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h.orig 2008-02-04 18:40:01.000000000 +0100 ++++ HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h 2008-02-04 18:40:29.000000000 +0100 +@@ -304,7 +304,7 @@ + */ + #if defined _CRAYMPP + typedef short nclong; +-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__ ++#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + typedef int nclong; + #else + typedef long nclong; /* default, compatible type */ +--- HDF4.2r2/mfhdf/fortran/config/jackets-linux.c.orig 2008-02-04 18:42:44.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-linux.c 2008-02-04 18:44:19.000000000 +0100 +@@ -34,7 +34,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + int ll; + #else + long ll; +@@ -65,7 +65,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + int ll; + #else + long ll; +@@ -430,7 +430,7 @@ + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -916,7 +916,7 @@ + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs = *(int *)value; +@@ -1030,7 +1030,7 @@ + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, ncount, ndims); +@@ -1141,7 +1141,7 @@ + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1198,7 +1198,7 @@ + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itolg (value, ncount, nbasis, ndims); +@@ -1334,7 +1334,7 @@ + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs; +@@ -1476,7 +1476,7 @@ + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1614,7 +1614,7 @@ + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1685,7 +1685,7 @@ + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1851,7 +1851,7 @@ + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + #ifdef HDF + if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, attlen, 1); +@@ -2016,7 +2016,7 @@ + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + /* EIP We need to use int buffer to read data in on the platforms where long is 8 bytes +--- HDF4.2r2/mfhdf/ncgen/ncgen.l.orig 2008-02-04 18:45:37.000000000 +0100 ++++ HDF4.2r2/mfhdf/ncgen/ncgen.l 2008-02-04 18:45:53.000000000 +0100 +@@ -134,7 +134,7 @@ + yyerror(errstr); + } + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + if (dd < INT_MIN || dd > INT_MAX) + #else + #if defined (_CRAYMPP) +--- HDF4.2r2/mfhdf/libsrc/putget.c.orig 2008-02-04 18:53:56.000000000 +0100 ++++ HDF4.2r2/mfhdf/libsrc/putget.c 2008-02-04 18:53:13.000000000 +0100 +@@ -594,7 +594,7 @@ + case NC_LONG : + #if defined _CRAYMPP + return( xdr_short(xdrs, (nclong *)values) ) ; +-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + return( xdr_int(xdrs, (nclong *)values) ) ; + #else + return( xdr_long(xdrs, (nclong *)values) ) ; +@@ -1896,7 +1896,7 @@ + case NC_LONG : + #if defined _CRAYMPP + xdr_NC_fnct = xdr_short; +-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + xdr_NC_fnct = xdr_int ; + #else + xdr_NC_fnct = xdr_long ; +--- HDF4.2r2/mfhdf/libsrc/array.c.orig 2008-02-04 18:54:30.000000000 +0100 ++++ HDF4.2r2/mfhdf/libsrc/array.c 2008-02-04 18:54:39.000000000 +0100 +@@ -622,7 +622,7 @@ + case NC_LONG : + #if defined _CRAYMPP + xdr_NC_fnct = xdr_short; +-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + xdr_NC_fnct = xdr_int ; + #else + xdr_NC_fnct = xdr_long ; +--- HDF4.2r2/mfhdf/libsrc/cdf.c.orig 2008-02-04 18:55:23.000000000 +0100 ++++ HDF4.2r2/mfhdf/libsrc/cdf.c 2008-02-04 18:55:38.000000000 +0100 +@@ -3664,7 +3664,7 @@ + alen /= 4 ; + #if defined _CRAYMPP + xdr_NC_fnct = xdr_short; +-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + xdr_NC_fnct = xdr_int ; + #else + xdr_NC_fnct = xdr_long ; +--- HDF4.2r2/mfhdf/libsrc/xdrposix.c.orig 2008-02-04 18:56:24.000000000 +0100 ++++ HDF4.2r2/mfhdf/libsrc/xdrposix.c 2008-02-04 18:58:43.000000000 +0100 +@@ -284,7 +284,7 @@ + + static bool_t xdrposix_getlong(); + static bool_t xdrposix_putlong(); +-#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + static bool_t xdrposix_getint(); + static bool_t xdrposix_putint(); + #endif +@@ -301,7 +301,7 @@ + #if (defined __sun && defined _LP64) + static rpc_inline_t * xdrposix_inline(); + #else +-#if ((defined __x86_64__ ) && !(defined __sun && defined _LP64)) || defined __powerpc64__ ++#if ((defined __x86_64__ ) && !(defined __sun && defined _LP64)) || defined __powerpc64__ || defined __s390x__ + static int32_t * xdrposix_inline(); + #else + #if (defined __alpha ) +@@ -332,9 +332,9 @@ + xdrposix_getpos, /* get offset in the stream */ + xdrposix_setpos, /* set offset in the stream */ + xdrposix_inline, /* prime stream for inline macros */ +-#if (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__ ++#if (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + xdrposix_destroy, /* destroy stream */ +-#if !(defined __x86_64__) && !(defined __powerpc64__) || (defined __sun && defined _LP64) /* i.e. we are on SUN/Intel in 64-bit mode */ ++#if !(defined __s390x__) && !(defined __x86_64__) && !(defined __powerpc64__) || (defined __sun && defined _LP64) /* i.e. we are on SUN/Intel in 64-bit mode */ + NULL, /* no xdr_control function defined */ + #endif + /* Solaris 64-bit (arch=v9 and arch=amd64) has 64 bits long and 32 bits int. */ +@@ -469,7 +469,7 @@ + #endif + { + unsigned char *up = (unsigned char *)lp ; +-#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__)) ++#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__)) + *lp = 0 ; + up += (sizeof(long) - 4) ; + #endif +@@ -496,7 +496,7 @@ + netlong mycopy = htonl(*lp); + up = (unsigned char *)&mycopy; + #endif +-#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__)) ++#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__)) + up += (sizeof(long) - 4) ; + #endif + +@@ -593,7 +593,7 @@ + #if (defined __alpha) + static int* + #else +-#if ((defined __x86_64__) && !(defined __sun && defined _LP64)) || defined __powerpc64__ ++#if ((defined __x86_64__) && !(defined __sun && defined _LP64)) || defined __powerpc64__ || defined __s390x__ + static int32_t * + #else + static netlong * +@@ -622,7 +622,7 @@ + return (NULL); + } + +-#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ ++#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ + + static bool_t + xdrposix_getint(xdrs, lp) diff --git a/hdf-4.2r1-ppc.patch b/hdf-4.2r2-sparc.patch similarity index 69% rename from hdf-4.2r1-ppc.patch rename to hdf-4.2r2-sparc.patch index b66d83a..a5c43c8 100644 --- a/hdf-4.2r1-ppc.patch +++ b/hdf-4.2r2-sparc.patch @@ -1,19 +1,20 @@ ---- HDF4.2r1/hdf/src/hdfi.h.orig 2005-01-24 20:36:44.000000000 -0700 -+++ HDF4.2r1/hdf/src/hdfi.h 2006-02-02 21:54:59.347516688 -0700 -@@ -72,6 +72,7 @@ - #define DFMT_CRAYMPP 0x1171 - #define DFMT_IA64 0x4441 +diff -Nru HDF4.2r2.orig/hdf/src/hdfi.h HDF4.2r2/hdf/src/hdfi.h +--- HDF4.2r2.orig/hdf/src/hdfi.h 2007-09-17 18:45:17.000000000 +0300 ++++ HDF4.2r2/hdf/src/hdfi.h 2008-01-06 07:23:42.000000000 +0200 +@@ -77,6 +77,7 @@ #define DFMT_LINUX64 0x4441 -+#define DFMT_LINUXPPC 0x1111 + #define DFMT_POWERPC64 0x1111 + #define DFMT_LINUXPPC 0x1111 ++#define DFMT_LINUXSPARC 0x1111 /* I/O library constants */ #define UNIXUNBUFIO 1 -@@ -1326,6 +1327,57 @@ +@@ -1444,6 +1445,66 @@ - #endif /*Linux 64 */ + #endif /*Linux PPC */ -+/* Linux PPC */ -+#if defined __PPC__ ++/* Linux Sparc32/64 */ ++#if defined __sparc__ || defined __sparc64__ + +#ifdef GOT_MACHINE +If you get an error on this line more than one machine type has been defined. @@ -33,14 +34,23 @@ +typedef unsigned char uint8; +typedef short int int16; +typedef unsigned short int uint16; ++#ifdef _LP64 /* 64-bit environment */ +typedef int int32; +typedef unsigned int uint32; ++#else /* 32-bit environment */ ++typedef long int int32; ++typedef unsigned long int uint32; ++#endif +typedef int intn; +typedef unsigned int uintn; +typedef int intf; /* size of INTEGERs in Fortran compiler */ +typedef float float32; +typedef double float64; ++#ifdef _LP64 /* 64-bit environment */ +typedef long hdf_pint_t; /* an integer the same size as a pointer */ ++#else /* 32-bit environment */ ++typedef int hdf_pint_t; /* an integer the same size as a pointer */ ++#endif +#define FNAME_POST_UNDERSCORE +#define _fcdtocp(desc) (desc) +#ifdef HAVE_FMPOOL @@ -61,7 +71,7 @@ +#define INCLUDES_ARE_ANSI +#endif + -+#endif /*Linux PPC */ ++#endif /* Linux Sparc32/64 */ + /*#ifndef GOT_MACHINE No machine type has been defined. Your Makefile needs to have someing like diff --git a/hdf-4.2r3-ppc.patch b/hdf-4.2r3-ppc.patch new file mode 100644 index 0000000..3b30040 --- /dev/null +++ b/hdf-4.2r3-ppc.patch @@ -0,0 +1,1163 @@ +diff -up HDF4.2r2/hdf/src/hdfi.h.ppc HDF4.2r2/hdf/src/hdfi.h +--- HDF4.2r2/hdf/src/hdfi.h.ppc 2007-09-17 17:45:17.000000000 +0200 ++++ HDF4.2r2/hdf/src/hdfi.h 2007-10-17 23:04:40.000000000 +0200 +@@ -76,6 +76,7 @@ + #define DFMT_IA64 0x4441 + #define DFMT_LINUX64 0x4441 + #define DFMT_POWERPC64 0x1111 ++#define DFMT_LINUXPPC 0x1111 + + /* I/O library constants */ + #define UNIXUNBUFIO 1 +@@ -1392,6 +1393,57 @@ typedef long hdf_pint_t; + + #endif /*Linux 64 */ + ++/* Linux PPC */ ++#if defined __powerpc__ && !defined __powerpc64__ ++ ++#ifdef GOT_MACHINE ++If you get an error on this line more than one machine type has been defined. ++Please check your Makefile. ++#endif ++#define GOT_MACHINE ++ ++#include /* for unbuffered i/o stuff */ ++#include ++#define DF_MT DFMT_LINUXPPC ++typedef void VOID; ++typedef void *VOIDP; ++typedef char *_fcd; ++typedef char char8; ++typedef unsigned char uchar8; ++typedef char int8; ++typedef unsigned char uint8; ++typedef short int int16; ++typedef unsigned short int uint16; ++typedef int int32; ++typedef unsigned int uint32; ++typedef int intn; ++typedef unsigned int uintn; ++typedef int intf; /* size of INTEGERs in Fortran compiler */ ++typedef float float32; ++typedef double float64; ++typedef long hdf_pint_t; /* an integer the same size as a pointer */ ++#define FNAME_POST_UNDERSCORE ++#define _fcdtocp(desc) (desc) ++#ifdef HAVE_FMPOOL ++#define FILELIB PAGEBUFIO /* enable page buffering */ ++#else ++#define FILELIB UNIXBUFIO ++#endif ++ ++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */ ++ ++/* Determine the memory manager we are going to use. Valid values are: */ ++/* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */ ++/* what each does */ ++#define JMEMSYS MEM_ANSI ++ ++#ifdef __GNUC__ ++#define HAVE_STDC ++#define INCLUDES_ARE_ANSI ++#endif ++ ++#endif /*Linux PPC */ ++ + /*#ifndef GOT_MACHINE + No machine type has been defined. Your Makefile needs to have someing like + -DSUN or -DUNICOS in order for the HDF internal structures to be defined +diff -up HDF4.2r2/mfhdf/libsrc/array.c.ppc HDF4.2r2/mfhdf/libsrc/array.c +diff -up HDF4.2r2/mfhdf/libsrc/putget.c.ppc HDF4.2r2/mfhdf/libsrc/putget.c +diff -up HDF4.2r2/mfhdf/libsrc/netcdf.h.in.ppc HDF4.2r2/mfhdf/libsrc/netcdf.h.in +--- HDF4.2r2/mfhdf/libsrc/netcdf.h.in.ppc 2007-09-06 23:48:49.000000000 +0200 ++++ HDF4.2r2/mfhdf/libsrc/netcdf.h.in 2007-10-17 22:48:25.000000000 +0200 +@@ -295,7 +295,7 @@ typedef double ncdouble; + */ + #if defined _CRAYMPP + typedef short nclong; +-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64 ++#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64 || defined __powerpc64__ + typedef int nclong; + #else + typedef long nclong; /* default, compatible type */ +diff -up HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h.ppc HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h +--- HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h.ppc 2004-11-22 19:57:50.000000000 +0100 ++++ HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h 2007-10-17 22:48:25.000000000 +0200 +@@ -304,7 +304,7 @@ typedef double ncdouble; + */ + #if defined _CRAYMPP + typedef short nclong; +-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__ ++#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__ + typedef int nclong; + #else + typedef long nclong; /* default, compatible type */ +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-irix6.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-irix6.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-irix6.c.ppc 2006-11-01 17:53:11.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-irix6.c 2007-10-17 22:48:25.000000000 +0200 +@@ -34,7 +34,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -430,7 +430,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -917,7 +917,7 @@ nncvpt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs = *(int *)value; +@@ -1031,7 +1031,7 @@ nncvpt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, ncount, ndims); +@@ -1142,7 +1142,7 @@ nncvptg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1199,7 +1199,7 @@ nncvptg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itolg (value, ncount, nbasis, ndims); +@@ -1335,7 +1335,7 @@ nncvgt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs; +@@ -1477,7 +1477,7 @@ nncvgt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1615,7 +1615,7 @@ nncvgtg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1686,7 +1686,7 @@ nncvgtg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1852,7 +1852,7 @@ nncapt(cdfid, varid, attname, datatype, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, attlen, 1); +@@ -2017,7 +2017,7 @@ nncagt(cdfid, varid, attname, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + /* EIP We need int buffer to read data in on the platfroms where long is 8 bytes +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-t3e.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-t3e.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-t3e.c.ppc 2005-02-09 04:04:19.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-t3e.c 2007-10-17 22:48:25.000000000 +0200 +@@ -39,7 +39,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -70,7 +70,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -435,7 +435,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -931,7 +931,7 @@ NCVPT1(cdfid, varid, indices, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs = *(int *)value; +@@ -1046,7 +1046,7 @@ NCVPT(cdfid, varid, start, count, value, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, ncount, ndims); +@@ -1158,7 +1158,7 @@ NCVPTG(cdfid, varid, start, count, strid + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1215,7 +1215,7 @@ NCVPTG(cdfid, varid, start, count, strid + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itolg (value, ncount, nbasis, ndims); +@@ -1352,7 +1352,7 @@ NCVGT1(cdfid, varid, indices, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs; +@@ -1495,7 +1495,7 @@ NCVGT(cdfid, varid, start, count, value, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1629,7 +1629,7 @@ NCVGTG(cdfid, varid, start, count, strid + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1700,7 +1700,7 @@ NCVGTG(cdfid, varid, start, count, strid + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1869,7 +1869,7 @@ NCAPT(cdfid, varid, attnamed, datatype, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, attlen, 1); +@@ -2038,7 +2038,7 @@ NCAGT(cdfid, varid, attnamed, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = (long *) malloc (attlen * sizeof (long)); +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-unicos.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-unicos.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-unicos.c.ppc 2005-02-09 04:04:19.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-unicos.c 2007-10-17 22:48:25.000000000 +0200 +@@ -39,7 +39,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -70,7 +70,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -436,7 +436,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -932,7 +932,7 @@ NCVPT1(cdfid, varid, indices, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs = *(int *)value; +@@ -1047,7 +1047,7 @@ NCVPT(cdfid, varid, start, count, value, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, ncount, ndims); +@@ -1159,7 +1159,7 @@ NCVPTG(cdfid, varid, start, count, strid + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1216,7 +1216,7 @@ NCVPTG(cdfid, varid, start, count, strid + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itolg (value, ncount, nbasis, ndims); +@@ -1353,7 +1353,7 @@ NCVGT1(cdfid, varid, indices, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs; +@@ -1496,7 +1496,7 @@ NCVGT(cdfid, varid, start, count, value, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1630,7 +1630,7 @@ NCVGTG(cdfid, varid, start, count, strid + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1701,7 +1701,7 @@ NCVGTG(cdfid, varid, start, count, strid + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1870,7 +1870,7 @@ NCAPT(cdfid, varid, attnamed, datatype, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, attlen, 1); +@@ -2039,7 +2039,7 @@ NCAGT(cdfid, varid, attnamed, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = (long *) malloc (attlen * sizeof (long)); +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-aix.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-aix.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-aix.c.ppc 2006-11-01 17:53:11.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-aix.c 2007-10-17 22:48:25.000000000 +0200 +@@ -34,7 +34,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -430,7 +430,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -917,7 +917,7 @@ nncvpt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs = *(int *)value; +@@ -1031,7 +1031,7 @@ nncvpt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, ncount, ndims); +@@ -1142,7 +1142,7 @@ nncvptg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1199,7 +1199,7 @@ nncvptg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itolg (value, ncount, nbasis, ndims); +@@ -1335,7 +1335,7 @@ nncvgt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs; +@@ -1477,7 +1477,7 @@ nncvgt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1616,7 +1616,7 @@ nncvgtg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + + if (datatype == NC_LONG) + tmpbasis = sizeof(int); +@@ -1688,7 +1688,7 @@ nncvgtg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { +@@ -1855,7 +1855,7 @@ nncapt(cdfid, varid, attname, datatype, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + + #ifdef HDF + if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { +@@ -2021,7 +2021,7 @@ nncagt(cdfid, varid, attname, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-solaris.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-solaris.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-solaris.c.ppc 2006-11-01 17:53:11.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-solaris.c 2007-10-17 22:48:25.000000000 +0200 +@@ -34,7 +34,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -430,7 +430,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -917,7 +917,7 @@ nncvpt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs = *(int *)value; +@@ -1031,7 +1031,7 @@ nncvpt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, ncount, ndims); +@@ -1142,7 +1142,7 @@ nncvptg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1199,7 +1199,7 @@ nncvptg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itolg (value, ncount, nbasis, ndims); +@@ -1335,7 +1335,7 @@ nncvgt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs; +@@ -1477,7 +1477,7 @@ nncvgt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1617,7 +1617,7 @@ nncvgtg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1688,7 +1688,7 @@ nncvgtg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1854,7 +1854,7 @@ nncapt(cdfid, varid, attname, datatype, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, attlen, 1); +@@ -2019,7 +2019,7 @@ nncagt(cdfid, varid, attname, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + /* EIP +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-linux.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-linux.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-linux.c.ppc 2006-11-01 17:53:11.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-linux.c 2007-10-17 22:48:25.000000000 +0200 +@@ -34,7 +34,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -430,7 +430,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -916,7 +916,7 @@ nncvpt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs = *(int *)value; +@@ -1030,7 +1030,7 @@ nncvpt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, ncount, ndims); +@@ -1141,7 +1141,7 @@ nncvptg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1198,7 +1198,7 @@ nncvptg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itolg (value, ncount, nbasis, ndims); +@@ -1334,7 +1334,7 @@ nncvgt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs; +@@ -1476,7 +1476,7 @@ nncvgt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1614,7 +1614,7 @@ nncvgtg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1685,7 +1685,7 @@ nncvgtg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1851,7 +1851,7 @@ nncapt(cdfid, varid, attname, datatype, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, attlen, 1); +@@ -2016,7 +2016,7 @@ nncagt(cdfid, varid, attname, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + /* EIP We need to use int buffer to read data in on the platforms where long is 8 bytes +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-apple.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-apple.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-apple.c.ppc 2006-11-01 17:53:11.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-apple.c 2007-10-17 22:48:25.000000000 +0200 +@@ -34,7 +34,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + + int ll; + #else +@@ -66,7 +66,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + + int ll; + #else +@@ -431,7 +431,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed +@@ -1085,7 +1085,7 @@ nncvptg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + + if (datatype == NC_LONG) + tmpbasis = sizeof(int); +@@ -1440,7 +1440,7 @@ nncvgtg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + + if (datatype == NC_LONG) + tmpbasis = sizeof(int); +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-hpux.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-hpux.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-hpux.c.ppc 2006-11-01 17:53:11.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-hpux.c 2007-10-17 22:48:25.000000000 +0200 +@@ -34,7 +34,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -430,7 +430,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -917,7 +917,7 @@ nncvpt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs = *(int *)value; +@@ -1031,7 +1031,7 @@ nncvpt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, ncount, ndims); +@@ -1142,7 +1142,7 @@ nncvptg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1199,7 +1199,7 @@ nncvptg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itolg (value, ncount, nbasis, ndims); +@@ -1335,7 +1335,7 @@ nncvgt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs; +@@ -1477,7 +1477,7 @@ nncvgt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1616,7 +1616,7 @@ nncvgtg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1687,7 +1687,7 @@ nncvgtg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1853,7 +1853,7 @@ nncapt(cdfid, varid, attname, datatype, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, attlen, 1); +@@ -2018,7 +2018,7 @@ nncagt(cdfid, varid, attname, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + /*EIP We need to use int buffer to read data in on the platforms where long is 8 bytes +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-alpha.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-alpha.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-alpha.c.ppc 2006-11-01 17:53:11.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-alpha.c 2007-10-17 22:48:25.000000000 +0200 +@@ -34,7 +34,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -430,7 +430,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -917,7 +917,7 @@ nncvpt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs = *(int *)value; +@@ -1031,7 +1031,7 @@ nncvpt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, ncount, ndims); +@@ -1142,7 +1142,7 @@ nncvptg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1199,7 +1199,7 @@ nncvptg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itolg (value, ncount, nbasis, ndims); +@@ -1335,7 +1335,7 @@ nncvgt1(cdfid, varid, indices, value, rc + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long longs; +@@ -1477,7 +1477,7 @@ nncvgt(cdfid, varid, start, count, value + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1618,7 +1618,7 @@ nncvgtg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1689,7 +1689,7 @@ nncvgtg(cdfid, varid, start, count, stri + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long iocount = dimprod (ncount, ndims); /* product of dimensions */ +@@ -1855,7 +1855,7 @@ nncapt(cdfid, varid, attname, datatype, + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { + long *longs = itol (value, attlen, 1); +@@ -2020,7 +2020,7 @@ nncagt(cdfid, varid, attname, value, rco + return; + } /* else */ + #endif /* FORTRAN_HAS_NO_SHORT */ +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + #ifdef HDF + if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { + +diff -up HDF4.2r2/mfhdf/fortran/config/jackets-fbsd.c.ppc HDF4.2r2/mfhdf/fortran/config/jackets-fbsd.c +--- HDF4.2r2/mfhdf/fortran/config/jackets-fbsd.c.ppc 2006-11-01 17:53:11.000000000 +0100 ++++ HDF4.2r2/mfhdf/fortran/config/jackets-fbsd.c 2007-10-17 22:48:25.000000000 +0200 +@@ -34,7 +34,7 @@ + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm + + struct ncfils { /* This will be a common block from Fortran */ + double dd; +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + int ll; + #else + long ll; +@@ -430,7 +430,7 @@ stoig(shorts, ints, dims, basis, ndims) + } + #endif /* FORTRAN_HAS_NO_SHORT */ + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + /* + * Convert multi-dimensional array of NCLONGs stored in ints to packed + * array of longs, in malloc'ed space. Returns pointer to longs or NULL +@@ -1083,7 +1083,7 @@ nncvptg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +@@ -1437,7 +1437,7 @@ nncvgtg(cdfid, varid, start, count, stri + tmpbasis = nctypelen(NC_LONG); + else + #endif +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (datatype == NC_LONG) + tmpbasis = sizeof(int); + else +diff -up HDF4.2r2/mfhdf/ncgen/ncgen.l.ppc HDF4.2r2/mfhdf/ncgen/ncgen.l +--- HDF4.2r2/mfhdf/ncgen/ncgen.l.ppc 2003-12-10 22:15:54.000000000 +0100 ++++ HDF4.2r2/mfhdf/ncgen/ncgen.l 2007-10-17 22:48:25.000000000 +0200 +@@ -134,7 +134,7 @@ FloatInf|Infinity|Inf { /* float miss + yyerror(errstr); + } + +-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ + if (dd < INT_MIN || dd > INT_MAX) + #else + #if defined (_CRAYMPP) diff --git a/hdf.spec b/hdf.spec index 38ff195..74aabb4 100644 --- a/hdf.spec +++ b/hdf.spec @@ -1,17 +1,24 @@ Name: hdf -Version: 4.2r1 -Release: 8%{?dist}.1 +Version: 4.2r3 +Release: 3%{?dist} Summary: A general purpose library and file format for storing scientific data -License: BSD-ish +License: BSD Group: System Environment/Libraries URL: http://hdf.ncsa.uiuc.edu/hdf4.html -#Source0: ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/src/HDF%{version}.tar.gz -Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/4.2r1-hrepack-p4.tar.gz +Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/HDF%{version}.tar.gz Patch0: hdf-4.2r1p4-maxavailfiles.patch -Patch1: hdf-4.2r1-ppc.patch +Patch1: hdf-4.2r3-ppc.patch +Patch2: hdf-4.2r2-sparc.patch +Patch3: hdf-4.2r2-s390.patch +Patch4: hdf-4.2r2-libm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: autoconf flex byacc libjpeg-devel zlib-devel +BuildRequires: flex byacc libjpeg-devel zlib-devel +%if "%{?dist}" != ".el4" +BuildRequires: gcc-gfortran +%else BuildRequires: gcc-g77 +%endif + %description HDF is a general purpose library and file format for storing scientific data. @@ -34,26 +41,61 @@ HDF development headers and libraries. %prep -#%setup -q -n HDF%{version} -%setup -q -n 4.2r1-hrepack-p4 +%setup -q -n HDF%{version} %patch -p1 -b .maxavailfiles -%patch1 -p1 -b .orig +%patch1 -p1 -b .ppc +%patch2 -p1 -b .sparc +%patch3 -p1 -b .s390 +%patch4 -p1 -b .libm + +chmod a-x *hdf/*/*.c hdf/*/*.h +# restore include file timestamps modified by patching +touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h +touch -c -r ./mfhdf/libsrc/config/netcdf-linux.h.ppc ./mfhdf/libsrc/config/netcdf-linux.h %build -autoconf -export CFLAGS="$RPM_OPT_FLAGS -fPIC -DHAVE_NETCDF" -%configure --disable-production -make +# avoid upstream compiler flags settings +rm config/*linux-gnu +export CFLAGS="$RPM_OPT_FLAGS -fPIC" +export FFLAGS="$RPM_OPT_FLAGS -ffixed-line-length-none" +%configure --disable-production --disable-netcdf \ +%if "%{?dist}" != ".el4" + F77=gfortran \ +%else + F77=g77 \ + --includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name} +%endif +make +# correct the timestamps based on files used to generate the header files +touch -c -r ./mfhdf/fortran/config/netcdf-linux.inc mfhdf/fortran/netcdf.inc +touch -c -r hdf/src/hdf.inc hdf/src/hdf.f90 +touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90 +touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90 +# netcdf fortran include need same treatement, but they are not shipped %install rm -rf $RPM_BUILD_ROOT -%makeinstall includedir=${RPM_BUILD_ROOT}%{_includedir}/%{name} \ - libdir=$RPM_BUILD_ROOT%{_libdir}/%{name} +make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' #Don't conflict with netcdf -rm $RPM_BUILD_ROOT%{_bindir}/nc* $RPM_BUILD_ROOT%{_mandir}/man1/nc* +#rm $RPM_BUILD_ROOT%{_bindir}/nc* $RPM_BUILD_ROOT%{_mandir}/man1/nc* +for file in ncdump ncgen; do + mv $RPM_BUILD_ROOT%{_bindir}/$file $RPM_BUILD_ROOT%{_bindir}/h$file + # man pages are the same than netcdf ones + rm $RPM_BUILD_ROOT%{_mandir}/man1/${file}.1 +done +# this is done to have the same timestamp on multiarch setups +touch -c -r README $RPM_BUILD_ROOT/%{_includedir}/hdf/h4config.h + +# Remove an autoconf conditional from the API that is unused and cause +# the API to be different on x86 and x86_64 +pushd $RPM_BUILD_ROOT/%{_includedir}/hdf +grep -v 'H4_SIZEOF_INTP' h4config.h > h4config.h.tmp +touch -c -r h4config.h h4config.h.tmp +mv h4config.h.tmp h4config.h +popd %check make check @@ -76,26 +118,72 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Thu May 24 2007 Orion Poplawski 4.2r1-8.1 +* Wed May 28 2008 Balint Cristian 4.2r3-3 +- require gcc-g77 for fortran on RHEL4 + +* Sun Mar 2 2008 Patrice Dumas 4.2r3-2 +- don't ship an empty netcdf.h file. The related definitions are now + in hdf4_netcdf.h + +* Tue Feb 5 2008 Orion Poplawski 4.2.r3-1 +- Update to 4.2r3 + +* Tue Feb 5 2008 Orion Poplawski 4.2.r2-7 +- Add patch to add -lm to hdiff link + +* Tue Feb 5 2008 Orion Poplawski 4.2.r2-6 +- Add patch for s390 support (bug #431511) + +* Mon Jan 7 2008 Orion Poplawski 4.2.r2-5 +- Add patches for sparc support (bug #427639) + +* Mon Oct 29 2007 Patrice Dumas 4.2r2-4 +- install the netcdf.h file that describes the netcdf2 hdf enabled + API + +* Mon Oct 29 2007 Patrice Dumas 4.2r2-3 +- ship hdf enabled nc* utils as hnc* +- add --disable-netcdf that replaces HAVE_NETCDF +- keep include files timestamps, and have the same accross arches +- fix multiarch difference in include files (#341491) + +* Wed Oct 17 2007 Patrice Dumas 4.2r2-2 +- update to 4.2r2 + +* Fri Aug 24 2007 Orion Poplawski 4.2r1-15 +- Update license tag to BSD +- Rebuild for BuildID + +* Thu May 10 2007 Balint Cristian 4.2r1-14 +- Fix ppc64 too. + +* Thu May 10 2007 Orion Poplawski 4.2r1-13 - Remove netcdf-devel requires. (bug #239631) -* Fri Apr 20 2007 Orion Poplawski 4.2r1-8 +* Fri Apr 20 2007 Orion Poplawski 4.2r1-12 - Use 4.2r1-hrepack-p4.tar.gz for hrepack patch - Remove configure patch applied upstream - Use --disable-production configure flag to avoid stripping -g compile flag - Add patch to fix open file test when run under mock -* Thu Apr 19 2006 Orion Poplawski 4.2r1-7 +* Tue Aug 29 2006 Orion Poplawski 4.2r1-11 +- Rebuild for FC6 + +* Thu Apr 20 2006 Orion Poplawski 4.2r1-10 - Add Requires netcdf-devel for hdf-devel (bug #189337) -* Fri Feb 24 2006 Patrice Dumas 4.2r1-6.2 -- use gcc-g77 instead of gcc-gfortran -- sync with FC-4 spec file instead of devel +* Mon Feb 13 2006 Orion Poplawski 4.2r1-9 +- Rebuild for gcc/glibc changes -* Mon Feb 20 2006 Orion Poplawski 4.2r1-6 +* Wed Feb 8 2006 Orion Poplawski 4.2r1-8 - Compile with -DHAVE_NETCDF for gdl hdf/netcdf compatibility + +* Thu Feb 2 2006 Orion Poplawski 4.2r1-7 - Add patch to build on ppc +* Wed Dec 21 2005 Orion Poplawski 4.2r1-6 +- Rebuild + * Wed Oct 05 2005 Orion Poplawski 4.2r1-5 - Add Requires: libjpeg-devel zlib-devel to -devel package diff --git a/sources b/sources index 28db7db..b823432 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -47e42192b00814d8f815b7b4f8243b01 4.2r1-hrepack-p4.tar.gz +767382a31470e795f4c4217e33a689e8 HDF4.2r3.tar.gz