home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / pastex13.lha / DVIPS / dvips5519.lha / dvips / vms / vms_gcc.txt < prev    next >
Text File  |  1993-08-12  |  4KB  |  76 lines

  1.                                 DVIPS & GNU C
  2.  
  3. Changes that had to be made in order to compile the DVIPS program with the GNU
  4. CC (GCC) compiler on Vax/VMS. 
  5.  
  6. (1) DVIPS.C
  7. (a) Problem with 'include' files. The person who did the original port to VMS
  8. used the :
  9. #include filename
  10. notation rather than the more traditional
  11. #include "filename.h"
  12. notation.  With the VAX C compiler this means that the chosen header file is
  13. extracted from the SYS$SHARE:VAXCDEF.TLB text library. Well, the GCC compiler
  14. doesn't understand this notation. Now, I could've simply changed it so that if
  15. the code was being compiled on a VMS machine then use the 
  16. #include "filename.h"
  17. notation regardless of the compiler. But some sites may not have extracted the
  18. header files from the text library when the VAX C compiler was installed.
  19. This problem also affects the VMSCLI.C file on the [.VMS] directory.
  20.  
  21. (b) The TFMPATH, PKPATH, etc.., definitions cannot be defined in the MAKEFILE
  22. because the GCC.EXE program complains with the following error message...
  23. % gcc-cpp command too long.  Unable to compile.
  24.  
  25. After removing some of the path definitions to shorten the command (just too
  26. see roughly how big the buffer was) I eventually tricked the GCC.EXE program
  27. into getting as far as executing the GNU_CC:[000000]GCC.COM command file but
  28. it then complained, giving the following message...
  29. %DCL-W-TKNOVF, command element is too long - shorten
  30. So, I gave up and took the easy way out, i.e. put these PATH definitions back
  31. in to a new GCC-specific PATHS.H, called VMS_GCC_PATHS.H
  32.  
  33. (2) DOSPECIAL.C
  34. The "tolower" macro, defined in GNU_CC:[INCLUDE]CTYPE.H, is too simple. It
  35. doesn't check to see if the character is in the range 'A' to 'Z' therefore
  36. we may as well use the "Tolower" function supplied in the DOSPECIAL.C file.
  37.  
  38. (3) The MAKEFILE has been updated to handle the GCC compiler. It must be edited
  39. by the user to select either the VAX11C or the GCC compiler. Search for the
  40. strings VAXC or GNUC and comment out the appropriate lines.
  41.  
  42. (4) VMS.H
  43. The "getchar" macro is undefined if it already exists. This is just to stop the
  44. warning message from the GCC compiler informing us that it is being redefined.
  45. GNUC defines it in GNU_CC:[INCLUDE]STDIO.H
  46.  
  47. (5) VAXVMS.C
  48. Defined all the functions at the top of the file to keep the GCC compiler
  49. quiet, since it reported the following problems...
  50.  
  51. vaxvms.c;1: In function vms_ftell:
  52. vaxvms.c;1:223: warning: `vms_ftell' was previously implicitly declared to return `int'
  53. vaxvms.c;1: In function vms_ungetc:
  54. vaxvms.c;1:296: warning: `vms_ungetc' was previously implicitly declared to return `int'
  55. vaxvms.c;1: In function vms_getenv:
  56.  
  57. Next, if using the GNU CC compiler then #include <stdlib.h> so that the
  58. compiler knows all about the `strchr' and `getenv' functions, hence avoiding
  59. the following warnings...
  60.  
  61. vaxvms.c;1:331: warning: assignment of pointer from integer lacks a cast
  62. vaxvms.c;1:333: warning: assignment of pointer from integer lacks a cast
  63. vaxvms.c;1:336: warning: assignment of pointer from integer lacks a cast
  64. vaxvms.c;1:340: warning: assignment of pointer from integer lacks a cast
  65.  
  66. -------------------------------------------------------------------------------
  67. These changes were tested with GCC 1.42 which is the  current official release
  68. of VMS GCC, available from any of the many GNU archive sites. These changes
  69. were also tested with GCC 2.3.3 which is avaliable from MANGO.RSMAS.MIAMI.EDU
  70. (pub/VMS-gcc). The problem to be aware of is that GNUC doesn't have a
  71. CLIMSGDEF.H header file (needed for DVIPS.C). One way out it to create one by
  72. hand from the output from ...
  73. $ LIBRARY/MACRO/EXTRACT=$CLIMSGDEF/OUTPUT=SYS$OUTPUT SYS$LIBRARY:STARLET.MLB
  74. The other solution is to use the more complete package of C header files
  75. provided by Pat Rankin, also available at MANGO.RSMAS.MIAMI.EDU
  76.