cmsmvs.h 3.0 KB

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