diff options
Diffstat (limited to 'Utilities/cmtar')
-rw-r--r-- | Utilities/cmtar/handle.c | 2 | ||||
-rw-r--r-- | Utilities/cmtar/libtar.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Utilities/cmtar/handle.c b/Utilities/cmtar/handle.c index 4b9a169..de324cb 100644 --- a/Utilities/cmtar/handle.c +++ b/Utilities/cmtar/handle.c @@ -24,7 +24,7 @@ # include <stdlib.h> #endif -#ifdef _MSC_VER +#if defined ( _MSC_VER) || defined(__WATCOMC__) #include <io.h> //Yogi: hack. this should work on windows where there is no O_ACCMODE defined #ifndef O_ACCMODE diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c index 9131512..fdeccf2 100644 --- a/Utilities/cmtar/libtar.c +++ b/Utilities/cmtar/libtar.c @@ -75,6 +75,13 @@ struct gzStruct gzFile* GZFile; }; struct gzStruct GZStruct; +#if defined ( _MSC_VER) || defined(__WATCOMC__) +#include <io.h> +//Yogi: hack. this should work on windows where there is no O_ACCMODE defined +#ifndef O_ACCMODE +# define O_ACCMODE 0x0003 +#endif +#endif int libtar_gzopen(void* call_data, const char *pathname, int oflags, mode_t mode) { |