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
OpenVMS specific configuration section (included by unzpriv.h):
11
---------------------------------------------------------------------------*/
13
#ifndef __vmscfg_h /* Prevent (unlikely) multiple inclusions. */
16
/* Workaround for broken header files of older DECC distributions
17
* that are incompatible with the /NAMES=AS_IS qualifier. */
18
#define cma$tis_errno_get_addr CMA$TIS_ERRNO_GET_ADDR
20
/* LARGE FILE SUPPORT - 10/6/04 EG */
21
/* This needs to be set before the includes so they set the right sizes */
23
#ifdef NO_LARGE_FILE_SUPPORT
24
# ifdef LARGE_FILE_SUPPORT
25
# undef LARGE_FILE_SUPPORT
29
#ifdef LARGE_FILE_SUPPORT
31
# define _LARGEFILE /* Define the pertinent macro. */
33
/* LARGE_FILE_SUPPORT implies ZIP64_SUPPORT,
34
unless explicitly disabled by NO_ZIP64_SUPPORT.
36
# ifdef NO_ZIP64_SUPPORT
41
# ifndef ZIP64_SUPPORT
42
# define ZIP64_SUPPORT
46
#endif /* def LARGE_FILE_SUPPORT */
49
* Enable symbolic links according to the available C RTL support,
50
* unless prohibited by the user defining NO_SYMLINKS.
52
#if !defined(__VAX) && defined(__CRTL_VER) && __CRTL_VER >= 70301000
62
# include <types.h> /* GRR: experimenting... */
64
# include <time.h> /* the usual non-BSD time functions */
65
# include <file.h> /* same things as fcntl.h has */
69
/* Define maximum path length according to NAM[L] member size. */
72
# define NAM_MAXRSS NAML$C_MAXRSS
74
# define NAM_MAXRSS NAM$C_MAXRSS
78
# define _MAX_PATH (NAM_MAXRSS+1) /* to define FILNAMSIZ below */
80
# ifdef RETURN_CODES /* VMS interprets standard PK return codes incorrectly */
81
# define RETURN(ret) return_VMS(__G__ (ret)) /* verbose version */
82
# define EXIT(ret) return_VMS(__G__ (ret))
84
# define RETURN return_VMS /* quiet version */
85
# define EXIT return_VMS
88
# define USAGE(ret) VMSCLI_usage(__G__ (ret))
92
# define DIR_EXT ".dir"
93
# ifndef UZ_FNFILTER_REPLACECHAR
94
/* We use '?' instead of the single char wildcard '%' as "unprintable
95
* charcode" placeholder, because '%' is valid for ODS-5 names but '?'
96
* is invalid. This choice may allow easier detection of "unprintables"
97
* when reading the fnfilter() output.
99
# define UZ_FNFILTER_REPLACECHAR '?'
102
# define DATE_FORMAT DF_MDY
105
# define PutNativeEOL *q++ = native(LF);
106
# define SCREENSIZE(ttrows, ttcols) screensize(ttrows, ttcols)
107
# define SCREENWIDTH 80
108
# define SCREENLWRAP screenlinewrap()
109
# if (defined(__VMS_VERSION) && !defined(VMS_VERSION))
110
# define VMS_VERSION __VMS_VERSION
112
# if (defined(__VMS_VER) && !defined(__CRTL_VER))
113
# define __CRTL_VER __VMS_VER
115
# if ((!defined(__CRTL_VER)) || (__CRTL_VER < 70000000))
116
# define NO_GMTIME /* gmtime() of earlier VMS C RTLs is broken */
118
# if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))
119
# define USE_EF_UT_TIME
121
# if (!defined(HAVE_STRNICMP) && !defined(NO_STRNICMP))
122
# define HAVE_STRNICMP
126
# define STRNICMP strncasecmp
129
# ifndef HAVE_STRNICMP /* use our private zstrnicmp() */
130
# define NO_STRNICMP /* unless explicitly overridden */
132
# if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))
135
# define SET_DIR_ATTRIB
136
# define RESTORE_UIDGID
137
/* VMS is run on little-endian processors with 4-byte ints:
138
* enable the optimized CRC-32 code */
139
# ifdef IZ_CRC_BE_OPTIMIZ
140
# undef IZ_CRC_BE_OPTIMIZ
142
# if !defined(IZ_CRC_LE_OPTIMIZ) && !defined(NO_CRC_OPTIMIZ)
143
# define IZ_CRC_LE_OPTIMIZ
145
# if !defined(IZ_CRCOPTIM_UNFOLDTBL) && !defined(NO_CRC_OPTIMIZ)
146
# define IZ_CRCOPTIM_UNFOLDTBL
148
/* Enable "better" unprintable charcodes filtering in fnfilter().
149
* (On VMS, the isprint() implementation seems to detect 8-bit printable
150
* characters even for the default "C" locale. A previous localization
151
* setup by calling setlocale() is not neccessary.) */
152
# if (!defined(NO_WORKING_ISPRINT) && !defined(HAVE_WORKING_ISPRINT))
153
# define HAVE_WORKING_ISPRINT
159
typedef off_t zoff_t;
161
#define ZOFF_T_DEFINED
163
typedef struct stat z_stat;
164
#define Z_STAT_DEFINED
169
/* File open callback ID values. */
172
/* File open callback ID storage. */
175
/* File open callback function. */
178
/* Option macros for open().
179
* General: Stream access
181
* Callback function (DEC C only) sets deq, mbc, mbf, rah, wbh, ...
183
# define OPNZIP_RMS_ARGS "ctx=stm", "acc", acc_cb, &openr_id
185
#else /* !__DECC */ /* (So, GNU C, VAX C, ...)*/
187
# define OPNZIP_RMS_ARGS "ctx=stm"
191
#endif /* !__vmscfg_h */