add patch for compiling zip.c with tcc on windows

pull/13387/head
Delyan Angelov 2022-02-11 17:14:05 +02:00
parent 70a34db6b7
commit 7a82b4b17b
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 9 additions and 0 deletions

View File

@ -228,6 +228,10 @@
#define MINIZ_HAS_64BIT_REGISTERS 0
#endif
#if !defined(__WINDOWS__) && (defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32))
#define __WINDOWS__
#endif
#ifdef __cplusplus
extern "C" {
#endif
@ -4942,7 +4946,12 @@ static int mz_mkdir(const char *pDirname) {
#define MZ_FFLUSH fflush
#define MZ_FREOPEN(f, m, s) freopen(f, m, s)
#define MZ_DELETE_FILE remove
#if defined(__WINDOWS__)
#define MZ_MKDIR(d) _mkdir(d)
#else
#define MZ_MKDIR(d) mkdir(d, 0755)
#endif
#elif defined(__USE_LARGEFILE64) /* gcc, clang */
#ifndef MINIZ_NO_TIME