summaryrefslogtreecommitdiffstats
path: root/src/hdf5fort.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/hdf5fort.h')
-rw-r--r--src/hdf5fort.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/hdf5fort.h b/src/hdf5fort.h
new file mode 100644
index 0000000..21e9ffc
--- /dev/null
+++ b/src/hdf5fort.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+ * NCSA HDF *
+ * Software Development Group *
+ * National Center for Supercomputing Applications *
+ * University of Illinois at Urbana-Champaign *
+ * 605 E. Springfield, Champaign IL 61820 *
+ * *
+ * For conditions of distribution and use, see the accompanying *
+ * hdf/COPYING file. *
+ * *
+ ****************************************************************************/
+
+/* $Id$ */
+
+/*
+ * This file contains Fortran compatibility/interface macros, etc.
+ */
+
+#ifndef HDF5FORT_H
+#define HDF5FORT_H
+
+/*----------------------------------------------------------------
+** MACRO FCALLKEYW for any special fortran-C stub keyword
+**
+** MacIntosh MPW LS-fortran needs pascal since it can interface
+** best with pascal functions.
+** Microsoft C and Fortran need __fortran for Fortran callable C
+** routines.
+**
+** MACRO FRETVAL for any return value from a fortran-C stub function
+** Replaces the older FCALLKEYW macro.
+**---------------------------------------------------------------*/
+#ifdef FRETVAL
+#undef FRETVAL
+#endif
+
+#if defined(MAC) /* with LS FORTRAN */
+#ifndef ABSOFT
+# define FCALLKEYW pascal
+# define FRETVAL(x) pascal x
+#endif /* ABSOFT */
+#endif
+
+#ifndef FRETVAL /* !MAC */
+# define FCALLKEYW /*NONE*/
+# define FRETVAL(x) x
+#endif
+
+
+/*----------------------------------------------------------------
+** MACRO FNAME for any fortran callable routine name.
+**
+** This macro prepends, appends, or does not modify a name
+** passed as a macro parameter to it based on the FNAME_PRE_UNDERSCORE,
+** FNAME_POST_UNDERSCORE macros set for a specific system.
+**
+**---------------------------------------------------------------*/
+#if defined(FNAME_PRE_UNDERSCORE) && defined(FNAME_POST_UNDERSCORE)
+# define FNAME(x) _##x##_
+#endif
+#if defined(FNAME_PRE_UNDERSCORE) && !defined(FNAME_POST_UNDERSCORE)
+# define FNAME(x) _##x
+#endif
+#if !defined(FNAME_PRE_UNDERSCORE) && defined(FNAME_POST_UNDERSCORE)
+# define FNAME(x) x##_
+#endif
+#if !defined(FNAME_PRE_UNDERSCORE) && !defined(FNAME_POST_UNDERSCORE)
+# define FNAME(x) x
+#endif
+
+
+#endif /* HDF5FORT_H */
+
+
+