summaryrefslogtreecommitdiff
path: root/cmsmvs/cmsmvs.h
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:51:52 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:51:52 +0900
commit49807896eda1a7081cce1a7a134fb0071f5e7eeb (patch)
treeaef757b2abf225284bf0ccb0df3a7b7aab6765aa /cmsmvs/cmsmvs.h
parent3101b2a7be8f0e3cc6ff469ce2597945c862264b (diff)
downloadzip-49807896eda1a7081cce1a7a134fb0071f5e7eeb.tar.gz
zip-49807896eda1a7081cce1a7a134fb0071f5e7eeb.tar.bz2
zip-49807896eda1a7081cce1a7a134fb0071f5e7eeb.zip
Diffstat (limited to 'cmsmvs/cmsmvs.h')
-rw-r--r--cmsmvs/cmsmvs.h134
1 files changed, 134 insertions, 0 deletions
diff --git a/cmsmvs/cmsmvs.h b/cmsmvs/cmsmvs.h
new file mode 100644
index 0000000..8fca61b
--- /dev/null
+++ b/cmsmvs/cmsmvs.h
@@ -0,0 +1,134 @@
+/*
+ Copyright (c) 1990-1999 Info-ZIP. All rights reserved.
+
+ See the accompanying file LICENSE, version 1999-Oct-05 or later
+ (the contents of which are also included in zip.h) for terms of use.
+ If, for some reason, both of these files are missing, the Info-ZIP license
+ also may be found at: ftp://ftp.cdrom.com/pub/infozip/license.html
+*/
+/* Include file for VM/CMS and MVS */
+
+/* This is normally named osdep.h on most systems. Since CMS */
+/* generally doesn't support directories, it's been given a unique */
+/* name to avoid confusion. */
+
+
+#ifndef __cmsmvs_h /* prevent multiple inclusions */
+#define __cmsmvs_h
+
+#ifdef MVS
+# define _POSIX_SOURCE /* tell MVS we want full definitions */
+# include <features.h>
+#endif /* MVS */
+
+#include <time.h> /* the usual non-BSD time functions */
+/* cstat.h is not required for MVS and actually gets in the way. Is it
+ * needed for CMS?
+ */
+#ifdef MVS
+# include <sys/stat.h>
+# include <sys/modes.h>
+#else /* !MVS */
+# include "cstat.h"
+#endif
+
+
+/* Newer compiler version defines something for us */
+#if defined(__VM__) && !defined(VM_CMS)
+# define VM_CMS
+#endif
+
+#define CMS_MVS
+#define EBCDIC
+
+#ifndef MVS /* MVS has perfectly good definitions for the following */
+# define NO_UNISTD_H
+# define NO_FCNTL_H
+#endif /*MVS */
+
+/* If we're generating a stand-alone CMS module, patch in */
+/* a new main() function before the real main() for arg parsing. */
+#ifdef CMS_STAND_ALONE
+# define USE_ZIPMAIN
+#endif
+
+#ifndef NULL
+# define NULL 0
+#endif
+
+#define PASSWD_FROM_STDIN
+ /* Kludge until we know how to open a non-echo tty channel */
+
+/* definition for ZIP */
+#define getch() getc(stdin)
+#define native(c) ebcdic[(c)]
+#define MAXPATHLEN 128
+#define NO_RMDIR
+#define NO_MKTEMP
+#define USE_CASE_MAP
+#ifndef MVS /* MVS has perfectly good definitions for the following */
+# define fileno(x) (char *)(x)
+# define fdopen fopen
+# define unlink remove
+# define link rename
+# define utime(f,t)
+# define isatty(t) 1
+#endif /*MVS */
+#ifdef ZCRYPT_INTERNAL
+# define ZCR_SEED2 (unsigned)3141592654L /* use PI as seed pattern */
+#endif
+
+#ifdef MVS
+# if defined(__CRC32_C)
+# pragma csect(STATIC,"crc32_s")
+# elif defined(__DEFLATE_C)
+# pragma csect(STATIC,"deflat_s")
+# elif defined(__ZIPFILE_C)
+# pragma csect(STATIC,"zipfil_s")
+# elif defined(__ZIPUP_C)
+# pragma csect(STATIC,"zipup_s")
+# endif
+#endif /* MVS */
+
+/* end defines for ZIP */
+
+
+
+/* definitions for UNZIP */
+#ifdef UNZIP
+#define INBUFSIZ 8192
+
+#define USE_STRM_INPUT
+#define USE_FWRITE
+
+#define PATH_MAX 128
+#endif /* UNZIP */
+
+
+#if 0 /*$RGH$*/
+/* RECFM=F, LRECL=1 works for sure */
+#define FOPR "rb,recfm=fb"
+#define FOPM "r+"
+#define FOPW "wb,recfm=fb,lrecl=1"
+#define FOPWT "w"
+#endif
+
+/* Try allowing ZIP files to be RECFM=V with "byteseek" for CMS, recfm=U for MVS */
+#define FOPR "rb,byteseek"
+#define FOPM "r+,byteseek"
+#ifdef MVS
+ #define FOPW "wb,recfm=u,byteseek"
+#else /* !MVS */
+ #define FOPW "wb,recfm=v,lrecl=32760,byteseek"
+#endif /* MVS */
+
+#if 0
+#define FOPW_TMP "w,byteseek"
+#else
+#define FOPW_TMP "w,type=memory(hiperspace)"
+#endif
+
+#define CBSZ 0x40000
+#define ZBSZ 0x40000
+
+#endif /* !__cmsmvs_h */