00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #if defined(_MSC_VER) || (defined(M_I86) && !defined(__WATCOMC__))
00013 # ifndef MSC
00014 # define MSC
00015 # endif
00016 #endif
00017
00018 #if defined(__WATCOMC__) && defined(__386__)
00019 # define WATCOMC_386
00020 #endif
00021
00022 #if (defined(__CYGWIN32__) && !defined(__CYGWIN__))
00023 # define __CYGWIN__
00024 #endif
00025
00026
00027 #ifndef _MBCS
00028 # define _MBCS
00029 #endif
00030 #if defined(__CYGWIN__)
00031 # undef _MBCS
00032 #endif
00033
00034 #ifndef MSDOS
00035
00036
00037
00038
00039
00040
00041
00042 # define MSDOS
00043
00044 #endif
00045
00046 #define USE_CASE_MAP
00047 #define PROCNAME(n) (action == ADD || action == UPDATE ? wild(n) : \
00048 procname(n, 1))
00049 #define BROKEN_FSEEK
00050 #ifndef __RSXNT__
00051 # define HAVE_FSEEKABLE
00052 #endif
00053
00054
00055
00056
00057
00058 #define FOPR "rb"
00059 #define FOPM "r+b"
00060 #define FOPW "wbS"
00061
00062 #if (defined(__CYGWIN__) && !defined(NO_MKTIME))
00063 # define NO_MKTIME
00064 #endif
00065 #if (!defined(NT_TZBUG_WORKAROUND) && !defined(NO_NT_TZBUG_WORKAROUND))
00066 # define NT_TZBUG_WORKAROUND
00067 #endif
00068 #if (defined(UTIL) && defined(NT_TZBUG_WORKAROUND))
00069 # undef NT_TZBUG_WORKAROUND
00070 #endif
00071 #if !defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)
00072 # define USE_EF_UT_TIME
00073 #endif
00074 #if (!defined(NO_NTSD_EAS) && !defined(NTSD_EAS))
00075 # define NTSD_EAS
00076 #endif
00077
00078 #if (defined(NTSD_EAS) && !defined(ZP_NEED_MEMCOMPR))
00079 # define ZP_NEED_MEMCOMPR
00080 #endif
00081
00082 #ifdef WINDLL
00083 # ifndef NO_ASM
00084 # define NO_ASM
00085 # endif
00086 # ifndef MSWIN
00087 # define MSWIN
00088 # endif
00089 # ifndef REENTRANT
00090 # define REENTRANT
00091 # endif
00092 #endif
00093
00094
00095
00096 #if !defined(NO_ASM) && !defined(ASMV)
00097 # define ASMV
00098 #endif
00099
00100 #if !defined(__GO32__) && !defined(__EMX__) && !defined(__CYGWIN__)
00101 # define NO_UNISTD_H
00102 #endif
00103
00104
00105
00106
00107 #ifndef AnsiToOem
00108 # define AnsiToOem CharToOemA
00109 #endif
00110 #ifndef OemToAnsi
00111 # define OemToAnsi OemToCharA
00112 #endif
00113
00114 #if (defined(__RSXNT__) && defined(__CRTRSXNT__))
00115 # include <crtrsxnt.h>
00116 #endif
00117
00118
00119 #include <sys/types.h>
00120 #include <sys/stat.h>
00121 #include <io.h>
00122 #ifdef _MBCS
00123 # if (!defined(__EMX__) && !defined(__MINGW32__) && !defined(__CYGWIN__))
00124 # include <stdlib.h>
00125 # include <mbstring.h>
00126 # endif
00127 # if (defined(__MINGW32__) && !defined(MB_CUR_MAX))
00128 # ifdef __MSVCRT__
00129 extern int *__p___mb_cur_max(void);
00130 # define MB_CUR_MAX (*__p___mb_cur_max())
00131 # else
00132 extern int *_imp____mb_cur_max_dll;
00133 # define MB_CUR_MAX (*_imp____mb_cur_max_dll)
00134 # endif
00135 # endif
00136 # if (defined(__LCC__) && !defined(MB_CUR_MAX))
00137 extern int *_imp____mb_cur_max;
00138 # define MB_CUR_MAX (*_imp____mb_cur_max)
00139 # endif
00140 #endif
00141
00142 #ifdef __LCC__
00143 # include <time.h>
00144 #endif
00145 #if (defined(__RSXNT__) || defined(__EMX__)) && !defined(tzset)
00146 # define tzset _tzset
00147 #endif
00148 #ifdef __MINGW32__
00149 extern void _tzset(void);
00150 # ifndef tzset
00151 # define tzset _tzset
00152 # endif
00153 #endif
00154
00155 #ifdef MATCH
00156 # undef MATCH
00157 #endif
00158 #define MATCH dosmatch
00159
00160 #ifdef ZCRYPT_INTERNAL
00161 # ifdef WINDLL
00162 # define ZCR_SEED2 (unsigned)3141592654L
00163 # else
00164 # include <process.h>
00165 # endif
00166 #endif
00167
00168
00169
00170
00171 #ifndef __RSXNT__
00172 # ifndef W32_STATROOT_FIX
00173 # define W32_STATROOT_FIX
00174 # endif
00175 #endif
00176
00177 #if (defined(NT_TZBUG_WORKAROUND) || defined(W32_STATROOT_FIX))
00178 # define W32_STAT_BANDAID
00179 int zstat_zipwin32(const char *path, struct stat *buf);
00180 # ifdef SSTAT
00181 # undef SSTAT
00182 # endif
00183 # define SSTAT zstat_zipwin32
00184 #endif
00185
00186 int getch_win32(void);
00187
00188 #ifdef __GNUC__
00189 # define IZ_PACKED __attribute__((packed))
00190 #else
00191 # define IZ_PACKED
00192 #endif
00193
00194
00195 #ifndef S_IFMT
00196 # define S_IFMT 0xF000
00197 #endif
00198
00199 #ifdef __WATCOMC__
00200 # include <stdio.h>
00201 # define NO_MKTEMP
00202
00203
00204 # ifdef __386__
00205 # ifdef ASMV
00206 # pragma aux match_init "_*" parm caller [] modify []
00207 # pragma aux longest_match "_*" parm caller [] value [eax] \
00208 modify [eax ecx edx]
00209 # endif
00210 # if defined(ASM_CRC) && !defined(USE_ZLIB)
00211 # pragma aux crc32 "_*" parm caller [] value [eax] modify [eax]
00212 # pragma aux get_crc_table "_*" parm caller [] value [eax] \
00213 modify [eax ecx edx]
00214 # endif
00215 # endif
00216 #endif