[svn-r4047]

Purpose:
      bug fix for windows
Description:
     adding various windows macros
Solution:
     see above
Platforms tested:
     windows 2000, confirmed on linux.
This commit is contained in:
MuQun Yang 2001-06-21 15:06:32 -05:00
parent 61b948ad23
commit a3b9db81d1
2 changed files with 12 additions and 5 deletions

View File

@ -16,6 +16,7 @@
#ifdef WIN32
#include <process.h>
#include <direct.h>
#endif /* WIN32 */
/*
@ -401,10 +402,14 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
if (HDstat(fullname, &buf) < 0)
/* The directory doesn't exist just yet */
if (HDmkdir(fullname, (mode_t)0755) < 0 && errno != EEXIST)
#ifdef WIN32
if (_mkdir(fullname)<0){
#else
if (HDmkdir(fullname, (mode_t)0755) < 0 && errno != EEXIST){
#endif
/* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
* Default to PREFIX's original prefix value. */
HDstrcpy(fullname, prefix);
HDstrcpy(fullname, prefix);}
HDstrcat(fullname, "/");
HDstrcat(fullname, base_name);

View File

@ -9,6 +9,11 @@
/* See H5private.h for how to include headers */
#undef NDEBUG
#include "hdf5.h"
#ifdef H5_HAVE_WINSOCK_H
#include <Winsock.h>
#endif /*Winsock.h includes windows.h, due to the different value of
WINVER, windows.h should be put before H5private.h. Kent yang 6/21/2001*/
#include "H5private.h"
#ifdef H5_STDC_HEADERS
@ -37,9 +42,6 @@
# include <sys/resource.h>
#endif
#ifdef H5_HAVE_WINSOCK_H
#include <Winsock.h>
#endif
#if defined (__MWERKS__)