File: vmscfg.h

package info (click to toggle)
unzip 6.0-16%2Bdeb8u3
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 8,768 kB
  • ctags: 10,194
  • sloc: ansic: 55,133; cpp: 4,084; makefile: 2,517; asm: 1,789; cs: 1,012; sh: 119
file content (191 lines) | stat: -rw-r--r-- 5,894 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/*
  Copyright (c) 1990-2009 Info-ZIP.  All rights reserved.

  See the accompanying file LICENSE, version 2009-Jan-02 or later
  (the contents of which are also included in unzip.h) for terms of use.
  If, for some reason, all these files are missing, the Info-ZIP license
  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
*/
/*---------------------------------------------------------------------------
    OpenVMS specific configuration section (included by unzpriv.h):
  ---------------------------------------------------------------------------*/

#ifndef __vmscfg_h   /* Prevent (unlikely) multiple inclusions. */
#define __vmscfg_h

/* Workaround for broken header files of older DECC distributions
 * that are incompatible with the /NAMES=AS_IS qualifier. */
#define cma$tis_errno_get_addr CMA$TIS_ERRNO_GET_ADDR

/* LARGE FILE SUPPORT - 10/6/04 EG */
/* This needs to be set before the includes so they set the right sizes */

#ifdef NO_LARGE_FILE_SUPPORT
# ifdef LARGE_FILE_SUPPORT
#  undef LARGE_FILE_SUPPORT
# endif
#endif

#ifdef LARGE_FILE_SUPPORT

# define _LARGEFILE             /* Define the pertinent macro. */

/* LARGE_FILE_SUPPORT implies ZIP64_SUPPORT,
   unless explicitly disabled by NO_ZIP64_SUPPORT.
*/
#  ifdef NO_ZIP64_SUPPORT
#    ifdef ZIP64_SUPPORT
#      undef ZIP64_SUPPORT
#    endif
#  else
#    ifndef ZIP64_SUPPORT
#      define ZIP64_SUPPORT
#    endif
#  endif

#endif /* def LARGE_FILE_SUPPORT */

/* 2007-02-22 SMS.
 * Enable symbolic links according to the available C RTL support,
 * unless prohibited by the user defining NO_SYMLINKS.
 */
#if !defined(__VAX) && defined(__CRTL_VER) && __CRTL_VER >= 70301000
#  ifndef NO_SYMLINKS
#     define SYMLINKS
#  endif
#endif

#ifdef SYMLINKS
#  include <unistd.h>
#endif

#  include <types.h>                    /* GRR:  experimenting... */
#  include <stat.h>
#  include <time.h>                     /* the usual non-BSD time functions */
#  include <file.h>                     /* same things as fcntl.h has */
#  include <unixio.h>
#  include <rms.h>

/* Define maximum path length according to NAM[L] member size. */
#  ifndef NAM_MAXRSS
#    ifdef NAML$C_MAXRSS
#      define NAM_MAXRSS NAML$C_MAXRSS
#    else
#      define NAM_MAXRSS NAM$C_MAXRSS
#    endif
#  endif

#  define _MAX_PATH (NAM_MAXRSS+1)      /* to define FILNAMSIZ below */

#  ifdef RETURN_CODES  /* VMS interprets standard PK return codes incorrectly */
#    define RETURN(ret) return_VMS(__G__ (ret))   /* verbose version */
#    define EXIT(ret)   return_VMS(__G__ (ret))
#  else
#    define RETURN      return_VMS                /* quiet version */
#    define EXIT        return_VMS
#  endif
#  ifdef VMSCLI
#    define USAGE(ret)  VMSCLI_usage(__G__ (ret))
#  endif
#  define DIR_BEG       '['
#  define DIR_END       ']'
#  define DIR_EXT       ".dir"
#  ifndef UZ_FNFILTER_REPLACECHAR
     /* We use '?' instead of the single char wildcard '%' as "unprintable
      * charcode" placeholder, because '%' is valid for ODS-5 names but '?'
      * is invalid. This choice may allow easier detection of "unprintables"
      * when reading the fnfilter() output.
      */
#    define UZ_FNFILTER_REPLACECHAR  '?'
#  endif
#  ifndef DATE_FORMAT
#    define DATE_FORMAT DF_MDY
#  endif
#  define lenEOL        1
#  define PutNativeEOL  *q++ = native(LF);
#  define SCREENSIZE(ttrows, ttcols)  screensize(ttrows, ttcols)
#  define SCREENWIDTH   80
#  define SCREENLWRAP   screenlinewrap()
#  if (defined(__VMS_VERSION) && !defined(VMS_VERSION))
#    define VMS_VERSION __VMS_VERSION
#  endif
#  if (defined(__VMS_VER) && !defined(__CRTL_VER))
#    define __CRTL_VER __VMS_VER
#  endif
#  if ((!defined(__CRTL_VER)) || (__CRTL_VER < 70000000))
#    define NO_GMTIME           /* gmtime() of earlier VMS C RTLs is broken */
#  else
#    if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))
#      define USE_EF_UT_TIME
#    endif
#    if (!defined(HAVE_STRNICMP) && !defined(NO_STRNICMP))
#      define HAVE_STRNICMP
#      ifdef STRNICMP
#        undef STRNICMP
#      endif
#      define STRNICMP  strncasecmp
#    endif
#  endif
#  ifndef HAVE_STRNICMP                 /* use our private zstrnicmp() */
#    define NO_STRNICMP                 /*  unless explicitly overridden */
#  endif
#  if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))
#    define TIMESTAMP
#  endif
#  define SET_DIR_ATTRIB
#  define RESTORE_UIDGID
   /* VMS is run on little-endian processors with 4-byte ints:
    * enable the optimized CRC-32 code */
#  ifdef IZ_CRC_BE_OPTIMIZ
#    undef IZ_CRC_BE_OPTIMIZ
#  endif
#  if !defined(IZ_CRC_LE_OPTIMIZ) && !defined(NO_CRC_OPTIMIZ)
#    define IZ_CRC_LE_OPTIMIZ
#  endif
#  if !defined(IZ_CRCOPTIM_UNFOLDTBL) && !defined(NO_CRC_OPTIMIZ)
#    define IZ_CRCOPTIM_UNFOLDTBL
#  endif
   /* Enable "better" unprintable charcodes filtering in fnfilter().
    * (On VMS, the isprint() implementation seems to detect 8-bit printable
    * characters even for the default "C" locale. A previous localization
    * setup by calling setlocale() is not neccessary.) */
#  if (!defined(NO_WORKING_ISPRINT) && !defined(HAVE_WORKING_ISPRINT))
#    define HAVE_WORKING_ISPRINT
#  endif

#ifdef NO_OFF_T
  typedef long zoff_t;
#else
  typedef off_t zoff_t;
#endif
#define ZOFF_T_DEFINED

typedef struct stat z_stat;
#define Z_STAT_DEFINED


#ifdef __DECC

    /* File open callback ID values. */
#   define OPENR_ID 1

    /* File open callback ID storage. */
    extern int openr_id;

    /* File open callback function. */
    extern int acc_cb();

    /* Option macros for open().
     * General: Stream access
     *
     * Callback function (DEC C only) sets deq, mbc, mbf, rah, wbh, ...
     */
#   define OPNZIP_RMS_ARGS "ctx=stm", "acc", acc_cb, &openr_id

#else /* !__DECC */ /* (So, GNU C, VAX C, ...)*/

#   define OPNZIP_RMS_ARGS "ctx=stm"

#endif /* ?__DECC */

#endif /* !__vmscfg_h */