4
0
mirror of https://github.com/QuasarApp/zip.git synced 2025-05-06 09:09:33 +00:00

fix ftruncate for tcc on Windows ()

* fix ftruncate for tcc on Windows

* Update zip.c
This commit is contained in:
Dialga 2022-06-04 08:29:37 +12:00 committed by GitHub
parent 4f23190324
commit 55b5d810b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -46,6 +46,13 @@
#define fileno _fileno
#endif
#if defined(__TINYC__) && (defined(_WIN32) || defined(_WIN64))
#include <io.h>
#define ftruncate(fd, sz) (-(_chsize_s((fd), (sz)) != 0))
#define fileno _fileno
#endif
#ifndef HAS_DEVICE
#define HAS_DEVICE(P) 0
#endif