fix for win32 zip support

This commit is contained in:
Bill Currie 2000-09-28 19:48:06 +00:00
parent 2f8e140023
commit 8f3084e923

View file

@ -53,6 +53,16 @@
#endif
#include <limits.h>
#ifdef WIN32
#ifdef __BORLANDC__
# define
# define
#else
# define setmode _setmode
# define O_BINARY _O_BINARY
#endif
#endif
void
Qexpand_squiggle(const char *path, char *dest)
{
@ -170,11 +180,10 @@ Qdopen(int fd, const char *mode)
}
}
#ifdef WIN32
#ifdef __BORLANDC__
setmode(_fileno(file->file),O_BINARY);
#else
_setmode(_fileno(file->file),_O_BINARY);
#endif
if (file->file)
setmode(_fileno(file->file),O_BINARY);
else
setmode(_fileno(file->gzfile),O_BINARY);
#endif
return file;
}