Merge pull request #240 from AMDmi3/freebsd
Fix compatibility with FreeBSD and improve readability in miniz_zip.c
This commit is contained in:
commit
be92575500
@ -96,6 +96,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
|
||||
#define MZ_FFLUSH fflush
|
||||
#define MZ_FREOPEN mz_freopen
|
||||
#define MZ_DELETE_FILE remove
|
||||
|
||||
#elif defined(__MINGW32__) || defined(__WATCOMC__)
|
||||
#ifndef MINIZ_NO_TIME
|
||||
#include <sys/utime.h>
|
||||
@ -111,6 +112,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
|
||||
#define MZ_FFLUSH fflush
|
||||
#define MZ_FREOPEN(f, m, s) freopen(f, m, s)
|
||||
#define MZ_DELETE_FILE remove
|
||||
|
||||
#elif defined(__TINYC__)
|
||||
#ifndef MINIZ_NO_TIME
|
||||
#include <sys/utime.h>
|
||||
@ -126,6 +128,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
|
||||
#define MZ_FFLUSH fflush
|
||||
#define MZ_FREOPEN(f, m, s) freopen(f, m, s)
|
||||
#define MZ_DELETE_FILE remove
|
||||
|
||||
#elif defined(__USE_LARGEFILE64) /* gcc, clang */
|
||||
#ifndef MINIZ_NO_TIME
|
||||
#include <utime.h>
|
||||
@ -141,7 +144,8 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
|
||||
#define MZ_FFLUSH fflush
|
||||
#define MZ_FREOPEN(p, m, s) freopen64(p, m, s)
|
||||
#define MZ_DELETE_FILE remove
|
||||
#elif defined(__APPLE__)
|
||||
|
||||
#elif defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#ifndef MINIZ_NO_TIME
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user