readme.vms 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. Issues in porting libxml to VMS
  2. ===============================
  3. Here's a summary of the issues I encountered when building LIBXML under
  4. VMS. There was some VMS support in the version I got, but it was a little
  5. out of date with the result that some newer files had problems.
  6. I present this list "as is" to hopefully act as a guide to anyone having
  7. problems in the future.
  8. That's it. Good luck!
  9. John A Fotheringham (jaf@jafsoft.com)
  10. October 2001
  11. Updated October 2002 by Craig A Berry (craigberry@mac.com)
  12. Installation kit
  13. ----------------
  14. - File attributes. Having downloaded essentially a Unix distribution, some
  15. of the file attributes weren't correct... especially those in the [.VMS]
  16. subdirectory. In EDT you could see line feeds and carriage returns as
  17. <LF><CR> etc. To correct this use the command
  18. $ set file <filespec> /attr=rfm=stm
  19. This sets the record format to be "stream". Other variants may be used
  20. instead depending on how you got the files onto your system. Files will
  21. look okay in an EDT editor once the attributes are set. Without
  22. this the command file may not run correctly, since it may be interpreted
  23. as a single line.
  24. - VMS-specific files are in a [.VMS] directory. If you've found this file
  25. then you already know this :-) This directory contains
  26. BUILD_LIBXML.COM - a build command file, which I've radically re-worked
  27. CONFIG.VMS - a configuration file to replace config.h
  28. - Don't execute BUILD_LIBXML.COM until you've done all the following
  29. - read these notes
  30. - reviewed the configuration section of BUILD_LIBXML.COM, and in particular
  31. updated the module lists in line with MAKEFILE
  32. - identified the location of the include files, so that you can manually
  33. set the LIBXML logical if need be.
  34. - re-read these notes :-p
  35. instructions for all these steps are below.
  36. - the file [.vms]config.vms is used in lieu of a Configure-generated config.h.
  37. This file contains a number of define statements that identify the software
  38. options required under VMS
  39. - The include files are in a [.INCLUDE.LIBXML] subdirectory. You need
  40. a logical "libxml" to point to this so that include statements of the
  41. form
  42. #include <libxml/parser.h>
  43. will work correctly. The source files are mostly two levels above this
  44. directory, although there are some .h files there as well.
  45. - The command file BUILD_LIBXML.COM will do the following
  46. - setup some logicals
  47. - set def to the source directory
  48. - compile modules and place them into a LIBXML.OLB library
  49. - compile and link a number of self-test programs
  50. - compile and link a number of utilities and test programs
  51. - set def back to the original directory (i.e. if it fails you might not be
  52. where you started :-)
  53. before running this command file review the configuration segment at
  54. the top. In particular compare the lists of modules with those in the
  55. most recent version of the Unix MAKEFILE. Instructions are contained
  56. in the command file itself.
  57. The command file will attempt to set two logicals
  58. - xml_srcdir. The directory containing the source files
  59. - libxml. The include file directory.
  60. It attempts this by looking for modules globals.c and globals.h in
  61. nearby directories. If this logic fails, you'll need to manually define
  62. these logicals.
  63. The TRIO package
  64. ----------------
  65. - A sub-package TRIO is used to provide some functions not naturally available
  66. under VMS. These include support for infinite and undefined numbers,
  67. and specialised print functions like "snprintf"
  68. I had to make several changes to trionan.c in discussion with the author
  69. (hopefully these are now included in the distro, so I won't list them here)
  70. To build this software we need to add
  71. /IEEE_MODE=UNDERFLOW_TO_ZERO/FLOAT=IEEE
  72. to the compile command for xpath.c and trio.c, and to any main program
  73. that uses this functionality. BUILD_LIBXML.COM should do this for you.
  74. - to build in trio support you need the define WITH_TRIO to be set. This
  75. is done by default for VMS in xmlversion.h
  76. Compiler and linker errors
  77. --------------------------
  78. - the DEC C compiler may produce a number of warnings when compiling the
  79. C code. These include
  80. - Implicit function warnings. These indicate functions whose type is
  81. not defined in a .h file. This will probably only happen if your
  82. configuration is not correct (e.g. for "snprintf" if you haven't
  83. edited xmlversion.h to set WITH_TRIO
  84. - uninitialised variables. Not usually a problem. You can solve this
  85. by editing the code to initialise the variables affected
  86. Changes made to the codebase
  87. ----------------------------
  88. - I changed all dummy declarations in trio.c to be
  89. va_list dummy = NULL;
  90. to prevent compiler whinge in TRIO.C about uninitialised variables
  91. - I had to add the following to nanoftp.c
  92. #if defined(VMS) || defined(__VMS)
  93. #define SOCKLEN_T unsigned int
  94. #endif
  95. This matches similar lines already added to nanohttp.c
  96. - Several variables and function names exceed the 31 character limit
  97. of the VMS linker. The solution adopted has been to use the
  98. /NAMES=SHORTENED compiler option, which requires DEC/Compaq C 5.7
  99. or later. For a complete list of the names that needed shortening
  100. and the short names generated by the compiler, see [.vms]config.vms.