From: CSBVAX::MRGATE!MIGLESIAS%UCIVMSA.BITNET@CUNYVM.CUNY.EDU@SMTP 8-JUL-1988 14:05 To: ARISIA::EVERHART Subj: Changes in WIN/TCP channel code for compilation under GCC Received: from YMIR.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.1) with BSMTP id 6587; Thu, 07 Jul 88 20:33:13 EDT Received: from JNET-DAEMON by YMIR.BITNET; Thu, 7 Jul 88 16:27 PDT Received: From UCIVMSA(MAILER) by YMIR with Jnet id 5584 for IPMDF@YMIR; Thu, 7 Jul 88 16:25 PDT Date: Thu, 7 Jul 88 14:58 PDT From: Mike Iglesias Subject: Changes in WIN/TCP channel code for compilation under GCC To: ipmdf@YMIR.BITNET X-VMS-To: IN%"ipmdf@ymir" Resent-date: Thu, 7 Jul 88 16:32 PDT Resent-to: INFO-PMDF-LIST@YMIR.BITNET Here's a diff of all the changes I made to make the WIN/TCP stuff compile under GCC. Note that in smtp_subrs.c, I changed the call to lib$movc5 to a call to bzero, since GCC doesn't accept the non-standard VAX C extension of &0 (passes the address of a long(?) int of 0). Note in os_smtp.c, I had to change the code that lower-cases the host name, as VAX C's tolower routine doesn't work the same was as standard C. The changes for GCC are inside #ifdef __GNU__/#endif. I also had to put the code that VAXC accepts and GCC does not inside #ifdef VAXC/#endif. For most of the files, the changes were just in the #include lines. There is also a change to one of the GNU C .h files (perror.h) that fixes problems compiling wintcp_errors.c. Ned will be getting copies of the updated sources files for the distribution. Mike Iglesias UC Irvine ************ New file DESCRIP_GCC.COM *********** $ GCC /NOLIST/OBJECT=SMTP SMTP.C $ GCC /NOLIST/OBJECT=MMFNS MMFNS.C $ GCC /NOLIST/OBJECT=SMTP_SUBRS SMTP_SUBRS.C $ GCC /NOLIST/OBJECT=WINTCP_ERRORS WINTCP_ERRORS.C $ link/nomap/notrace/nouser smtp,smtp_subrs,wintcp_errors,- mmfns,[exe]pmdflib,[src]rmspro,gnu_cc:[000000]gcclib/lib, - sys$Input:/options sys$library:vaxcrtl/share $! PASCAL /NOLIST/OBJECT=WTCP_MASTER_PAS WTCP_MASTER_PAS.PAS $ GCC /NOLIST/OBJECT=WTCP_MASTER WTCP_MASTER.C $ GCC /NOLIST/OBJECT=DOMAIN DOMAIN.C $ GCC /NOLIST/OBJECT=TELRCV TELRCV.C $ GCC /NOLIST/OBJECT=OS_SMTP OS_SMTP.C $link/nomap/notrace/nouserr wtcp_master,wtcp_master_pas,os_smtp,smtp_subrs,- telrcv,domain,wintcp_errors,[src]rmspro,- twg$tcp:[netdist.lib]libnet/lib,libnetacc/lib,libnet/lib, - gnu_cc:[000000]gcclib/lib,sys$input:/options sys$Library:vaxcrtl/share $! GCC /NOLIST/OBJECT=SMTPDUMMY SMTPDUMMY.C $!link/nomap/notrace/nouser smtpdummy,gnu_cc:[000000]gcclib/lib, - $! sys$input:/options $!sys$library:vaxcrtl/share ================== Changes to DOMAIN.C ************ File PMDF_COMMON:[SRC.NEWWTCP]DOMAIN.C_ORIG;1 13 #include stdio ****** File PMDF_COMMON:[SRC.NEWWTCP]DOMAIN.C;31 13 #ifdef VAXC 14 #include stdio ************ ************ File PMDF_COMMON:[SRC.NEWWTCP]DOMAIN.C_ORIG;1 16 #include "types.h" ****** File PMDF_COMMON:[SRC.NEWWTCP]DOMAIN.C;31 17 #endif 18 19 #ifdef __GNU__ 20 #include 21 #include 22 #include 23 #endif 24 25 #include "types.h" ************ ================== Changes to GETMX.C ************ File PMDF_COMMON:[SRC.NEWWTCP]GETMX.C_ORIG;1 1 #include errno.h 2 ****** File PMDF_COMMON:[SRC.NEWWTCP]GETMX.C;8 1 #ifdef VAXC 2 #include errno.h 3 #endif 4 5 #ifdef __GNU__ 6 #include 7 #endif 8 ************ ================== Changes to MMFNS.C ************ File PMDF_COMMON:[SRC.NEWWTCP]MMFNS.C_ORIG;1 18 #include stdio 19 #include "rp.h" ****** File PMDF_COMMON:[SRC.NEWWTCP]MMFNS.C;28 18 #ifdef VAXC 19 #include stdio 20 #endif 21 22 #ifdef __GNU__ 23 #include 24 #endif 25 26 #include "rp.h" ************ ================== Changes to OS_SMTP.C ************ File PMDF_COMMON:[SRC.NEWWTCP]OS_SMTP.C_ORIG;1 14 15 #include stdio ****** File PMDF_COMMON:[SRC.NEWWTCP]OS_SMTP.C;42 14 15 #ifdef VAXC 16 #include stdio ************ ************ File PMDF_COMMON:[SRC.NEWWTCP]OS_SMTP.C_ORIG;1 28 #define SMTP_PORT 25 ****** File PMDF_COMMON:[SRC.NEWWTCP]OS_SMTP.C;42 29 #endif 30 31 #ifdef __GNU__ 32 #include 33 #include 34 #include "types.h" 35 #include "socket.h" 36 #include "in.h" 37 #include "cosmetic.h" 38 #include 39 #include 40 #include "netdb.h" 41 #include 42 #include 43 #include 44 #include "wintcpio.h" 45 #endif 46 47 #define SMTP_PORT 25 ************ ************ File PMDF_COMMON:[SRC.NEWWTCP]OS_SMTP.C_ORIG;1 66 *cp = tolower (*cp); 67 ****** File PMDF_COMMON:[SRC.NEWWTCP]OS_SMTP.C;42 85 #ifdef VAXC 86 *cp = tolower (*cp); 87 #endif 88 #ifdef __GNU__ 89 if isupper(*cp) *cp = tolower (*cp); 90 #endif 91 ************ ================== Changes to SMTP.C ************ File PMDF_COMMON:[SRC.NEWWTCP]SMTP.C_ORIG;2 14 #include stdio ****** File PMDF_COMMON:[SRC.NEWWTCP]SMTP.C;120 14 #ifdef VAXC 15 #include stdio ************ ************ File PMDF_COMMON:[SRC.NEWWTCP]SMTP.C_ORIG;2 23 #include "rp.h" ****** File PMDF_COMMON:[SRC.NEWWTCP]SMTP.C;120 24 #endif 25 26 #ifdef __GNU__ 27 #include 28 #include 29 #include 30 #include 31 #include 32 #include 33 #include 34 #include 35 #include 36 #endif 37 38 #include "rp.h" ************ ================== Changes to SMTP_SUBRS.C ************ File PMDF_COMMON:[SRC.NEWWTCP]SMTP_SUBRS.C_ORIG;6 9 #include perror 10 #include ssdef 11 ****** File PMDF_COMMON:[SRC.NEWWTCP]SMTP_SUBRS.C;9 9 10 #ifdef VAXC 11 #include perror 12 #include ssdef 13 #endif 14 15 #ifdef __GNU__ 16 #include 17 #include 18 #endif 19 ************ ************ File PMDF_COMMON:[SRC.NEWWTCP]SMTP_SUBRS.C_ORIG;6 36 lib$movc5 (&0, &0, &0, &length, buffer); 37 ****** File PMDF_COMMON:[SRC.NEWWTCP]SMTP_SUBRS.C;9 44 #ifdef VAXC 45 lib$movc5 (&0, &0, &0, &length, buffer); 46 #endif 47 #ifdef __GNU__ 48 bzero (buffer, length); 49 #endif 50 ************ ================== Changes to TELRCV.C ************ File PMDF_COMMON:[SRC.NEWWTCP]TELRCV.C_ORIG;1 1 #include stdio 2 #include "cosmetic.h" ****** File PMDF_COMMON:[SRC.NEWWTCP]TELRCV.C;5 1 #ifdef VAXC 2 #include stdio 3 #endif 4 5 #ifdef __GNU__ 6 #include 7 #endif 8 9 #include "cosmetic.h" ************ ================== Changes to WINTCP_ERRORS.C ************ File PMDF_COMMON:[SRC.NEWWTCP]WINTCP_ERRORS.C_ORIG;14 1 #include descrip ****** File PMDF_COMMON:[SRC.NEWWTCP]WINTCP_ERRORS.C;18 1 #ifdef VAXC 2 #include descrip ************ ************ File PMDF_COMMON:[SRC.NEWWTCP]WINTCP_ERRORS.C_ORIG;14 5 ****** File PMDF_COMMON:[SRC.NEWWTCP]WINTCP_ERRORS.C;18 6 #endif 7 8 #ifdef __GNU__ 9 #include 10 #include 11 #include 12 #include "wintcpio.h" 13 #endif 14 ************ ================== Changes to GCC include file PERROR.H ************ File SYS$LIBDISK:[GCC.INCLUDE]PERROR.H_ORIG;1 ****** File SYS$LIBDISK:[GCC.INCLUDE]PERROR.H;2 6 extern int sys_nerr; 7 extern char *sys_errlist[]; ************