diff options
author | James Laird <jlaird@hdfgroup.org> | 2005-05-12 20:00:56 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2005-05-12 20:00:56 (GMT) |
commit | 8bf9952205d8d8a7ac1a215a5ed2474b46538847 (patch) | |
tree | f4b26660ef772a4e3aa66778022d550074488de2 /fortran | |
parent | fec2c355da13444f9db68d82ccad9507b825348f (diff) | |
download | hdf5-8bf9952205d8d8a7ac1a215a5ed2474b46538847.zip hdf5-8bf9952205d8d8a7ac1a215a5ed2474b46538847.tar.gz hdf5-8bf9952205d8d8a7ac1a215a5ed2474b46538847.tar.bz2 |
[svn-r10743] Purpose:
Code cleanup
Description:
fortran/src/H5f90i.h used to define different fortran types for every
compiler. Now it only defines three things, and they are the
same for every platform but one.
Solution:
Eliminate duplicate definitions; now there are only two cases
("UNICOS" and "everything else").
This should also let the HDF5 Fortran compile anywhere, even on
unknown platforms.
Platforms tested:
mir, pommier, modi4, copper, Cray X1 (in progress)
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5f90i.h | 103 |
1 files changed, 7 insertions, 96 deletions
diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h index d99353b..81065f0 100644 --- a/fortran/src/H5f90i.h +++ b/fortran/src/H5f90i.h @@ -22,6 +22,11 @@ */ #include "H5f90i_gen.h" +/* Define _fcd and real_f. These are the same on every system + * but UNICOS. + */ +#define _fcdtocp(desc) (desc) + #if (defined (UNICOS) || defined (_UNICOS)) && !defined(__crayx1) #include <fortran.h> @@ -29,105 +34,11 @@ /*typedef char* _fcd;*/ typedef double real_f; -#endif /* UNICOS */ - -#if defined(IBM6000) || defined(_AIX) - -typedef char *_fcd; -typedef float real_f; -#define _fcdtocp(desc) (desc) -#endif /*IBM6000*/ - -/* MAC APPLE definitions with IBM XL compiler*/ -#if defined(__APPLE__) -typedef char *_fcd; -typedef float real_f; -#define _fcdtocp(desc) (desc) - -#endif /*APPLE*/ - -/* LINUX definitions */ -#if (defined(linux) || defined(__gnu_linux__) || defined(__linux__)) - -/* Common definitions */ -typedef char *_fcd; -typedef float real_f; -#define _fcdtocp(desc) (desc) - -/* IA32 specific definitions */ -#if (defined(i386) || defined(__i386) || defined(__i386__)) - -/* AMD64 specific definitions */ -#elif defined __x86_64__ - -/* IA64 specific definitions */ -#elif defined __ia64 - -#endif /* IA64 */ -#endif /* LINUX*/ - -#if defined(IRIX) || defined(IRIS4) || defined(sgi) || defined(__sgi__) || defined(__sgi) - -typedef char *_fcd; -typedef float real_f; -#define _fcdtocp(desc) (desc) -#endif /* IRIX */ - -#if defined(__crayx1) -typedef char *_fcd; -typedef float real_f; -#define _fcdtocp(desc) (desc) -#endif /* Cray X1 */ - -#if (defined(SUN) || defined(sun) || defined(__sun__) || defined(__SUNPRO_C)) & !defined(__i386) +#else typedef char *_fcd; typedef float real_f; -#define _fcdtocp(desc) (desc) - -#endif /*SUN*/ - -#if defined DEC_ALPHA || (defined __alpha && defined __unix__ && !defined __linux__) - -typedef char *_fcd; -typedef float real_f; -#define _fcdtocp(desc) (desc) - -#endif /* DEC_ALPHA */ - -#if defined __alpha__ && defined __linux__ - -typedef char *_fcd; -typedef float real_f; -#define _fcdtocp(desc) (desc) - -#endif /* DEC_ALPHA_LINUX */ - -#if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux))) - -typedef char *_fcd; -typedef float real_f; -#define _fcdtocp(desc) (desc) - -#endif /* HP9000 */ - -#if defined _WINDOWS || defined WIN32 - -typedef char *_fcd; -typedef float real_f; - -#define _fcdtocp(desc) (desc) - -#endif /*WINDOWS */ - -/* FreeBSD definitions */ -#if (defined(__FreeBSD) || defined(__FreeBSD__)) - -/* Common definitions */ -typedef char *_fcd; -typedef float real_f; -#define _fcdtocp(desc) (desc) -#endif /* FreeBSD */ +#endif #endif /* _H5f90i_H */ |