summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2010-11-16 21:40:04 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2010-11-16 21:40:04 (GMT)
commitc249ccfd1502c428b820d6316a5cf7a0a9d5ca82 (patch)
tree6480ed46a173986a61e556339a97330a5d81907f /perform
parent69a531786037ecb77933e676d05c5a5cd1dbba4b (diff)
downloadhdf5-c249ccfd1502c428b820d6316a5cf7a0a9d5ca82.zip
hdf5-c249ccfd1502c428b820d6316a5cf7a0a9d5ca82.tar.gz
hdf5-c249ccfd1502c428b820d6316a5cf7a0a9d5ca82.tar.bz2
[svn-r19796] Bug 2091: remove all Metraowerks compiler code bracheted by __MWERKS__.
Metraowerks compiler is no more. Make the code cleaner. Tested: H5committest plus jam serial.
Diffstat (limited to 'perform')
-rw-r--r--perform/iopipe.c9
-rw-r--r--perform/overhead.c18
-rw-r--r--perform/pio_standalone.h49
-rw-r--r--perform/sio_standalone.h33
-rw-r--r--perform/zip_perf.c4
5 files changed, 19 insertions, 94 deletions
diff --git a/perform/iopipe.c b/perform/iopipe.c
index 77d4fc8..a67c5c8 100644
--- a/perform/iopipe.c
+++ b/perform/iopipe.c
@@ -21,15 +21,6 @@
/* See H5private.h for how to include headers */
#include "hdf5.h"
-#if defined (__MWERKS__)
-#ifdef H5_HAVE_SYS_TIMEB
-#undef H5_HAVE_SYS_TIMEB
-#endif
-#ifdef H5_HAVE_SYSTEM
-#undef H5_HAVE_SYSTEM
-#endif
-#endif /* __MWERKS__*/
-
#include "H5private.h"
#ifdef H5_HAVE_SYS_TIMEB
diff --git a/perform/overhead.c b/perform/overhead.c
index 5076103..cfd96b8 100644
--- a/perform/overhead.c
+++ b/perform/overhead.c
@@ -220,15 +220,8 @@ test(fill_t fill_style, const double splits[],
if((fspace = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
if((mspace = H5Screate_simple(1, ch_size, ch_size)) < 0) goto error;
if((dset = H5Dcreate2(file, "chunked", H5T_NATIVE_INT,
- fspace, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
-
-#if !defined( __MWERKS__)
-
- /*
- workaround for a bug in the Metrowerks version 6.0 open function
- */
+ fspace, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
if ((fd=HDopen(FILE_NAME_1, O_RDONLY, 0666)) < 0) goto error;
-#endif
for (i=1; i<=cur_size[0]; i++) {
@@ -264,8 +257,6 @@ test(fill_t fill_style, const double splits[],
}
-#if !defined( __MWERKS__)
-
/* Determine overhead */
if (verbose) {
if (H5Fflush(file, H5F_SCOPE_LOCAL) < 0) goto error;
@@ -279,7 +270,6 @@ test(fill_t fill_style, const double splits[],
(unsigned long)i,
(double)(hssize_t)(sb.st_size-i*sizeof(int))/(hssize_t)i);
}
-#endif
}
@@ -312,20 +302,14 @@ test(fill_t fill_style, const double splits[],
abort();
}
-#if !defined( __MWERKS__)
-
if (HDfstat(fd, &sb) < 0) goto error;
printf("%-7s %8.3f\n", sname,
(double)(hssize_t)(sb.st_size-cur_size[0]*sizeof(int))/
(hssize_t)cur_size[0]);
-#endif
-
}
-#if !defined( __MWERKS__)
HDclose(fd);
-#endif
return 0;
diff --git a/perform/pio_standalone.h b/perform/pio_standalone.h
index ab4ee94..a4bc8b5 100644
--- a/perform/pio_standalone.h
+++ b/perform/pio_standalone.h
@@ -60,62 +60,41 @@ extern char *strdup(const char *s);
#endif /* _WIN32 */
H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
-#define HDstrcmp(S,T) strcmp(S,T)
-#define HDstrlen(S) strlen(S)
-#define HDstrncmp(S,T,L) strncmp(S,T,L)
-#define HDstrncpy(X,Y,Z) strncpy(X,Y,Z)
-#define HDstrchr(S,C) strchr(S,C)
-#define HDfree(M) free(M)
+#define HDstrcmp(S,T) strcmp(S,T)
+#define HDstrlen(S) strlen(S)
+#define HDstrncmp(S,T,L) strncmp(S,T,L)
+#define HDstrncpy(X,Y,Z) strncpy(X,Y,Z)
+#define HDstrchr(S,C) strchr(S,C)
+#define HDfree(M) free(M)
#ifdef _O_BINARY
-#define HDopen(S,F,M) open(S,F|_O_BINARY,M)
+#define HDopen(S,F,M) open(S,F|_O_BINARY,M)
#else
-#define HDopen(S,F,M) open(S,F,M)
+#define HDopen(S,F,M) open(S,F,M)
#endif
-#define HDclose(F) close(F)
+#define HDclose(F) close(F)
#ifdef _WIN32
- #ifdef __MWERKS__
- #define HDlseek(F,O,W) lseek(F,O,W)
- #else /*MSVS */
- #define HDlseek(F,O,W) _lseeki64(F,O,W)
- #endif
+#define HDlseek(F,O,W) _lseeki64(F,O,W)
#else
-#define HDlseek(F,O,W) lseek(F,O,W)
+#define HDlseek(F,O,W) lseek(F,O,W)
#endif
-#if defined (__MWERKS__)
-/* workaround for a bug in the Metrowerks version 6.0 header file for write
- which is not defined as const void*
- */
-#define HDwrite(F,M,Z) write(F,(void*)M,Z)
-#else
#define HDwrite(F,M,Z) write(F,M,Z)
-#endif
#define HDread(F,M,Z) read(F,M,Z)
#ifdef _WIN32
- #ifdef __MWERKS__
- #define HDstat(S,B) stat(S,B)
- #else /*MSVC*/
#define HDstat(S,B) _stati64(S,B)
- #endif
#else
#define HDstat(S,B) stat(S,B)
#endif
#ifdef _WIN32
- #ifdef __MWERKS__
- #define HDfstat(F,B) fstat(F,B)
- typedef struct stat h5_stat_t;
- typedef off_t h5_stat_size_t;
- #else /*MSVC*/
- #define HDfstat(F,B) _fstati64(F,B)
- typedef struct _stati64 h5_stat_t;
- typedef __int64 h5_stat_size_t;
- #endif
+#define HDfstat(F,B) _fstati64(F,B)
+typedef struct _stati64 h5_stat_t;
+typedef __int64 h5_stat_size_t;
#else
#define HDfstat(F,B) fstat(F,B)
typedef struct stat h5_stat_t;
diff --git a/perform/sio_standalone.h b/perform/sio_standalone.h
index 7c4810b..77bb7f8 100644
--- a/perform/sio_standalone.h
+++ b/perform/sio_standalone.h
@@ -114,12 +114,7 @@
#define HDexecve(S,AV,E) execve(S,AV,E)
#define HDexecvp(S,AV) execvp(S,AV)
#define HDexit(N) exit(N)
-#if defined __MWERKS__
-#include <abort_exit.h>
-#define HD_exit(N) __exit(N)
-#else /* __MWERKS __ */
#define HD_exit(N) _exit(N)
-#endif /* __MWERKS __ */
#define HDexp(X) exp(X)
#define HDfabs(X) fabs(X)
/* use ABS() because fabsf() fabsl() are not common yet. */
@@ -175,19 +170,11 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
* xxx64 versions if available.
*/
#ifdef _WIN32
- #ifdef __MWERKS__
- #define HDfstat(F,B) fstat(F,B)
- #define HDlstat(S,B) lstat(S,B)
- #define HDstat(S,B) stat(S,B)
- typedef struct stat h5_stat_t;
- typedef off_t h5_stat_size_t;
- #else /*MSVC*/
#define HDfstat(F,B) _fstati64(F,B)
#define HDlstat(S,B) _lstati64(S,B)
#define HDstat(S,B) _stati64(S,B)
typedef struct _stati64 h5_stat_t;
typedef __int64 h5_stat_size_t;
- #endif
#elif H5_SIZEOF_OFF_T!=8 && H5_SIZEOF_OFF64_T==8 && defined(H5_HAVE_STAT64)
#define HDfstat(F,B) fstat64(F,B)
#define HDlstat(S,B) lstat64(S,B)
@@ -249,17 +236,13 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDlog10(X) log10(X)
#define HDlongjmp(J,N) longjmp(J,N)
#ifdef _WIN32
- #ifdef __MWERKS__
- #define HDlseek(F,O,W) lseek(F,O,W)
- #else /*MSVS */
- #define HDlseek(F,O,W) _lseeki64(F,O,W)
- #endif
+ #define HDlseek(F,O,W) _lseeki64(F,O,W)
#else
- #ifdef H5_HAVE_LSEEK64
+ #ifdef H5_HAVE_LSEEK64
#define HDlseek(F,O,W) lseek64(F,O,W)
- #else
+ #else
#define HDlseek(F,O,W) lseek(F,O,W)
- #endif
+ #endif
#endif
#define HDmalloc(Z) malloc(Z)
#define HDposix_memalign(P,A,Z) posix_memalign(P,A,Z)
@@ -454,15 +437,7 @@ H5_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 version 6.0 header file for write
- which is not defined as const void*
- */
-#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
diff --git a/perform/zip_perf.c b/perform/zip_perf.c
index 7d96405..08177d8 100644
--- a/perform/zip_perf.c
+++ b/perform/zip_perf.c
@@ -62,10 +62,6 @@
# define fileno(file) file->__file
#endif /* RISCOS */
-#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-# include <unix.h> /* for fileno */
-#endif /* __MWERKS__ ... */
-
#ifndef GZ_SUFFIX
# define GZ_SUFFIX ".gz"
#endif /* GZ_SUFFIX */