-                                 DVIPS & GNU C   N Changes that had to be made in order to compile the DVIPS program with the GNU CC (GCC) compiler on Vax/VMS.    (1) DVIPS.C M (a) Problem with 'include' files. The person who did the original port to VMS 
 used the : #include filename ) notation rather than the more traditional  #include "filename.h" L notation.  With the VAX C compiler this means that the chosen header file isM extracted from the SYS$SHARE:VAXCDEF.TLB text library. Well, the GCC compiler N doesn't understand this notation. Now, I could've simply changed it so that if: the code was being compiled on a VMS machine then use the  #include "filename.h" N notation regardless of the compiler. But some sites may not have extracted theI header files from the text library when the VAX C compiler was installed. D This problem also affects the VMSCLI.C file on the [.VMS] directory.  M (b) The TFMPATH, PKPATH, etc.., definitions cannot be defined in the MAKEFILE I because the GCC.EXE program complains with the following error message... / % gcc-cpp command too long.  Unable to compile.   L After removing some of the path definitions to shorten the command (just tooL see roughly how big the buffer was) I eventually tricked the GCC.EXE programL into getting as far as executing the GNU_CC:[000000]GCC.COM command file but3 it then complained, giving the following message... 4 %DCL-W-TKNOVF, command element is too long - shortenM So, I gave up and took the easy way out, i.e. put these PATH definitions back 8 in to a new GCC-specific PATHS.H, called VMS_GCC_PATHS.H   (2) DOSPECIAL.C J The "tolower" macro, defined in GNU_CC:[INCLUDE]CTYPE.H, is too simple. ItJ doesn't check to see if the character is in the range 'A' to 'Z' thereforeK we may as well use the "Tolower" function supplied in the DOSPECIAL.C file.   O (3) The MAKEFILE has been updated to handle the GCC compiler. It must be edited K by the user to select either the VAX11C or the GCC compiler. Search for the ; strings VAXC or GNUC and comment out the appropriate lines.   	 (4) VMS.H O The "getchar" macro is undefined if it already exists. This is just to stop the N warning message from the GCC compiler informing us that it is being redefined.* GNUC defines it in GNU_CC:[INCLUDE]STDIO.H   (5) VAXVMS.CI Defined all the functions at the top of the file to keep the GCC compiler 2 quiet, since it reported the following problems...  " vaxvms.c;1: In function vms_ftell:W vaxvms.c;1:223: warning: `vms_ftell' was previously implicitly declared to return `int' # vaxvms.c;1: In function vms_ungetc: X vaxvms.c;1:296: warning: `vms_ungetc' was previously implicitly declared to return `int'# vaxvms.c;1: In function vms_getenv:   G Next, if using the GNU CC compiler then #include <stdlib.h> so that the L compiler knows all about the `strchr' and `getenv' functions, hence avoiding the following warnings...   H vaxvms.c;1:331: warning: assignment of pointer from integer lacks a castH vaxvms.c;1:333: warning: assignment of pointer from integer lacks a castH vaxvms.c;1:336: warning: assignment of pointer from integer lacks a castH vaxvms.c;1:340: warning: assignment of pointer from integer lacks a cast  O ------------------------------------------------------------------------------- N These changes were tested with GCC 1.42 which is the  current official releaseK of VMS GCC, available from any of the many GNU archive sites. These changes M were also tested with GCC 2.3.3 which is avaliable from MANGO.RSMAS.MIAMI.EDU E (pub/VMS-gcc). The problem to be aware of is that GNUC doesn't have a M CLIMSGDEF.H header file (needed for DVIPS.C). One way out it to create one by  hand from the output from ... L $ LIBRARY/MACRO/EXTRACT=$CLIMSGDEF/OUTPUT=SYS$OUTPUT SYS$LIBRARY:STARLET.MLBH The other solution is to use the more complete package of C header files? provided by Pat Rankin, also available at MANGO.RSMAS.MIAMI.EDU 