| 1 |
/* |
| 2 |
Copyright (c) 1990-1999 Info-ZIP. All rights reserved. |
| 3 |
|
| 4 |
See the accompanying file LICENSE, version 1999-Oct-05 or later |
| 5 |
(the contents of which are also included in zip.h) for terms of use. |
| 6 |
If, for some reason, both of these files are missing, the Info-ZIP license |
| 7 |
also may be found at: ftp://ftp.cdrom.com/pub/infozip/license.html |
| 8 |
*/ |
| 9 |
/* Include file for VM/CMS and MVS */ |
| 10 |
|
| 11 |
/* This is normally named osdep.h on most systems. Since CMS */ |
| 12 |
/* generally doesn't support directories, it's been given a unique */ |
| 13 |
/* name to avoid confusion. */ |
| 14 |
|
| 15 |
|
| 16 |
#ifndef __cmsmvs_h /* prevent multiple inclusions */ |
| 17 |
#define __cmsmvs_h |
| 18 |
|
| 19 |
#ifdef MVS |
| 20 |
# define _POSIX_SOURCE /* tell MVS we want full definitions */ |
| 21 |
# include <features.h> |
| 22 |
#endif /* MVS */ |
| 23 |
|
| 24 |
#include <time.h> /* the usual non-BSD time functions */ |
| 25 |
/* cstat.h is not required for MVS and actually gets in the way. Is it |
| 26 |
* needed for CMS? |
| 27 |
*/ |
| 28 |
#ifdef MVS |
| 29 |
# include <sys/stat.h> |
| 30 |
# include <sys/modes.h> |
| 31 |
#else /* !MVS */ |
| 32 |
# include "cstat.h" |
| 33 |
#endif |
| 34 |
|
| 35 |
|
| 36 |
/* Newer compiler version defines something for us */ |
| 37 |
#if defined(__VM__) && !defined(VM_CMS) |
| 38 |
# define VM_CMS |
| 39 |
#endif |
| 40 |
|
| 41 |
#define CMS_MVS |
| 42 |
#define EBCDIC |
| 43 |
|
| 44 |
#ifndef MVS /* MVS has perfectly good definitions for the following */ |
| 45 |
# define NO_UNISTD_H |
| 46 |
# define NO_FCNTL_H |
| 47 |
#endif /*MVS */ |
| 48 |
|
| 49 |
/* If we're generating a stand-alone CMS module, patch in */ |
| 50 |
/* a new main() function before the real main() for arg parsing. */ |
| 51 |
#ifdef CMS_STAND_ALONE |
| 52 |
# define USE_ZIPMAIN |
| 53 |
#endif |
| 54 |
|
| 55 |
#ifndef NULL |
| 56 |
# define NULL 0 |
| 57 |
#endif |
| 58 |
|
| 59 |
#define PASSWD_FROM_STDIN |
| 60 |
/* Kludge until we know how to open a non-echo tty channel */ |
| 61 |
|
| 62 |
/* definition for ZIP */ |
| 63 |
#define getch() getc(stdin) |
| 64 |
#define MAXPATHLEN 128 |
| 65 |
#define NO_RMDIR |
| 66 |
#define NO_MKTEMP |
| 67 |
#define USE_CASE_MAP |
| 68 |
#define isatty(t) 1 |
| 69 |
|
| 70 |
#ifndef MVS /* MVS has perfectly good definitions for the following */ |
| 71 |
# define fileno(x) (char *)(x) |
| 72 |
# define fdopen fopen |
| 73 |
# define unlink remove |
| 74 |
# define link rename |
| 75 |
# define utime(f,t) |
| 76 |
#endif /*MVS */ |
| 77 |
#ifdef ZCRYPT_INTERNAL |
| 78 |
# define ZCR_SEED2 (unsigned)3141592654L /* use PI as seed pattern */ |
| 79 |
#endif |
| 80 |
|
| 81 |
#ifdef MVS |
| 82 |
# if defined(__CRC32_C) |
| 83 |
# pragma csect(STATIC,"crc32_s") |
| 84 |
# elif defined(__DEFLATE_C) |
| 85 |
# pragma csect(STATIC,"deflat_s") |
| 86 |
# elif defined(__ZIPFILE_C) |
| 87 |
# pragma csect(STATIC,"zipfil_s") |
| 88 |
# elif defined(__ZIPUP_C) |
| 89 |
# pragma csect(STATIC,"zipup_s") |
| 90 |
# endif |
| 91 |
#endif /* MVS */ |
| 92 |
|
| 93 |
/* end defines for ZIP */ |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
#if 0 /*$RGH$*/ |
| 98 |
/* RECFM=F, LRECL=1 works for sure */ |
| 99 |
#define FOPR "rb,recfm=fb" |
| 100 |
#define FOPM "r+" |
| 101 |
#define FOPW "wb,recfm=fb,lrecl=1" |
| 102 |
#define FOPWT "w" |
| 103 |
#endif |
| 104 |
|
| 105 |
/* Try allowing ZIP files to be RECFM=V with "byteseek" for CMS, recfm=U for MVS */ |
| 106 |
#define FOPR "rb,byteseek" |
| 107 |
#define FOPM "r+,byteseek" |
| 108 |
#ifdef MVS |
| 109 |
#define FOPW "wb,recfm=u,byteseek" |
| 110 |
#else /* !MVS */ |
| 111 |
#define FOPW "wb,recfm=v,lrecl=32760,byteseek" |
| 112 |
#endif /* MVS */ |
| 113 |
|
| 114 |
#if 0 |
| 115 |
#define FOPW_TMP "w,byteseek" |
| 116 |
#else |
| 117 |
#define FOPW_TMP "w,type=memory(hiperspace)" |
| 118 |
#endif |
| 119 |
|
| 120 |
#define CBSZ 0x40000 |
| 121 |
#define ZBSZ 0x40000 |
| 122 |
|
| 123 |
#endif /* !__cmsmvs_h */ |