diff options
| author | Tomas Bzatek <tbzatek@redhat.com> | 2023-12-17 21:23:58 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@redhat.com> | 2023-12-17 21:23:58 +0100 |
| commit | 02d6107c97b48888362e7c6a70dcac323c89d741 (patch) | |
| tree | 5069a77adaf73f7249ac79b6c49a47168a647ef8 /zip/ZipArchive/std_stl.h | |
| parent | 4e17c2527b106f1b493a3ac77c89858d14f834e2 (diff) | |
| download | tuxcmd-modules-02d6107c97b48888362e7c6a70dcac323c89d741.tar.xz | |
ZipArchive: Update to the 4.6.9 release
Diffstat (limited to 'zip/ZipArchive/std_stl.h')
| -rw-r--r-- | zip/ZipArchive/std_stl.h | 74 |
1 files changed, 56 insertions, 18 deletions
diff --git a/zip/ZipArchive/std_stl.h b/zip/ZipArchive/std_stl.h index c54d0bf..67b8482 100644 --- a/zip/ZipArchive/std_stl.h +++ b/zip/ZipArchive/std_stl.h @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////////
-// This source file is part of the ZipArchive library source distribution and
-// is Copyrighted 2000 - 2007 by Artpol Software - Tadeusz Dracz
+// This source file is part of the ZipArchive Library Open Source distribution
+// and is Copyrighted 2000 - 2022 by Artpol Software - Tadeusz Dracz
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -9,7 +9,7 @@ //
// For the licensing details refer to the License.txt file.
//
-// Web Site: http://www.artpol-software.com
+// Web Site: https://www.artpol-software.com
////////////////////////////////////////////////////////////////////////////////
#ifndef ZIPARCHIVE_STDAFX_DOT_H
@@ -17,7 +17,10 @@ #endif
#include "_features.h"
-#include <limits.h> +
+#if defined DEBUG && !defined _DEBUG
+ #define _DEBUG
+#endif
#if _MSC_VER > 1000
// STL warnings
@@ -34,17 +37,19 @@ #define _UNICODE
#endif
-#ifndef _WIN32
+#if !defined WIN32 && !defined _WIN32
+
#ifndef NULL
#define NULL 0
#endif
- #include <ctype.h>
+ #include <cctype>
+ #include <climits>
typedef int HFILE;
typedef void* HANDLE;
- typedef unsigned long DWORD;
+ typedef unsigned int DWORD;
typedef long LONG;
- typedef int ZBOOL; /* to avoid conflicts when using Objective-C under Mac */
+ typedef int ZBOOL; /* to avoid conflicts when using Objective-C */
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned int UINT;
@@ -57,8 +62,19 @@ #define TRUE (int)1
#endif
+#ifdef _UNICODE
+ typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
+ #include <wchar.h>
+ #define _ZIP_WIDE_TO_MULTIBYTE(input, variable) LPCSTR variable;\
+ CZipAutoBuffer variable##Buffer;\
+ ZipPlatform::WideToMultiByte(input, variable##Buffer, true, 0);\
+ variable = variable##Buffer;
+#else
typedef unsigned short WCHAR; // wc, 16-bit UNICODE character
+ #define _ZIP_WIDE_TO_MULTIBYTE(input, variable) LPCSTR variable = input;
+#endif
+
typedef const WCHAR *LPCWSTR;
typedef const char *LPCSTR;
typedef WCHAR *LPWSTR;
@@ -83,45 +99,67 @@ typedef long long LONGLONG;
#define CP_ACP 0
#define CP_OEMCP 1
+
+ #ifndef CP_UTF8
+ #define CP_UTF8 65001
+ #endif
+
#ifndef _I64_MAX
#ifdef LLONG_MAX
#define _I64_MAX LLONG_MAX
- #else
+ #elif defined LONG_LONG_MAX
#define _I64_MAX LONG_LONG_MAX
+ #else
+ #define _I64_MAX LONGLONG_MAX
#endif
#endif
#ifndef _UI64_MAX
#ifdef ULLONG_MAX
#define _UI64_MAX ULLONG_MAX
- #else
+ #elif defined ULONG_LONG_MAX
#define _UI64_MAX ULONG_LONG_MAX
+ #else
+ #define _UI64_MAX ULONGLONG_MAX
#endif
#endif
#define _lseeki64 lseek64
+
+ typedef struct
+ {
+ DWORD dwLowDateTime;
+ DWORD dwHighDateTime;
+ } ZFILETIME;
+
#else
#include <TCHAR.H>
- #include <windows.h>
+ #include <windows.h>
#include <stddef.h>
+#ifndef _I64_MAX
+ #include <limits.h>
+#endif
#ifndef STRICT
#define STRICT
#endif
typedef BOOL ZBOOL;
+ typedef FILETIME ZFILETIME;
-#endif // #ifndef _WIN32
+#endif // #if !defined WIN32 && !defined _WIN32
#ifndef ASSERT
- #include <assert.h>
- #define ASSERT(f) assert((f))
-#endif
-#ifndef VERIFY
#ifdef _DEBUG
- #define VERIFY(x) ASSERT((x))
+ #include <assert.h>
+ #define ASSERT(f) assert((f))
#else
- #define VERIFY(x) x
+ #define ASSERT(f)
#endif
#endif
#define ZIP_FILE_USIZE ULONGLONG
#define ZIP_FILE_SIZE LONGLONG
#define ZIP_FILE_SIZEMAX _I64_MAX
+#ifndef _NOEXCEPT // for OS X
+ #define _NOEXCEPT
+#endif
+
+
|
