[Here are some patches which are said to be for compiling CVS 1.9.26 with IBM's ICC compiler (which is a predecessor to, and/or component of, IBM's Visual Age C++ product or whatever they call it). There is also a brief note regarding EMX (which is a separate issue). This message was also posted to comp.software.config-mgmt. -kingdon] Date: Tue, 10 Mar 1998 17:43:03 +0100 From: Michael Holzapfel Subject: Latest CVS compiling with icc.exe for OS/2 To: info@cyclic.com Organization: IME RWTH Aachen Content-type: multipart/mixed; boundary="------------5AC8514D6FC5" Dies ist eine mehrteilige Nachricht im MIME-Format. --------------5AC8514D6FC5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dear webmaster, i've made some changes to cvs-1.9.26 to make it compile with icc for OS/2. Maybe you are interested in this changes, so i have attached the diff to this mail. The patches are also visible at comp.software.config-mgmt. I might be interesting for you, that the emx-version of cvs doesn't work anymore with emxfix levels above 02. E.g. cvs commit complains about "socket operation on non socket" when starting from command-line. Committing with emacs works just fine. I think it is a bug in EMX's socket-library. This was my intention, to compile CVS with icc.exe. -- Michael Holzapfel -------------------------------------------------------- Institut fuer Maschinenelemente und Maschinengestaltung RWTH-Aachen Tel. 0049-(0)-241-805661 Fax 0049-(0)-241-8888256 Email michael@ime.rwth-aachen.de WWW http://www.ime.rwth-aachen.de/~michael/index.html -------------------------------------------------------- --------------5AC8514D6FC5 Content-Type: text/plain; charset=us-ascii; name="os2.dif" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="os2.dif" *** diff/diff.h~ Sun Sep 21 23:01:36 1997 --- diff/diff.h Tue Mar 10 15:55:54 1998 *************** the Free Software Foundation, 675 Mass A *** 21,25 **** --- 21,29 ---- #include #include + #ifndef IBM_CPP #include "regex.h" + #else + #include "../lib/regex.h" + #endif #define TAB_WIDTH 8 *** diff/system.h~ Wed Oct 29 00:42:20 1997 --- diff/system.h Tue Mar 10 15:57:56 1998 *************** the Free Software Foundation, 675 Mass A *** 20,24 **** /* We must define `volatile' and `const' first (the latter inside config.h), so that they're used consistently in all system includes. */ ! #if !__STDC__ #ifndef volatile #define volatile --- 20,24 ---- /* We must define `volatile' and `const' first (the latter inside config.h), so that they're used consistently in all system includes. */ ! #if !defined (__STDC__) && !defined (IBM_CPP) #ifndef volatile #define volatile *************** the Free Software Foundation, 675 Mass A *** 30,34 **** #include ! #if __STDC__ #define PARAMS(args) args #define VOID void --- 30,34 ---- #include ! #if defined (__STDC__) || defined (IBM_CPP) #define PARAMS(args) args #define VOID void *************** the Free Software Foundation, 675 Mass A *** 36,39 **** --- 36,43 ---- #define PARAMS(args) () #define VOID char + #endif + + #ifdef IBM_CPP + #include #endif *** os2/config.h~ Tue Mar 10 10:52:20 1998 --- os2/config.h Tue Mar 10 11:30:44 1998 *************** *** 29,35 **** --- 29,41 ---- #ifndef __STDC__ /* You bet! */ + #ifndef IBM_CPP #define __STDC__ 1 #endif + #endif + #ifdef IBM_CPP + #include + #define S_IFMT (S_IFDIR | S_IFCHR | S_IFREG) + #endif /* The IBM compiler uses the (non-standard) error code EACCESS instead of EACCES (note: one 'S'). Define EACCESS to be EACCES and use the standard *** os2/Makefile~ Tue Mar 10 11:36:40 1998 --- os2/Makefile Tue Mar 10 15:32:12 1998 *************** top_srcdir = .. *** 23,27 **** lib_dir = ../lib cvs_srcdir = ../src ! zlib_dir = ${top_srcdir}/zlib --- 23,27 ---- lib_dir = ../lib cvs_srcdir = ../src ! diff_srcdir = ${top_srcdir}/diff zlib_dir = ${top_srcdir}/zlib *************** OBJ_CFLAGS = -C+ *** 39,43 **** CFLAGS = -W3 -Wrea+tru+ -Ti+ -Ss+ -Gd- -Gm+ -G4 -Q+ -Sm ${CINC} \ -I${srcdir} -I${lib_dir} -I${cvs_srcdir} -I${zlib_dir} \ ! -DIBM_CPP -DHAVE_CONFIG_H \ -DTCPIP_IBM -If:${SL}ibmcpp${SL}include --- 39,43 ---- CFLAGS = -W3 -Wrea+tru+ -Ti+ -Ss+ -Gd- -Gm+ -G4 -Q+ -Sm ${CINC} \ -I${srcdir} -I${lib_dir} -I${cvs_srcdir} -I${zlib_dir} \ ! -DIBM_CPP -DHAVE_CONFIG_H -DCLOSEDIR_VOID \ -DTCPIP_IBM -If:${SL}ibmcpp${SL}include *************** CFLAGS = -W3 -Wrea+tru+ -Ti+ -Ss+ -Gd- - *** 46,49 **** --- 46,50 ---- ARGVLIB = f:${SL}ibmcpp${SL}lib${SL}setargv.obj + #CLIB = f:${SL}ibmcpp${SL}lib${SL}CPPOM30.LIB # TCP/IP stuff #TCPIPLIB = f:${SL}ibmtcpip${SL}lib${SL}tcp32dll.lib f:${SL}ibmtcpip${SL}lib${SL}so32dll.lib *************** COMMON_HEADERS = \ *** 76,79 **** --- 77,87 ---- ${cvs_srcdir}${SL}error.h + # headers in ../diff + DIFF_HEADERS = \ + ${diff_srcdir}${SL}cmpbuf.h \ + ${diff_srcdir}${SL}diff.h \ + ${diff_srcdir}${SL}system.h + + # sources specific to OS/2 OS2_SOURCES = \ *************** COMMON_SOURCES = \ *** 146,149 **** --- 154,173 ---- # end of $COMMON_SOURCES + # sources in ../diff + DIFF_SOURCES = \ + ${diff_srcdir}${SL}analyze.c \ + ${diff_srcdir}${SL}cmpbuf.c \ + ${diff_srcdir}${SL}context.c \ + ${diff_srcdir}${SL}diff.c \ + ${diff_srcdir}${SL}diff3.c \ + ${diff_srcdir}${SL}dir.c \ + ${diff_srcdir}${SL}ed.c \ + ${diff_srcdir}${SL}ifdef.c \ + ${diff_srcdir}${SL}io.c \ + ${diff_srcdir}${SL}normal.c \ + ${diff_srcdir}${SL}side.c \ + ${diff_srcdir}${SL}util.c \ + ${diff_srcdir}${SL}version.c + # sources from ..${SL}lib # FIXME: Is this used anywhere? I don't think it is. *************** COMMON_OBJECTS = \ *** 230,236 **** ${cvs_srcdir}${SL}vers_ts.obj \ ${cvs_srcdir}${SL}version.obj \ ! ${cvs_srcdir}/zlib.obj # end of $COMMON_OBJECTS # objects from ..${SL}lib LIB_OBJECTS = \ --- 254,276 ---- ${cvs_srcdir}${SL}vers_ts.obj \ ${cvs_srcdir}${SL}version.obj \ ! ${cvs_srcdir}${SL}zlib.obj # end of $COMMON_OBJECTS + # object files in ../diff + DIFF_OBJECTS = \ + ${diff_srcdir}${SL}analyze.obj \ + ${diff_srcdir}${SL}cmpbuf.obj \ + ${diff_srcdir}${SL}context.obj \ + ${diff_srcdir}${SL}diff.obj \ + ${diff_srcdir}${SL}diff3.obj \ + ${diff_srcdir}${SL}dir.obj \ + ${diff_srcdir}${SL}ed.obj \ + ${diff_srcdir}${SL}ifdef.obj \ + ${diff_srcdir}${SL}io.obj \ + ${diff_srcdir}${SL}normal.obj \ + ${diff_srcdir}${SL}side.obj \ + ${diff_srcdir}${SL}util.obj \ + ${diff_srcdir}${SL}version.obj + # objects from ..${SL}lib LIB_OBJECTS = \ *************** LIB_OBJECTS = \ *** 246,270 **** ${lib_dir}${SL}fnmatch.obj \ ${lib_dir}${SL}regex.obj \ ! ${lib_dir}/valloc.obj # ${lib_dir}${SL}getwd.obj \ ! ZLIB_OBJECTS = ${zlib_dir}/adler32.obj \ ! ${zlib_dir}/compress.obj \ ! ${zlib_dir}/crc32.obj \ ! ${zlib_dir}/uncompr.obj \ ! ${zlib_dir}/deflate.obj \ ! ${zlib_dir}/trees.obj \ ! ${zlib_dir}/zutil.obj \ ! ${zlib_dir}/inflate.obj \ ! ${zlib_dir}/infblock.obj \ ! ${zlib_dir}/inftrees.obj \ ! ${zlib_dir}/infcodes.obj \ ! ${zlib_dir}/infutil.obj \ ! ${zlib_dir}/inffast.obj ! ! SOURCES = ${COMMON_SOURCES} ${LIB_SOURCES} ${OS2_SOURCES} ! HEADERS = ${COMMON_HEADERS} ${OS2_HEADERS} ! OBJECTS = ${COMMON_OBJECTS} ${LIB_OBJECTS} ${OS2_OBJECTS} ${ZLIB_OBJECTS} DISTFILES = ${OS2_HEADERS} ${OS2_SOURCES} \ --- 286,310 ---- ${lib_dir}${SL}fnmatch.obj \ ${lib_dir}${SL}regex.obj \ ! ${lib_dir}${SL}valloc.obj # ${lib_dir}${SL}getwd.obj \ ! ZLIB_OBJECTS = ${zlib_dir}${SL}adler32.obj \ ! ${zlib_dir}${SL}compress.obj \ ! ${zlib_dir}${SL}crc32.obj \ ! ${zlib_dir}${SL}uncompr.obj \ ! ${zlib_dir}${SL}deflate.obj \ ! ${zlib_dir}${SL}trees.obj \ ! ${zlib_dir}${SL}zutil.obj \ ! ${zlib_dir}${SL}inflate.obj \ ! ${zlib_dir}${SL}infblock.obj \ ! ${zlib_dir}${SL}inftrees.obj \ ! ${zlib_dir}${SL}infcodes.obj \ ! ${zlib_dir}${SL}infutil.obj \ ! ${zlib_dir}${SL}inffast.obj ! ! SOURCES = ${COMMON_SOURCES} ${LIB_SOURCES} ${OS2_SOURCES} ${DIFF_SOURCES} ! HEADERS = ${COMMON_HEADERS} ${OS2_HEADERS} ${DIFF_HEADERS} ! OBJECTS = ${COMMON_OBJECTS} ${LIB_OBJECTS} ${OS2_OBJECTS} ${ZLIB_OBJECTS} ${DIFF_OBJECTS} DISTFILES = ${OS2_HEADERS} ${OS2_SOURCES} \ *************** clean: *** 308,311 **** --- 348,352 ---- rm -f ${srcdir}${SL}*.obj rm -f ${lib_dir}${SL}*.obj + rm -f ${diff_dir}${SL}*.obj rm -f ${cvs_srcdir}${SL}*.obj *************** cvs.exe: ${OBJECTS} *** 328,331 **** --- 369,373 ---- echo Creating icc.in... echo -Q+ -Ti+ -Fe$@ -B"/batch" -B"/NOE" > icc.in + echo $(subst /,\,$(DIFF_OBJECTS)) >> icc.in echo $(subst /,\,$(OS2_OBJECTS)) >> icc.in echo $(subst /,\,$(LIB_OBJECTS)) >> icc.in *************** cvs.exe: ${OBJECTS} *** 336,339 **** --- 378,383 ---- echo Creating icc.in... done. set LIB=$(subst /,\,$(LIB)) & icc @icc.in + + # echo $(subst /,\,$(CLIB)) >> icc.in # cvs.obj: ${OBJECTS} ${SOURCES} ${HEADERS} *** os2/run.c~ Tue Jan 13 22:30:52 1998 --- os2/run.c Tue Mar 10 14:20:12 1998 *************** run_setup (const char *prog) *** 80,84 **** run_add_arg (cp); ! free (run_prog) } --- 80,84 ---- run_add_arg (cp); ! free (run_prog); } *** src/cvs.h~ Tue Mar 10 11:15:48 1998 --- src/cvs.h Tue Mar 10 14:19:30 1998 *************** void run_arg PROTO((const char *s)); *** 639,644 **** --- 639,646 ---- void run_print PROTO((FILE * fp)); void run_setup PROTO ((const char *prog)); + #ifndef IBM_CPP int run_exec PROTO((const char *stin, const char *stout, const char *sterr, int flags)); + #endif /* other similar-minded stuff from run.c. */ *** src/error.c~ Tue Mar 10 10:55:26 1998 --- src/error.c Tue Mar 10 11:15:28 1998 *************** int error_use_protocol; *** 27,31 **** #ifdef HAVE_VPRINTF ! #ifdef __STDC__ #include #define VA_START(args, lastarg) va_start(args, lastarg) --- 27,31 ---- #ifdef HAVE_VPRINTF ! #if defined (__STDC__) || defined (IBM_CPP) #include #define VA_START(args, lastarg) va_start(args, lastarg) *************** int error_use_protocol; *** 51,55 **** #include #else /* ! STDC_HEADERS */ ! #ifdef __STDC__ void exit(int status); #else /* ! __STDC__ */ --- 51,55 ---- #include #else /* ! STDC_HEADERS */ ! #if defined (__STDC__) || defined (IBM_CPP) void exit(int status); #else /* ! __STDC__ */ *************** error_exit PROTO ((void)) *** 93,97 **** /* VARARGS */ void ! #if defined (HAVE_VPRINTF) && defined (__STDC__) error (int status, int errnum, const char *message, ...) #else --- 93,97 ---- /* VARARGS */ void ! #if defined (HAVE_VPRINTF) && ( defined (__STDC__) || defined (IBM_CPP)) error (int status, int errnum, const char *message, ...) #else *************** error (status, errnum, message, va_alist *** 220,224 **** /* VARARGS */ void ! #if ( defined (HAVE_VPRINTF) && defined (__STDC__)) || defined(IBM_CPP) fperror (FILE *fp, int status, int errnum, char *message, ...) #else --- 220,224 ---- /* VARARGS */ void ! #if ( defined (HAVE_VPRINTF) && ( defined (__STDC__) || defined(IBM_CPP) )) fperror (FILE *fp, int status, int errnum, char *message, ...) #else *** src/error.h~ Wed Feb 4 01:52:04 1998 --- src/error.h Tue Mar 10 11:17:24 1998 *************** *** 38,42 **** #endif ! #ifdef __STDC__ void error (int, int, const char *, ...) \ __attribute__ ((__format__ (__printf__, 3, 4))); --- 38,42 ---- #endif ! #if defined (__STDC__) || defined (IBM_CPP) void error (int, int, const char *, ...) \ __attribute__ ((__format__ (__printf__, 3, 4))); *** src/rcs.h~ Wed Feb 18 01:20:18 1998 --- src/rcs.h Tue Mar 10 11:16:26 1998 *************** typedef struct rcsversnode RCSVers; *** 170,174 **** typedef void (*RCSCHECKOUTPROC) PROTO ((void *, const char *, size_t)); ! #ifdef __STDC__ struct rcsbuffer; #endif --- 170,174 ---- typedef void (*RCSCHECKOUTPROC) PROTO ((void *, const char *, size_t)); ! #if defined (__STDC__) || defined (IBM_CPP) struct rcsbuffer; #endif --------------5AC8514D6FC5--