summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1998-10-23 18:23:29 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>1998-10-23 18:23:29 (GMT)
commitca5f819b46581716e78b4d086c7104ccf951c3a3 (patch)
tree8d8846d94da9443e7f6b4b8b9815d29227943997 /src/H5.c
parent3a7c54b06f37b0648e1d8f337d11a1f13b67d60c (diff)
downloadhdf5-ca5f819b46581716e78b4d086c7104ccf951c3a3.zip
hdf5-ca5f819b46581716e78b4d086c7104ccf951c3a3.tar.gz
hdf5-ca5f819b46581716e78b4d086c7104ccf951c3a3.tar.bz2
[svn-r782] Win NT port- tested on Unix and NT
changes - all changes surrounded by a #if defined(WIN32) defined __undef__ to be equal to nothing, changed long long to __int64 removed body of H5TimerBegin, defined F_OK,R_OK,W_OK, some other changes involving header files.
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/H5.c b/src/H5.c
index 6cbd1bb..20d7da4 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -39,9 +39,12 @@ static char RcsId[] = "@(#)$Revision$";
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
+#if defined(WIN32)
+#include <time.h>
+#else
#include <sys/time.h>
#include <sys/resource.h>
-
+#endif
/* We need this on Irix64 even though we've included stdio.h as documented */
FILE *fdopen(int fd, const char *mode);
@@ -658,14 +661,22 @@ HDfprintf (FILE *stream, const char *fmt, ...)
case 'H':
if (sizeof(hsize_t)==sizeof(long)) {
HDstrcpy (modifier, "l");
+#if defined(WIN32)
+ } else if (sizeof(hsize_t)==sizeof(__int64)) {
+#else
} else if (sizeof(hsize_t)==sizeof(long long)) {
+#endif
HDstrcpy (modifier, PRINTF_LL_WIDTH);
}
break;
case 'Z':
if (sizeof(size_t)==sizeof(long)) {
HDstrcpy (modifier, "l");
+#if defined(WIN32)
+ } else if (sizeof(size_t)==sizeof(__int64)) {
+#else
} else if (sizeof(size_t)==sizeof(long long)) {
+#endif
HDstrcpy (modifier, PRINTF_LL_WIDTH);
} else if (sizeof(size_t)==sizeof(int)) {
modifier[0] = '\0';
@@ -713,7 +724,11 @@ HDfprintf (FILE *stream, const char *fmt, ...)
long x = va_arg (ap, long);
n = fprintf (stream, template, x);
} else {
+#if defined(WIN32)
+ __int64 x = va_arg(ap, __int64);
+#else
long long x = va_arg (ap, long long);
+#endif
n = fprintf (stream, template, x);
}
break;
@@ -732,8 +747,12 @@ HDfprintf (FILE *stream, const char *fmt, ...)
unsigned long x = va_arg (ap, unsigned long);
n = fprintf (stream, template, x);
} else {
+#if defined(WIN32)
+ unsigned __int64 x = va_arg (ap, unsigned __int64);
+#else
unsigned long long x = va_arg (ap, unsigned long long);
- n = fprintf (stream, template, x);
+#endif
+ n = fprintf (stream, template, x);
}
break;
@@ -990,6 +1009,7 @@ H5_timer_reset (H5_timer_t *timer)
void
H5_timer_begin (H5_timer_t *timer)
{
+#if !defined(WIN32)
#ifdef HAVE_GETRUSAGE
struct rusage rusage;
#endif
@@ -1010,6 +1030,7 @@ H5_timer_begin (H5_timer_t *timer)
gettimeofday (&etime, NULL);
timer->etime = (double)etime.tv_sec + (double)etime.tv_usec/1e6;
+#endif
}