vmmvs.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. Copyright (c) 1990-2008 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 2007-Mar-04 or later
  4. (the contents of which are also included in unzip.h) for terms of use.
  5. If, for some reason, all these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
  7. */
  8. /* vmmvs.h: include file for both VM/CMS and MVS ports of UnZip */
  9. #ifndef __vmmvs_h /* prevent multiple inclusions */
  10. #define __vmmvs_h
  11. #ifndef NULL
  12. # define NULL (zvoid *)0
  13. #endif
  14. #ifdef MVS
  15. # define _POSIX_SOURCE /* tell MVS we want full definitions */
  16. # define NO_STRNICMP /* MVS has no strnicmp() */
  17. # include <features.h>
  18. /* MVS complains if a function has the same name as a csect. */
  19. # if defined(__UNZIP_C)
  20. # pragma csect(STATIC,"unzip_s")
  21. # elif defined(__CRC32_C)
  22. # pragma csect(STATIC,"crc32_s")
  23. # elif defined(__ENVARGS_C)
  24. # pragma csect(STATIC,"envarg_s")
  25. # elif defined(__EXPLODE_C)
  26. # pragma csect(STATIC,"explod_s")
  27. # elif defined(__INFLATE_C)
  28. # pragma csect(STATIC,"inflat_s")
  29. # elif defined(__MATCH_C)
  30. # pragma csect(STATIC,"match_s")
  31. # elif defined(__UNREDUCE_C)
  32. # pragma csect(STATIC,"unredu_s")
  33. # elif defined(__UNSHRINK_C)
  34. # pragma csect(STATIC,"unshri_s")
  35. # elif defined(__ZIPINFO_C)
  36. # pragma csect(STATIC,"zipinf_s")
  37. # endif
  38. #endif /* MVS */
  39. #include <time.h> /* the usual non-BSD time functions */
  40. #ifdef VM_CMS
  41. # include "vmstat.h"
  42. #endif
  43. #ifdef MVS
  44. # include <sys/stat.h>
  45. #endif
  46. #define PASSWD_FROM_STDIN
  47. /* Kludge until we know how to open a non-echo tty channel */
  48. #define EBCDIC
  49. /* In the context of Info-ZIP, a portable "text" mode file implies the use of
  50. an ASCII-compatible (ISO 8859-1, or other extended ASCII) code page. */
  51. #ifdef MORE
  52. # undef MORE
  53. #endif
  54. /* Workarounds for missing RTL functionality */
  55. #define isatty(t) 1
  56. #ifdef UNZIP /* definitions for UNZIP */
  57. #define INBUFSIZ 8192
  58. #define USE_STRM_INPUT
  59. #define USE_FWRITE
  60. #define PATH_MAX 128
  61. #ifndef QUERY_TRNEWLN
  62. # define QUERY_TRNEWLN /* terminate interaction queries with '\n' */
  63. #endif
  64. #ifndef DATE_FORMAT
  65. # define DATE_FORMAT DF_MDY
  66. #endif
  67. #define lenEOL 1
  68. /* The use of "ebcdic[LF]" is not reliable; VM/CMS C/370 uses the
  69. * EBCDIC specific "NL" ('NewLine') control character (and not the EBCDIC
  70. * equivalent of the ASCII "LF" ('LineFeed')) as line terminator!
  71. * To work around this problem, we explicitely emit the C compiler's native
  72. * '\n' line terminator.
  73. */
  74. #if 0
  75. #define PutNativeEOL *q++ = native(LF);
  76. #else
  77. #define PutNativeEOL *q++ = '\n';
  78. #endif
  79. #endif /* UNZIP */
  80. #endif /* !__vmmvs_h */