Commit fc612d05 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

mingw update

parent e540dab7
...@@ -31,7 +31,8 @@ void cdf_create(const char *path, int cmode, int *ncidp) ...@@ -31,7 +31,8 @@ void cdf_create(const char *path, int cmode, int *ncidp)
int status; int status;
int oldfill; int oldfill;
struct stat filestat; struct stat filestat;
size_t initialsz, chunksizehint; size_t initialsz, chunksizehint = 0;
#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE)
char basename[1024]; char basename[1024];
char *pend; char *pend;
...@@ -47,11 +48,9 @@ void cdf_create(const char *path, int cmode, int *ncidp) ...@@ -47,11 +48,9 @@ void cdf_create(const char *path, int cmode, int *ncidp)
if ( stat(basename, &filestat) != 0 ) if ( stat(basename, &filestat) != 0 )
SysError(func, basename); SysError(func, basename);
#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE)
chunksizehint = (size_t) filestat.st_blksize * 4; chunksizehint = (size_t) filestat.st_blksize * 4;
#else
chunksizehint = (size_t) 4096 * 4;
#endif #endif
if ( chunksizehint < ChunkSizeMin ) chunksizehint = ChunkSizeMin; if ( chunksizehint < ChunkSizeMin ) chunksizehint = ChunkSizeMin;
initialsz = 0; initialsz = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment