summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2001-07-03 14:49:03 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2001-07-03 14:49:03 (GMT)
commitf9f0de7aa0529a0467e79b4521013328fab1e3e7 (patch)
tree83e73aec2d76e64e158ae3de0fbfc138a0dcef08 /src/H5private.h
parentf72cb07b0ac15e511de8c735f02713fb815079e9 (diff)
downloadhdf5-f9f0de7aa0529a0467e79b4521013328fab1e3e7.zip
hdf5-f9f0de7aa0529a0467e79b4521013328fab1e3e7.tar.gz
hdf5-f9f0de7aa0529a0467e79b4521013328fab1e3e7.tar.bz2
[svn-r4099]
Purpose: Code Cleanup Description: Updating CodeWarrior Port Solution: Move around some Windows and Metroworks ifdefs, etc. Platforms tested: Solaris 2.7 (arabica) Linux 2.2 (eirene)
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h49
1 files changed, 42 insertions, 7 deletions
diff --git a/src/H5private.h b/src/H5private.h
index b001d86..415c919 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -168,15 +168,38 @@ MS doesn't recognize it yet (as of April 2001)
# define H5_inline
#endif
-/* Metroworks <sys/types.h> doesn't define off_t. */
-#ifdef __MWERKS__
-typedef long off_t;
-/* Metroworks does not define EINTR in <errno.h> */
-# define EINTR 4
-#endif /*__MWERKS__*/
-
#endif /*WIN32*/
+/*
+ * This driver supports systems that have the lseek64() function by defining
+ * some macros here so we don't have to have conditional compilations later
+ * throughout the code.
+ *
+ * file_offset_t: The datatype for file offsets, the second argument of
+ * the lseek() or lseek64() call.
+ *
+ * file_seek: The function which adjusts the current file position,
+ * either lseek() or lseek64().
+ *
+ * adding for windows NT file system support.
+ */
+
+#ifdef H5_HAVE_LSEEK64
+# define file_offset_t off64_t
+# define file_seek lseek64
+#elif defined (WIN32)
+# ifdef __MWERKS__
+# define file_offset_t off_t
+# define file_seek lseek
+# else /*MSVC*/
+# define file_offset_t __int64
+# define file_seek _lseeki64
+# endif
+#else
+# define file_offset_t off_t
+# define file_seek lseek
+#endif
+
#ifndef F_OK
# define F_OK 00
# define W_OK 02
@@ -760,7 +783,19 @@ __DLL__ int64_t HDstrtoll (const char *s, const char **rest, int base);
#define HDwaitpid(P,W,O) waitpid(P,W,O)
#define HDwcstombs(S,P,Z) wcstombs(S,P,Z)
#define HDwctomb(S,C) wctomb(S,C)
+
+
+
+
+#if defined (__MWERKS__)
+/* workaround for a bug in the Metrowerks header file for write
+ which is not defined as const void*
+ pvn
+ */
+#define HDwrite(F,M,Z) write(F,(void*)M,Z)
+#else
#define HDwrite(F,M,Z) write(F,M,Z)
+#endif
/*
* And now for a couple non-Posix functions... Watch out for systems that