2
Copyright (c) 1990-2009 Info-ZIP. All rights reserved.
4
See the accompanying file LICENSE, version 2009-Jan-02 or later
5
(the contents of which are also included in unzip.h) for terms of use.
6
If, for some reason, all these files are missing, the Info-ZIP license
7
also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
9
/*---------------------------------------------------------------------------
10
Unix specific configuration section:
11
---------------------------------------------------------------------------*/
17
/* LARGE FILE SUPPORT - 10/6/04 EG */
18
/* This needs to be set before the includes so they set the right sizes */
20
#if (defined(NO_LARGE_FILE_SUPPORT) && defined(LARGE_FILE_SUPPORT))
21
# undef LARGE_FILE_SUPPORT
24
/* Automatically set ZIP64_SUPPORT if LFS */
25
#ifdef LARGE_FILE_SUPPORT
26
# if (!defined(NO_ZIP64_SUPPORT) && !defined(ZIP64_SUPPORT))
27
# define ZIP64_SUPPORT
31
/* NO_ZIP64_SUPPORT takes preceedence over ZIP64_SUPPORT */
32
#if defined(NO_ZIP64_SUPPORT) && defined(ZIP64_SUPPORT)
36
#ifdef LARGE_FILE_SUPPORT
37
/* 64-bit Large File Support */
39
/* The following Large File Summit (LFS) defines turn on large file support
40
on Linux (probably 2.4 or later kernel) and many other unixen */
42
/* These have to be before any include that sets types so the large file
43
versions of the types are set in the includes */
45
# define _LARGEFILE_SOURCE /* some OSes need this for fseeko */
46
# define _LARGEFILE64_SOURCE
47
# define _FILE_OFFSET_BITS 64 /* select default interface as 64 bit */
48
# define _LARGE_FILES /* some OSes need this for 64-bit off_t */
49
# define __USE_LARGEFILE64
50
#endif /* LARGE_FILE_SUPPORT */
53
#include <sys/types.h> /* off_t, time_t, dev_t, ... */
62
#define ZOFF_T_DEFINED
63
typedef struct stat z_stat;
64
#define Z_STAT_DEFINED
67
# include <fcntl.h> /* O_BINARY for open() w/o CR/LF translation */
70
# include <fcntl.h> /* Coherent 4.0.x, Mark Williams C */
72
# include <sys/fcntl.h> /* Coherent 3.10, Mark Williams C */
75
# ifndef __COHERENT__ /* Coherent 4.2 has tzset() */
78
#endif /* ?COHERENT */
82
# undef NGROUPS_MAX /* SCO bug: defined again in <sys/param.h> */
85
# define TEMP_BSD /* may be defined again in <sys/param.h> */
88
# include <sys/param.h> /* conflict with <sys/types.h>, some systems? */
95
#endif /* !NO_PARAM_H */
107
# define HAVE_TERMIOS_H
109
# define timezone _timezone
114
# include <sys/time.h>
115
# include <sys/timeb.h>
116
# if (defined(_AIX) || defined(__GLIBC__) || defined(__GNU__))
121
struct tm *gmtime(), *localtime();
124
#if (defined(BSD4_4) || (defined(SYSV) && defined(MODERN)))
125
# include <unistd.h> /* this includes utime.h on SGIs */
126
# if (defined(BSD4_4) || defined(linux) || defined(__GLIBC__))
130
# if (!defined(GOT_UTIMBUF) && (defined(__hpux) || defined(__SUNPRO_C)))
134
# if (!defined(GOT_UTIMBUF) && defined(__GNU__))
139
#if (defined(__DGUX__) && !defined(GOT_UTIMBUF))
140
/* DG/UX requires this because of a non-standard struct utimebuf */
145
#if (defined(V7) || defined(pyr_bsd))
146
# define strchr index
147
# define strrchr rindex
155
#if defined(NO_UNICODE_SUPPORT) && defined(UNICODE_SUPPORT)
156
/* disable Unicode (UTF-8) support when requested */
157
# undef UNICODE_SUPPORT
160
#if (defined(_MBCS) && defined(NO_MBCS))
161
/* disable MBCS support when requested */
165
#if (!defined(NO_SETLOCALE) && !defined(_MBCS))
166
# if (!defined(UNICODE_SUPPORT) || !defined(UTF8_MAYBE_NATIVE))
167
/* enable setlocale here, unless this happens later for UTF-8 and/or
171
# define SETLOCALE(category, locale) setlocale(category, locale)
176
# if (!defined(NO_WORKING_ISPRINT) && !defined(HAVE_WORKING_ISPRINT))
177
/* enable "enhanced" unprintable chars detection in fnfilter() */
178
# define HAVE_WORKING_ISPRINT
185
#if (!defined(HAVE_STRNICMP) & !defined(NO_STRNICMP))
189
# define DATE_FORMAT DF_MDY /* GRR: customize with locale.h somehow? */
193
# define PutNativeEOL *q++ = '\n';
195
# define PutNativeEOL *q++ = native(LF);
197
#define SCREENSIZE(ttrows, ttcols) screensize(ttrows, ttcols)
198
#define SCREENWIDTH 80
199
#define SCREENLWRAP 1
200
#define USE_EF_UT_TIME
201
#if (!defined(NO_LCHOWN) || !defined(NO_LCHMOD))
202
# define SET_SYMLINK_ATTRIBS
205
# ifdef SET_DIR_ATTRIB
206
# undef SET_DIR_ATTRIB
209
# define SET_DIR_ATTRIB
210
# if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) /* GRR 970513 */
213
# define RESTORE_UIDGID
216
/* Static variables that we have to add to Uz_Globs: */
217
#define SYSTEM_SPECIFIC_GLOBALS \
218
int created_dir, renamed_fullpath;\
219
char *rootpath, *buildpath, *end;\
220
ZCONST char *wildname;\
221
char *dirname, matchname[FILNAMSIZ];\
222
int rootlen, have_dirname, dirnamelen, notfirstcall;\
225
/* created_dir, and renamed_fullpath are used by both mapname() and */
227
/* rootlen, rootpath, buildpath and end are used by checkdir(). */
228
/* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */
229
/* and notfirstcall are used by do_wild(). */
231
#endif /* !__unxcfg_h */