VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/libzip/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/libzip/compat.h')
-rw-r--r--src/Common/libzip/compat.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/Common/libzip/compat.h b/src/Common/libzip/compat.h
index f2e4c6c5..e0a27beb 100644
--- a/src/Common/libzip/compat.h
+++ b/src/Common/libzip/compat.h
@@ -2,9 +2,9 @@
#define _HAD_LIBZIP_COMPAT_H
/*
compat.h -- compatibility defines.
- Copyright (C) 1999-2018 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2019 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <libzip@nih.at>
@@ -80,8 +80,13 @@ typedef char bool;
#ifndef EOVERFLOW
#define EOVERFLOW EFBIG
#endif
+/* not supported on at least Windows */
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
+
#ifdef _WIN32
#if defined(HAVE__CHMOD)
#define chmod _chmod
#endif
@@ -119,11 +124,8 @@ typedef char bool;
#endif
#if !defined(HAVE_STRTOULL) && defined(HAVE__STRTOUI64)
#define strtoull _strtoui64
#endif
-#if defined(HAVE__UMASK)
-#define umask _umask
-#endif
#if defined(HAVE__UNLINK)
#define unlink _unlink
#endif
#endif
@@ -135,13 +137,8 @@ typedef char bool;
#ifndef HAVE_FTELLO
#define ftello(s) ((long)ftell((s)))
#endif
-#ifndef HAVE_MKSTEMP
-int _zip_mkstemp(char *);
-#define mkstemp _zip_mkstemp
-#endif
-
#if !defined(HAVE_STRCASECMP)
#if defined(HAVE__STRICMP)
#define strcasecmp _stricmp
#elif defined(HAVE_STRICMP)
@@ -202,5 +199,9 @@ int _zip_mkstemp(char *);
#ifndef S_ISDIR
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
#endif
+#ifndef S_ISREG
+#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG)
+#endif
+
#endif /* compat.h */