Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

572 lines
18KB

  1. /*
  2. Copyright (c) 1990-2009 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 2009-Jan-02 or later
  4. (the contents of which are also included in unzip.h) for terms of use.
  5. If, for some reason, all these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
  7. */
  8. /*---------------------------------------------------------------------------
  9. Win32 specific configuration section:
  10. ---------------------------------------------------------------------------*/
  11. #ifndef __w32cfg_h
  12. #define __w32cfg_h
  13. #ifdef __MINGW32__
  14. # define USE_STRM_INPUT
  15. #endif
  16. #ifdef __CYGWIN__
  17. /* We treat the file system underneath the Cygwin Unix emulator environment
  18. * as "native VFAT/NTFS" and use the WIN32 API for its special attributes...
  19. */
  20. # ifdef UNIX
  21. # undef UNIX
  22. # endif
  23. #endif
  24. #if (defined(_MSC_VER) && !defined(MSC))
  25. # define MSC
  26. #endif
  27. /* enable multibyte character set support by default */
  28. #if (!defined(_MBCS) && !defined(NO_MBCS))
  29. # define _MBCS
  30. #endif
  31. #if (defined(_MBCS) && defined(NO_MBCS))
  32. # undef _MBCS
  33. #endif
  34. #if (defined(__CYGWIN__) && defined(_MBCS))
  35. # undef _MBCS /* Cygwin RTL lacks support for __mb_cur_max */
  36. #endif
  37. #if (defined(__DJGPP__) && !defined(__EMX__) && defined(_MBCS))
  38. # undef _MBCS /* __mb_cur_max missing for RSXNTdj 1.6 beta */
  39. #endif
  40. #include <sys/types.h> /* off_t, time_t, dev_t, ... */
  41. #include <sys/stat.h>
  42. #include <io.h> /* read(), open(), etc. */
  43. #include <time.h>
  44. #if ((defined(__RSXNT__) || defined(__EMX__)) && !defined(tzset))
  45. # define tzset _tzset
  46. #endif
  47. #if (defined(__LCC__) && !defined(tzset))
  48. # define tzset _tzset
  49. #endif
  50. #ifdef W32_USE_IZ_TIMEZONE
  51. # ifdef __BORLANDC__
  52. # define tzname tzname
  53. # define IZTZ_DEFINESTDGLOBALS
  54. # endif
  55. # ifdef __WATCOMC__
  56. # define IZTZ_DEFINESTDGLOBALS
  57. # endif
  58. # ifndef tzset
  59. # define tzset _tzset
  60. # endif
  61. # ifndef timezone
  62. # define timezone _timezone
  63. # endif
  64. # ifndef daylight
  65. # define daylight _daylight
  66. # endif
  67. # ifndef tzname
  68. # define tzname _tzname
  69. # endif
  70. # if (!defined(NEED__ISINDST) && !defined(__BORLANDC__))
  71. # define NEED__ISINDST
  72. # endif
  73. # ifdef IZTZ_GETLOCALETZINFO
  74. # undef IZTZ_GETLOCALETZINFO
  75. # endif
  76. # define IZTZ_GETLOCALETZINFO GetPlatformLocalTimezone
  77. #endif /* W32_USE_IZ_TIMEZONE */
  78. #include <memory.h>
  79. #if (!defined(__RSXNT__) && !defined(__CYGWIN__))
  80. # include <direct.h> /* mkdir() */
  81. #endif
  82. #include <fcntl.h>
  83. #ifdef __CYGWIN__
  84. # include <unistd.h>
  85. extern int setmode(int, int); /* this is missing in <fcntl.h> */
  86. #endif
  87. #if (defined(MSC) || defined(__WATCOMC__) || defined(__MINGW32__))
  88. # include <sys/utime.h>
  89. #else
  90. # include <utime.h>
  91. #endif
  92. #define GOT_UTIMBUF
  93. #ifdef _MBCS
  94. # if (!defined(__EMX__) && !defined(__DJGPP__) && !defined(__CYGWIN__))
  95. # if (!defined(__MINGW32__) || defined(__MSVCRT__))
  96. # include <stdlib.h>
  97. # include <mbstring.h>
  98. /* for MSC (and compatible compilers), use routines supplied by RTL */
  99. # define CLEN(ptr) _mbclen((const uch *)(ptr))
  100. # define PREINCSTR(ptr) (ptr = (char *)_mbsinc((const uch *)(ptr)))
  101. # define MBSCHR(str, c) (char *)_mbschr((const uch *)(str), (c))
  102. # define MBSRCHR(str, c) (char *)_mbsrchr((const uch *)(str), (c))
  103. # endif
  104. # endif
  105. # if (defined(__MINGW32__) && !defined(MB_CUR_MAX))
  106. # ifdef __MSVCRT__
  107. extern int *__p___mb_cur_max(void);
  108. # define MB_CUR_MAX (*__p___mb_cur_max())
  109. # else
  110. extern int *_imp____mb_cur_max_dll;
  111. # define MB_CUR_MAX (*_imp____mb_cur_max_dll)
  112. # endif
  113. # endif
  114. # if (defined(__LCC__) && !defined(MB_CUR_MAX))
  115. extern int *_imp____mb_cur_max;
  116. # define MB_CUR_MAX (*_imp____mb_cur_max)
  117. # endif
  118. # if (defined(__DJGPP__) && !defined(__EMX__) && !defined(MB_CUR_MAX))
  119. extern int *_imp____mb_cur_max;
  120. # define MB_CUR_MAX (*_imp____mb_cur_max)
  121. # endif
  122. #endif
  123. /* for UnZip, the "basic" part of the win32 api is sufficient */
  124. #ifndef WIN32_LEAN_AND_MEAN
  125. # define WIN32_LEAN_AND_MEAN
  126. #endif
  127. #if defined(__FILEIO_C)
  128. # ifndef __CYGWIN__
  129. # include <conio.h>
  130. # endif
  131. # include <windows.h>
  132. # ifdef __RSXNT__
  133. # include "../win32/rsxntwin.h"
  134. # endif
  135. # ifndef TIME_ZONE_ID_INVALID
  136. # define TIME_ZONE_ID_INVALID (DWORD)0xFFFFFFFFL
  137. # endif
  138. #endif
  139. #if (defined(__ENVARGS_C) || defined(__EXTRACT_C) || defined(__UNZIP_C) || \
  140. defined(ZCRYPT_INTERNAL))
  141. # include <windows.h>
  142. # ifdef __RSXNT__
  143. # include "../win32/rsxntwin.h"
  144. # endif
  145. # ifndef TIME_ZONE_ID_INVALID
  146. # define TIME_ZONE_ID_INVALID (DWORD)0xFFFFFFFFL
  147. # endif
  148. #endif
  149. #ifndef Cdecl
  150. # define Cdecl __cdecl
  151. #endif
  152. /* the following definitions are considered as "obsolete" by Microsoft and
  153. * might be missing in some versions of <windows.h>
  154. */
  155. #ifndef AnsiToOem
  156. # define AnsiToOem CharToOemA
  157. #endif
  158. #ifndef OemToAnsi
  159. # define OemToAnsi OemToCharA
  160. #endif
  161. #define DIR_END '\\' /* OS uses '\\' as directory separator */
  162. #define DIR_END2 '/' /* also check for '/' (RTL may convert) */
  163. #ifdef DATE_FORMAT
  164. # undef DATE_FORMAT
  165. #endif
  166. #define DATE_FORMAT dateformat()
  167. #ifdef DATE_SEPCHAR
  168. # undef DATE_SEPCHAR
  169. #endif
  170. #define DATE_SEPCHAR dateseparator()
  171. #define lenEOL 2
  172. #define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);}
  173. #if (defined(__RSXNT__) && !defined(HAVE_MKTIME))
  174. # define HAVE_MKTIME /* use mktime() in time conversion routines */
  175. #endif
  176. #if (defined(MSC) && !defined(HAVE_MKTIME))
  177. # define HAVE_MKTIME /* use mktime() in time conversion routines */
  178. #endif
  179. #if (defined(__CYGWIN__) && defined(HAVE_MKTIME))
  180. # undef HAVE_MKTIME /* Cygnus' mktime() implementation is buggy */
  181. #endif
  182. #if (defined(W32_USE_IZ_TIMEZONE) && !defined(HAVE_MKTIME))
  183. # define HAVE_MKTIME /* use mktime() in time conversion routines */
  184. #endif
  185. #if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))
  186. # define USE_EF_UT_TIME
  187. #endif
  188. #if (!defined(NO_DIR_ATTRIB) && !defined(SET_DIR_ATTRIB))
  189. # define SET_DIR_ATTRIB
  190. #endif
  191. #if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))
  192. # define TIMESTAMP
  193. #endif
  194. #if (!defined(NO_NTSD_EAS) && !defined(NTSD_EAS))
  195. # define NTSD_EAS /* enable NTSD support unless explicitly suppressed */
  196. #endif
  197. #if (defined(NTSD_EAS) && !defined(RESTORE_ACL))
  198. # define RESTORE_ACL /* "restore ACLs" only needed when NTSD_EAS active */
  199. #endif
  200. #if (!defined(NO_UNICODE_SUPPORT) && !defined(UNICODE_SUPPORT))
  201. # define UNICODE_SUPPORT /* enable UTF-8 filename support by default */
  202. #endif
  203. #if (defined(UNICODE_SUPPORT) && !defined(UNICODE_WCHAR))
  204. # define UNICODE_WCHAR /* wchar_t is UTF-16 encoded on WIN32 */
  205. #endif
  206. #ifdef UTF8_MAYBE_NATIVE
  207. # undef UTF8_MAYBE_NATIVE /* UTF-8 cannot be system charset on WIN32 */
  208. #endif
  209. /* The following compiler systems provide or use a runtime library with a
  210. * locale-aware isprint() implementation. For these systems, the "enhanced"
  211. * unprintable charcode detection in fnfilter() gets enabled.
  212. */
  213. #if (!defined(HAVE_WORKING_ISPRINT) && !defined(NO_WORKING_ISPRINT))
  214. # if defined(MSC) || defined(__BORLANDC__)
  215. # define HAVE_WORKING_ISPRINT
  216. # endif
  217. # if defined(__MINGW32__) && defined(__MSVCRT__)
  218. # define HAVE_WORKING_ISPRINT
  219. # endif
  220. #endif
  221. /* WIN32 runs solely on little-endian processors; enable support
  222. * for the 32-bit optimized CRC-32 C code by default.
  223. */
  224. #ifdef IZ_CRC_BE_OPTIMIZ
  225. # undef IZ_CRC_BE_OPTIMIZ
  226. #endif
  227. #if !defined(IZ_CRC_LE_OPTIMIZ) && !defined(NO_CRC_OPTIMIZ)
  228. # define IZ_CRC_LE_OPTIMIZ
  229. #endif
  230. /* handlers for OEM <--> ANSI string conversions */
  231. #ifdef __RSXNT__
  232. /* RSXNT uses OEM coded strings in functions supplied by C RTL */
  233. # ifdef CRTL_CP_IS_ISO
  234. # undef CRTL_CP_IS_ISO
  235. # endif
  236. # ifndef CRTL_CP_IS_OEM
  237. # define CRTL_CP_IS_OEM
  238. # endif
  239. #else
  240. /* "real" native WIN32 compilers use ANSI coded strings in C RTL calls */
  241. # ifndef CRTL_CP_IS_ISO
  242. # define CRTL_CP_IS_ISO
  243. # endif
  244. # ifdef CRTL_CP_IS_OEM
  245. # undef CRTL_CP_IS_OEM
  246. # endif
  247. #endif
  248. #ifdef CRTL_CP_IS_ISO
  249. /* C RTL's file system support assumes ANSI coded strings */
  250. # define ISO_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));}
  251. # define OEM_TO_INTERN(src, dst) OemToAnsi(src, dst)
  252. # define INTERN_TO_ISO(src, dst) {if ((src) != (dst)) strcpy((dst), (src));}
  253. # define INTERN_TO_OEM(src, dst) AnsiToOem(src, dst)
  254. #endif /* CRTL_CP_IS_ISO */
  255. #ifdef CRTL_CP_IS_OEM
  256. /* C RTL's file system support assumes OEM coded strings */
  257. # define ISO_TO_INTERN(src, dst) AnsiToOem(src, dst)
  258. # define OEM_TO_INTERN(src, dst) {if ((src) != (dst)) strcpy((dst), (src));}
  259. # define INTERN_TO_ISO(src, dst) OemToAnsi(src, dst)
  260. # define INTERN_TO_OEM(src, dst) {if ((src) != (dst)) strcpy((dst), (src));}
  261. #endif /* CRTL_CP_IS_OEM */
  262. #define _OEM_INTERN(str1) OEM_TO_INTERN(str1, str1)
  263. #define _ISO_INTERN(str1) ISO_TO_INTERN(str1, str1)
  264. #ifndef WINDLL
  265. /* Despite best intentions, for the command-line version UzpPassword()
  266. * could return either character set, depending on whether running under
  267. * Win95 (DOS-session) or WinNT (native WinNT command interpreter)! */
  268. # define STR_TO_CP2(dst, src) (AnsiToOem(src, dst), dst)
  269. # define STR_TO_CP3(dst, src) (OemToAnsi(src, dst), dst)
  270. #else
  271. /* The WINDLL front end is known to supply ISO/ANSI-coded passwords! */
  272. # define STR_TO_CP2(dst, src) (AnsiToOem(src, dst), dst)
  273. #endif
  274. /* dummy defines to disable these functions, they are not needed */
  275. #define STR_TO_OEM
  276. #define STR_TO_ISO
  277. /* Static variables that we have to add to Uz_Globs: */
  278. #define SYSTEM_SPECIFIC_GLOBALS \
  279. int created_dir, renamed_fullpath, fnlen;\
  280. unsigned nLabelDrive;\
  281. char lastRootPath[4];\
  282. int lastVolOldFAT, lastVolLocTim;\
  283. char *rootpath, *buildpathHPFS, *buildpathFAT, *endHPFS, *endFAT;\
  284. ZCONST char *wildname;\
  285. char *dirname, matchname[FILNAMSIZ];\
  286. int rootlen, have_dirname, dirnamelen, notfirstcall;\
  287. zvoid *wild_dir;
  288. /* created_dir, renamed_fullpath, fnlen, and nLabelDrive are used by */
  289. /* both mapname() and checkdir(). */
  290. /* lastRootPath, lastVolOldFAT and lastVolLocTim are used by */
  291. /* IsVolumeOldFAT() and NTQueryVolInfo(). */
  292. /* rootlen, rootpath, buildpathHPFS, buildpathFAT, endHPFS, and endFAT */
  293. /* are used by checkdir(). */
  294. /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */
  295. /* and notfirstcall are used by do_wild(). */
  296. /* This replacement for C-RTL-supplied getch() (or similar) functionality
  297. * avoids leaving unabsorbed LFs in the keyboard buffer under Windows95,
  298. * and supports the <ALT>+[0]<digit><digit><digit> feature.
  299. */
  300. int getch_win32 OF((void));
  301. /* Up to now, all versions of Microsoft C runtime libraries lack the support
  302. * for customized (non-US) switching rules between daylight saving time and
  303. * standard time in the TZ environment variable string.
  304. * But non-US timezone rules are correctly supported when timezone information
  305. * is read from the OS system settings in the Win32 registry.
  306. * The following work-around deletes any TZ environment setting from
  307. * the process environment. This results in a fallback of the RTL time
  308. * handling code to the (correctly interpretable) OS system settings, read
  309. * from the registry.
  310. */
  311. #ifdef USE_EF_UT_TIME
  312. # if (defined(__WATCOMC__) || defined(__CYGWIN__) || \
  313. defined(W32_USE_IZ_TIMEZONE))
  314. # define iz_w32_prepareTZenv()
  315. # else
  316. # define iz_w32_prepareTZenv() putenv("TZ=")
  317. # endif
  318. #endif
  319. /* This patch of stat() is useful for at least two compilers. It is */
  320. /* difficult to take a stat() of a root directory under Windows95, so */
  321. /* zstat_win32() detects that case and fills in suitable values. */
  322. #ifndef __RSXNT__
  323. # ifndef W32_STATROOT_FIX
  324. # define W32_STATROOT_FIX
  325. # endif
  326. #endif /* !__RSXNT__ */
  327. #define W32_STAT_BANDAID
  328. #if defined(REENTRANT)
  329. # define __W32STAT_GLOBALS__ Uz_Globs *pG,
  330. # define __W32STAT_G__ pG,
  331. #else
  332. # define __W32STAT_GLOBALS__
  333. # define __W32STAT_G__
  334. #endif
  335. #ifdef SSTAT
  336. # undef SSTAT
  337. #endif
  338. #ifdef WILD_STAT_BUG
  339. # define SSTAT(path, pbuf) (iswild(path) || zstat_win32(__W32STAT_G__ path, pbuf))
  340. #else
  341. # define SSTAT(path, pbuf) zstat_win32(__W32STAT_G__ path, pbuf)
  342. #endif
  343. #ifdef __WATCOMC__
  344. # ifdef __386__
  345. # ifndef WATCOMC_386
  346. # define WATCOMC_386
  347. # endif
  348. # define __32BIT__
  349. # undef far
  350. # define far
  351. # undef near
  352. # define near
  353. # undef Cdecl
  354. # define Cdecl
  355. /* gaah -- Watcom's docs claim that _get_osfhandle exists, but it doesn't. */
  356. # define _get_osfhandle _os_handle
  357. /* Get asm routines to link properly without using "__cdecl": */
  358. # ifndef USE_ZLIB
  359. # pragma aux crc32 "_*" parm caller [] value [eax] modify [eax]
  360. # pragma aux get_crc_table "_*" parm caller [] value [eax] \
  361. modify [eax ecx edx]
  362. # endif /* !USE_ZLIB */
  363. # endif /* __386__ */
  364. #endif /* __WATCOMC__ */
  365. #define SCREENWIDTH 80
  366. #define SCREENSIZE(scrrows, scrcols) screensize(scrrows, scrcols)
  367. int screensize(int *tt_rows, int *tt_cols);
  368. /* on the DOS or NT console screen, line-wraps are always enabled */
  369. #define SCREENLWRAP 1
  370. #define TABSIZE 8
  371. /* 64-bit-Integers & Large File Support
  372. * (pasted here from Zip 3b, osdep.h - Myles Bennett 7-jun-2004)
  373. * (updated from Zip 3.0d - Ed Gordon 6-oct-2004)
  374. *
  375. * If this is set it is assumed that the port
  376. * supports 64-bit file calls. The types are
  377. * defined here. Any local implementations are
  378. * in w32i64.c and the prototypes for the calls are
  379. * in unzip.h. Note that a port must support
  380. * these calls fully or should not set
  381. * LARGE_FILE_SUPPORT.
  382. */
  383. /* Automatically set ZIP64_SUPPORT if supported */
  384. #ifndef NO_ZIP64_SUPPORT
  385. # ifndef ZIP64_SUPPORT
  386. # if defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__)
  387. # define ZIP64_SUPPORT
  388. # elif defined(__LCC__)
  389. /* LCC links against crtdll.dll -> no support of 64-bit offsets :( */
  390. # elif (defined(__WATCOMC__) && (__WATCOMC__ >= 1100))
  391. # define ZIP64_SUPPORT
  392. # elif (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520))
  393. /* Borland C RTL lacks any support to get/set 64-bit file pointer :( */
  394. # endif
  395. # endif
  396. #endif
  397. #ifdef ZIP64_SUPPORT
  398. /* base type for file offsets and file sizes */
  399. # if (defined(__GNUC__) || defined(ULONG_LONG_MAX))
  400. typedef long long zoff_t;
  401. # else
  402. /* all other compilers use this as intrinsic 64-bit type */
  403. typedef __int64 zoff_t;
  404. # endif
  405. # define ZOFF_T_DEFINED
  406. /* user-defined types and format strings for 64-bit numbers and
  407. * file pointer functions (these depend on the rtl library and library
  408. * headers used; they are NOT compiler-specific)
  409. */
  410. # if defined(_MSC_VER) || defined(__MINGW32__) || defined(__LCC__)
  411. /* MS C and VC, MinGW32, lcc32 */
  412. /* these systems use the Microsoft C RTL */
  413. /* 64-bit stat struct */
  414. typedef struct _stati64 z_stat;
  415. # define Z_STAT_DEFINED
  416. # ifdef __LCC__
  417. /* The LCC headers lack these declarations of MSC rtl functions in
  418. sys/stat.h. */
  419. struct _stati64 {
  420. unsigned int st_dev;
  421. unsigned short st_ino;
  422. unsigned short st_mode;
  423. short st_nlink;
  424. short st_uid;
  425. short st_gid;
  426. unsigned int st_rdev;
  427. __int64 st_size;
  428. time_t st_atime;
  429. time_t st_mtime;
  430. time_t st_ctime;
  431. };
  432. int _stati64(const char *, struct _stati64 *);
  433. int _fstati64(int, struct _stati64 *);
  434. __int64 _lseeki64(int, __int64, int);
  435. # endif /* __LCC__ */
  436. /* printf format size prefix for zoff_t values */
  437. # define FZOFFT_FMT "I64"
  438. # define FZOFFT_HEX_WID_VALUE "16"
  439. # define SHORTHDRSTATS "%9I64u %02u%c%02u%c%02u %02u:%02u %c"
  440. # define SHORTFILETRAILER " -------- -------\n%9I64u %9lu file%s\n"
  441. # elif (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520))
  442. /* Borland C 5.2 or newer */
  443. /* 64-bit stat struct */
  444. typedef struct stati64 z_stat;
  445. # define Z_STAT_DEFINED
  446. /* Borland C does not provide a 64-bit-capable _lseeki64(), so we
  447. need to use the stdio.h stream functions instead. */
  448. # ifndef USE_STRM_INPUT
  449. # define USE_STRM_INPUT
  450. # endif
  451. /* printf format size prefix for zoff_t values */
  452. # define FZOFFT_FMT "L"
  453. # define FZOFFT_HEX_WID_VALUE "16"
  454. # define SHORTHDRSTATS "%9Lu %02u%c%02u%c%02u %02u:%02u %c"
  455. # define SHORTFILETRAILER " -------- -------\n%9Lu %9lu file%s\n"
  456. # elif (defined(__WATCOMC__) && (__WATCOMC__ >= 1100))
  457. /* WATCOM C */
  458. /* 64-bit stat struct */
  459. typedef struct _stati64 z_stat;
  460. # define Z_STAT_DEFINED
  461. /* printf format size prefix for zoff_t values */
  462. # define FZOFFT_FMT "ll"
  463. # define FZOFFT_HEX_WID_VALUE "16"
  464. # define SHORTHDRSTATS "%9llu %02u%c%02u%c%02u %02u:%02u %c"
  465. # define SHORTFILETRAILER " -------- -------\n%9llu %9lu file%s\n"
  466. # elif (defined(__IBMC__) && (__IBMC__ >= 350))
  467. /* IBM C */
  468. /* 64-bit stat struct */
  469. /* printf format size prefix for zoff_t values */
  470. # define FZOFFT_FMT "I64"
  471. # define FZOFFT_HEX_WID_VALUE "16"
  472. # define SHORTHDRSTATS "%9I64u %02u%c%02u%c%02u %02u:%02u %c"
  473. # define SHORTFILETRAILER " -------- -------\n%9I64u %9lu file%s\n"
  474. # endif
  475. #endif
  476. /* If port has LARGE_FILE_SUPPORT then define here
  477. to make automatic unless overridden */
  478. #ifndef LARGE_FILE_SUPPORT
  479. # ifndef NO_LARGE_FILE_SUPPORT
  480. # if defined(_MSC_VER) || defined(__MINGW32__)
  481. # define LARGE_FILE_SUPPORT
  482. # elif defined(__LCC__)
  483. /* LCC links against crtdll.dll -> no support of 64-bit offsets :( */
  484. # elif defined(__CYGWIN__)
  485. # define LARGE_FILE_SUPPORT
  486. # elif (defined(__WATCOMC__) && (__WATCOMC__ >= 1100))
  487. # define LARGE_FILE_SUPPORT
  488. # elif (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520))
  489. /* Borland C RTL lacks any support to get/set 64-bit file pointer :( */
  490. # endif
  491. # endif
  492. #endif
  493. #ifndef LARGE_FILE_SUPPORT
  494. /* No Large File Support */
  495. /* base type for file offsets and file sizes */
  496. typedef long zoff_t;
  497. # define ZOFF_T_DEFINED
  498. /* stat struct */
  499. typedef struct stat z_stat;
  500. # define Z_STAT_DEFINED
  501. # define FZOFFT_FMT "l"
  502. # define FZOFFT_HEX_WID_VALUE "8"
  503. # define SHORTHDRSTATS "%9lu %02u%c%02u%c%02u %02u:%02u %c"
  504. # define SHORTFILETRAILER " -------- -------\n%9lu %9lu file%s\n"
  505. #endif /* LARGE_FILE_SUPPORT */
  506. #endif /* !__w32cfg_h */