upgrade to gcc-4.0
[email protected] Fri, 16 Sep 2005 11:17:04 -0700
| Newsgroups | gmane.comp.lib.ivtools.patches |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-17-411052730 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-050916-johnston-009" Content-Disposition: attachment; filename=ivtools-050916-johnston-009 Patch: ivtools-050916-johnston-009 For: ivtools-1.2.2 Author: [email protected] Subject: upgrades for gcc-4.0 Requires: This is an intermediate patch to ivtools-1.2.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - changes necessary to compile with gcc-4.0 Index: ComTerp/comfunc.c diff -c ComTerp/comfunc.c:1.1 ComTerp/comfunc.c:1.2 *** ComTerp/comfunc.c:1.1 Tue Jun 15 08:53:38 2004 --- src/ComTerp/comfunc.c Fri Sep 16 11:06:35 2005 *************** *** 440,446 **** _command_symid = command_symid; } ! ComFuncState::ComFuncState(ComFuncState& cfs) { *this = cfs; } --- 440,446 ---- _command_symid = command_symid; } ! ComFuncState::ComFuncState(const ComFuncState& cfs) { *this = cfs; } Index: ComTerp/comfunc.h diff -c ComTerp/comfunc.h:1.1 ComTerp/comfunc.h:1.2 *** ComTerp/comfunc.h:1.1 Tue Jun 15 08:53:38 2004 --- src/ComTerp/comfunc.h Fri Sep 16 11:06:35 2005 *************** *** 225,231 **** // keywords), number of keywords, an option post-eval depth (nesting // within blocks of post-evaluation commands), and an optional // symbol id associated with the ComFunc. ! ComFuncState(ComFuncState&); // copy constructor. int& nargs() {return _nargs;} --- 225,231 ---- // keywords), number of keywords, an option post-eval depth (nesting // within blocks of post-evaluation commands), and an optional // symbol id associated with the ComFunc. ! ComFuncState(const ComFuncState&); // copy constructor. int& nargs() {return _nargs;} Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.2 ComTerp/comterp.c:1.3 *** ComTerp/comterp.c:1.2 Wed Dec 22 08:19:57 2004 --- src/ComTerp/comterp.c Fri Sep 16 11:06:35 2005 *************** *** 23,28 **** --- 23,38 ---- * */ + #include <ctype.h> + #include <iostream.h> + #include <string.h> + #include <strstream> + #include <unistd.h> + + #if __GNUC__>=3 + #include <fstream.h> + #endif + #include <ComTerp/comhandler.h> #include <ComTerp/_comterp.h> *************** *** 886,892 **** fbuf.attach(fd); } else fbuf.attach(fileno(stdout)); ! #elif __GNUC__==3 && __GNUC_MINOR__<1 fileptr_filebuf fbuf(handler() && handler()->wrfptr() ? handler()->wrfptr() : stdout, ios_base::out); --- 896,902 ---- fbuf.attach(fd); } else fbuf.attach(fileno(stdout)); ! #elif (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3 fileptr_filebuf fbuf(handler() && handler()->wrfptr() ? handler()->wrfptr() : stdout, ios_base::out); Index: ComTerp/comterpserv.c diff -c ComTerp/comterpserv.c:1.1 ComTerp/comterpserv.c:1.2 *** ComTerp/comterpserv.c:1.1 Tue Jun 15 08:53:38 2004 --- src/ComTerp/comterpserv.c Fri Sep 16 11:06:35 2005 *************** *** 152,158 **** fbuf.attach(fd); istream in (&fbuf); in.gets(&instr); ! #elif __GNUC__==3 && __GNUC_MINOR__<1 char instr[BUFSIZ]; FILE* ifptr = fdopen(fd, "r"); fileptr_filebuf fbuf(ifptr, ios_base::in); --- 152,158 ---- fbuf.attach(fd); istream in (&fbuf); in.gets(&instr); ! #elif (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3 char instr[BUFSIZ]; FILE* ifptr = fdopen(fd, "r"); fileptr_filebuf fbuf(ifptr, ios_base::in); *************** *** 185,191 **** /* append a null byte */ outstr[outpos] = '\0'; ! #if __GNUC__==3 && __GNUC_MINOR__<1 if (ifptr) fclose(ifptr); #endif --- 185,191 ---- /* append a null byte */ outstr[outpos] = '\0'; ! #if (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3 if (ifptr) fclose(ifptr); #endif *************** *** 202,208 **** #if __GNUC__<3 filebuf fbuf; fbuf.attach(fd); ! #elif __GNUC__==3 && __GNUC_MINOR__<1 FILE* ofptr = fdopen(fd, "w"); fileptr_filebuf fbuf(ofptr, ios_base::out); #else --- 202,208 ---- #if __GNUC__<3 filebuf fbuf; fbuf.attach(fd); ! #elif (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3 FILE* ofptr = fdopen(fd, "w"); fileptr_filebuf fbuf(ofptr, ios_base::out); #else *************** *** 213,219 **** out.put(s[outpos]); out.flush(); outpos = 0; ! #if __GNUC__==3 && __GNUC_MINOR__<1 if (ofptr) fclose(ofptr); #endif return 1; --- 213,219 ---- out.put(s[outpos]); out.flush(); outpos = 0; ! #if (__GNUC__==3 && __GNUC_MINOR__<1) || __GNUC__>3 if (ofptr) fclose(ofptr); #endif return 1; *************** *** 320,326 **** err_print( stderr, "comterp" ); #if __GNUC__<3 filebuf obuf(handler() ? handler()->get_handle() : 1); ! #elif __GNUC__==3 && __GNUC_MINOR__<1 FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); fileptr_filebuf obuf(ofptr, ios_base::out); #else --- 320,326 ---- err_print( stderr, "comterp" ); #if __GNUC__<3 filebuf obuf(handler() ? handler()->get_handle() : 1); ! #elif __GNUC__==3 && __GNUC_MINOR__<1 || __GNUC__>3 FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); fileptr_filebuf obuf(ofptr, ios_base::out); #else *************** *** 330,336 **** #endif ostream ostr(&obuf); ostr.flush(); ! #if __GNUC__==3 && __GNUC_MINOR__<1 if (ofptr) fclose(ofptr); #endif status = -1; --- 330,336 ---- #endif ostream ostr(&obuf); ostr.flush(); ! #if __GNUC__==3 && __GNUC_MINOR__<1 || __GNUC__>3 if (ofptr) fclose(ofptr); #endif status = -1; *************** *** 345,351 **** err_print( stderr, "comterp" ); #if __GNUC__<3 filebuf obuf(handler() ? handler()->get_handle() : 1); ! #elif __GNUC__==3 && __GNUC_MINOR__<1 FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); fileptr_filebuf obuf(ofptr, ios_base::out); #else --- 345,351 ---- err_print( stderr, "comterp" ); #if __GNUC__<3 filebuf obuf(handler() ? handler()->get_handle() : 1); ! #elif __GNUC__==3 && __GNUC_MINOR__<1 || __GNUC__>3 FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); fileptr_filebuf obuf(ofptr, ios_base::out); #else *************** *** 356,362 **** #endif ostream ostr(&obuf); ostr.flush(); ! #if __GNUC__==3 && __GNUC_MINOR__<1 if (ofptr) fclose(ofptr); #endif status = -1; --- 356,362 ---- #endif ostream ostr(&obuf); ostr.flush(); ! #if __GNUC__==3 && __GNUC_MINOR__<1 || __GNUC__>3 if (ofptr) fclose(ofptr); #endif status = -1; Index: ComTerp/comvalue.c diff -c ComTerp/comvalue.c:1.1 ComTerp/comvalue.c:1.2 *** ComTerp/comvalue.c:1.1 Tue Jun 15 08:53:38 2004 --- src/ComTerp/comvalue.c Fri Sep 16 11:06:35 2005 *************** *** 49,55 **** const ComTerp* ComValue::_comterp = nil; ! ComValue::ComValue(ComValue& sv) { *this = sv; } --- 49,55 ---- const ComTerp* ComValue::_comterp = nil; ! ComValue::ComValue(const ComValue& sv) { *this = sv; } Index: ComTerp/comvalue.h diff -c ComTerp/comvalue.h:1.1 ComTerp/comvalue.h:1.2 *** ComTerp/comvalue.h:1.1 Tue Jun 15 08:53:38 2004 --- src/ComTerp/comvalue.h Fri Sep 16 11:06:35 2005 *************** *** 43,50 **** // interpretation. class ComValue : public AttributeValue { public: ! ComValue(ComValue&); ! // copy constructor. ComValue(ComValue*); // deep copy constructor. ComValue(AttributeValue&); --- 43,50 ---- // interpretation. class ComValue : public AttributeValue { public: ! ComValue(const ComValue&); ! // deep copy constructor. ComValue(ComValue*); // deep copy constructor. ComValue(AttributeValue&); Index: ComTerp/ctrlfunc.c diff -c ComTerp/ctrlfunc.c:1.1 ComTerp/ctrlfunc.c:1.2 *** ComTerp/ctrlfunc.c:1.1 Tue Jun 15 08:53:38 2004 --- src/ComTerp/ctrlfunc.c Fri Sep 16 11:06:35 2005 *************** *** 21,33 **** * */ #include <ComTerp/comhandler.h> #include <ComTerp/ctrlfunc.h> #include <ComTerp/comterpserv.h> #include <ComTerp/comvalue.h> #include <Attribute/attrlist.h> - #include <fstream.h> #ifdef HAVE_ACE #include <ace/SOCK_Connector.h> --- 21,33 ---- * */ + #include <fstream.h> #include <ComTerp/comhandler.h> #include <ComTerp/ctrlfunc.h> #include <ComTerp/comterpserv.h> #include <ComTerp/comvalue.h> #include <Attribute/attrlist.h> #ifdef HAVE_ACE #include <ace/SOCK_Connector.h> Index: ComTerp/debugfunc.c diff -c ComTerp/debugfunc.c:1.1 ComTerp/debugfunc.c:1.2 *** ComTerp/debugfunc.c:1.1 Tue Jun 15 08:53:38 2004 --- src/ComTerp/debugfunc.c Fri Sep 16 11:06:35 2005 *************** *** 22,32 **** * */ - #include <ComTerp/comhandler.h> - - #include <ComTerp/debugfunc.h> - #include <ComTerp/comterpserv.h> - #include <strstream> #if __GNUC__==2 && __GNUC_MINOR__<=7 #else #include <vector.h> --- 22,27 ---- *************** *** 35,40 **** --- 30,41 ---- #include <fstream.h> #endif + #include <ComTerp/comhandler.h> + + #include <ComTerp/debugfunc.h> + #include <ComTerp/comterpserv.h> + #include <strstream> + #define TITLE "DebugFunc" /*****************************************************************************/ Index: comterp_/main.c diff -c comterp_/main.c:1.1 comterp_/main.c:1.2 *** comterp_/main.c:1.1 Tue Jun 15 08:53:46 2004 --- src/comterp_/main.c Fri Sep 16 11:06:37 2005 *************** *** 30,38 **** static const char *const SERVER_HOST = ACE_DEFAULT_SERVER_HOST; #endif - #include <ComTerp/comterpserv.h> - - #include <fstream.h> #include <iostream.h> --- 30,35 ---- *************** *** 43,48 **** --- 40,48 ---- #include <version.h> + #include <ComTerp/comterpserv.h> + + #if BUFSIZ>1024 #undef BUFSIZ #define BUFSIZ 1024 Index: include_iviv-2_6/textdisplay.h diff -c include_iviv-2_6/textdisplay.h:1.1 include_iviv-2_6/textdisplay.h:1.2 *** include_iviv-2_6/textdisplay.h:1.1 Tue Jun 15 08:57:09 2004 --- src/include/IV-2_6/InterViews/textdisplay.h Fri Sep 16 11:06:56 2005 *************** *** 42,47 **** --- 42,48 ---- class Painter; class Canvas; + class TextLine; //: basic text display (iv-2.6) // <a href=../man3.1/TextDisplay.html>man page</a> Index: OverlayUnidraw/ovkit.h diff -c OverlayUnidraw/ovkit.h:1.1 OverlayUnidraw/ovkit.h:1.2 *** OverlayUnidraw/ovkit.h:1.1 Tue Jun 15 08:56:19 2004 --- src/OverlayUnidraw/ovkit.h Fri Sep 16 11:06:51 2005 *************** *** 222,228 **** const char* otherdisplay(); // returns string that might specify an alternate X display. ! protected: void toolbar0(); // switch to default toolbar void toolbar1(); --- 222,228 ---- const char* otherdisplay(); // returns string that might specify an alternate X display. ! public: void toolbar0(); // switch to default toolbar void toolbar1(); Index: Unidraw/catalog.c diff -c Unidraw/catalog.c:1.3 Unidraw/catalog.c:1.4 *** Unidraw/catalog.c:1.3 Tue Sep 14 08:27:42 2004 --- src/Unidraw/catalog.c Fri Sep 16 11:06:49 2005 *************** *** 640,646 **** int j = n_data - n_delim; for (int i = 0; i < n_delim; ++i, ++j) { ! char c = (int) data[j]; if (delim[i] != c) { found = false; --- 640,646 ---- int j = n_data - n_delim; for (int i = 0; i < n_delim; ++i, ++j) { ! char c = (long) data[j]; if (delim[i] != c) { found = false; *************** *** 811,817 **** } else { for (int i = 0; i < extra_data->Count(); ++i) { ! char c = (int) (*extra_data)[i]; out << c; } } --- 811,817 ---- } else { for (int i = 0; i < extra_data->Count(); ++i) { ! char c = (long) (*extra_data)[i]; out << c; } } *** /dev/null Fri Sep 16 11:07:05 PDT 2005 --- patches/ivtools-050916-johnston-009 *************** patches/ivtools-050916-johnston-009 *** 0 **** --- 1 ---- + ivtools-050916-johnston-009 --Apple-Mail-17-411052730-- ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php