mirror of
https://github.com/QuasarApp/zip.git
synced 2025-05-06 09:09:33 +00:00
fix ftruncate for tcc on Windows (#260)
* fix ftruncate for tcc on Windows * Update zip.c
This commit is contained in:
parent
4f23190324
commit
55b5d810b5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user