README.OS390 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. OS/390 is IBM's follow-on to MVS and includes a POSIX, XOPEN,
  2. XPG4, build environment, a Unix-style filesystem (called HFS), and
  3. a POSIX (Born) shell. This port uses this environment and is a fairly
  4. straight-forward port of ZIP's Unix port - but uses the existing EBCDIC
  5. code. This port does not work with non-HFS (traditional MVS)
  6. filesystems.
  7. I believe all my changes are isolated with #ifdef's.
  8. Here's some text which might be useful for an OS390 README or
  9. the manual.
  10. ZIP for OS390 HFS datasets
  11. --------------------------
  12. Allows you to create ZIP archives from the OS/390 OpenEdition
  13. command prompt. This port uses standard Unix-style I/O routines
  14. and only works with HFS files.
  15. Usage
  16. -----
  17. By default, ZIP does not perform character-set translation, but has
  18. options to make it easy to convert text files to be compatible with
  19. other systems
  20. zip zipfile list # add the files in 'list' to archive 'zipfile'
  21. zip -a zipfile list # same as above, but translate files to ASCII
  22. zip -al zipfile list # same as above, translate linefeeds to DOS style
  23. zip -all zipfile list # same as '-a', translate linefeeds to UNIX style
  24. Build process
  25. -------------
  26. Assuming GNU make is available in your path and is called "gmake" (See
  27. the notes on Makefile changes below) and a C compiler is available as
  28. "cc", then type
  29. gmake -f unix/Makefile MAKE=gmake os390
  30. If GNU make is not available, the existing makefile can create zip, but will
  31. error on the other executable (zipsplit, zipcloak, zipnote) if you type
  32. make -f unix/Makefile os390
  33. Overview of Changes
  34. -------------------
  35. The OS/390 port is treated as a variant of the Unix port. EBCDIC support
  36. was already implemented for CMS/MVS-batch ports. The specific changes I
  37. made are summarized below.
  38. unix/Makefile - zip uses a unusual _.o target which IBM's make can't handle.
  39. Since the Makefile has a macro called MAKE that is used for a recursive
  40. call to make, I changed the MACRO to call "gmake" - GNU's make - which
  41. can handle the _.o target. If you don't have GNU make, you can
  42. workaround by manually applying symlinks from whatever.c to whatever_.c.
  43. Alternatively, the whatever_.o files could be explicitely added for os390.
  44. I added an os390 target with appropriate defines.
  45. zipup.c - added code (#ifdef OS390) to convert test to ASCII if -a flag
  46. was set.
  47. zip.c - changed logic which always used DOS-style newlines when -a was
  48. set to be consistent with other port (DOS newlines if -l option)
  49. zipfile.c - miscellaneous changes to force storing file names and
  50. descriptions in ASCII in the zip directory. This makes zip files
  51. portable across all platforms. This in turn meant names did not
  52. need to be translated when displaying messages.
  53. zip.h - strtoasc was missing a closing parenthesis.
  54. ebcdic.h - changed translation table to be consistent with current IBM
  55. recommendations - exact same changes to ebcdic.h as in my unzip port.
  56. tailor.h - define huge/far/near to be empty
  57. unix/unix.c - substantial changes to deal with mode flags. Under
  58. the current XOPEN standards, some of the traditional unix file mode
  59. bits need not be in fixed locations, but standard access macros must be
  60. available to access the values. The old unix.c code just picked up these
  61. values and saved them as-is where unzip interpreted them. Existing
  62. Unix system provided the macros for XOPEN compliance, but left the flags
  63. in their traditional locations. OS/390 has a brand new filesystem which
  64. is XOPEN compliant without revealing the positions of these flags.
  65. To create the bitmask in the same format unzip expects, the macros are
  66. tested one-by-one to set the appropriate bits. This same logic should
  67. work on any XOPEN system, but takes more instructions (I did test this
  68. logic on Linux).