"changes for compiling with gcc-2.96 on RedHat 7.*, new release 1.0.6"

[email protected] Fri, 02 Aug 2002 11:40:54 -0700
Newsgroups gmane.comp.lib.ivtools.patches
Message-ID <[email protected]>
Patch:    ivtools-020802-johnston-064
For:      ivtools-1.0.5
Author:   [email protected]
Subject:  changes for compiling with gcc-2.96 on RedHat 7.*, new release 1.0.6
Requires: 

This is an intermediate patch to ivtools-1.0.5.  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 for compiling with gcc-2.96 on RedHat 7.*.  Makes for
new release, ivtools-1.0.6

Index: top_ivtools/CHANGES
diff -c top_ivtools/CHANGES:1.7 top_ivtools/CHANGES:1.8
*** top_ivtools/CHANGES:1.7	Thu Aug  1 11:52:10 2002
--- ./CHANGES	Fri Aug  2 11:34:25 2002
***************
*** 1,3 ****
--- 1,8 ----
+ August 2nd, 2002  ivtools-1.0.6
+ 
+ - more changes for compiling with gcc-2.96 on RedHat 7.*
+ 
+ 
  August 1st, 2002  ivtools-1.0.5
  
  - various compile time fixes for Solaris and Cygwin.
Index: top_ivtools/INSTALL
diff -c top_ivtools/INSTALL:1.9 top_ivtools/INSTALL:1.10
*** top_ivtools/INSTALL:1.9	Thu Aug  1 11:52:10 2002
--- ./INSTALL	Fri Aug  2 11:34:25 2002
***************
*** 1,7 ****
  
  			INSTALL for ivtools-1.0
  
! Instructions for building ivtools-1.0.5 from source, the short version:
  
  	./configure
  	make
--- 1,7 ----
  
  			INSTALL for ivtools-1.0
  
! Instructions for building ivtools-1.0.6 from source, the short version:
  
  	./configure
  	make
***************
*** 10,16 ****
  
  And if that doesn't work...
  
! Instructions for building ivtools-1.0.5 from source, the long version:
  
  0. Compilation Environment
  
--- 10,16 ----
  
  And if that doesn't work...
  
! Instructions for building ivtools-1.0.6 from source, the long version:
  
  0. Compilation Environment
  
Index: top_ivtools/README
diff -c top_ivtools/README:1.8 top_ivtools/README:1.9
*** top_ivtools/README:1.8	Thu Aug  1 11:52:10 2002
--- ./README	Fri Aug  2 11:34:25 2002
***************
*** 2,8 ****
  			README for ivtools 1.0
  
  
! This directory contains a release of ivtools 1.0.5.  You should read
  the rest of this file for information on what ivtools is and the
  INSTALL file for instructions on how to build it.
  
--- 2,8 ----
  			README for ivtools 1.0
  
  
! This directory contains a release of ivtools 1.0.6.  You should read
  the rest of this file for information on what ivtools is and the
  INSTALL file for instructions on how to build it.
  
Index: top_ivtools/VERSION
diff -c top_ivtools/VERSION:1.6 top_ivtools/VERSION:1.7
*** top_ivtools/VERSION:1.6	Thu Aug  1 11:52:10 2002
--- ./VERSION	Fri Aug  2 11:34:25 2002
***************
*** 1 ****
! Release 1.0.5
--- 1 ----
! Release 1.0.6
Index: ComTerp/comhandler.c
diff -c ComTerp/comhandler.c:1.5 ComTerp/comhandler.c:1.6
*** ComTerp/comhandler.c:1.5	Wed Jul 24 15:24:42 2002
--- src/ComTerp/comhandler.c	Fri Aug  2 11:34:29 2002
***************
*** 125,131 ****
  	    return -1;
  	} else {
  	    if (!comterp_->stack_empty()) {
! #if __GNUG__<3
  	      filebuf obuf(1);
  #else
  	      fileptr_filebuf obuf(stdout, ios_base::out);
--- 125,131 ----
  	    return -1;
  	} else {
  	    if (!comterp_->stack_empty()) {
! #if __GNUC__<3
  	      filebuf obuf(1);
  #else
  	      fileptr_filebuf obuf(stdout, ios_base::out);
***************
*** 153,159 ****
  #endif
      char ch;
  
! #if __GNUG__<3
      filebuf ibuf(fd);
      istream istr(&ibuf);
  
--- 153,159 ----
  #endif
      char ch;
  
! #if __GNUC__<3
      filebuf ibuf(fd);
      istream istr(&ibuf);
  
***************
*** 190,196 ****
      if (!comterp_ || !input_good)
        return -1;
      else if (!inbuf || !*inbuf) {
! #if __GNUG__<3
        filebuf obuf(fd ? fd : 1);
        ostream ostr(&obuf);
        ostr << "\n";
--- 190,196 ----
      if (!comterp_ || !input_good)
        return -1;
      else if (!inbuf || !*inbuf) {
! #if __GNUC__<3
        filebuf obuf(fd ? fd : 1);
        ostream ostr(&obuf);
        ostr << "\n";
***************
*** 216,222 ****
      } else {
        if (inbuf[0]!='\004')
  	cout << inbuf << "\n";
! #if __GNUG__<3
        filebuf obuf(fd ? fd : 1);
        ostream ostr(&obuf);
        ostr << "\n";
--- 216,222 ----
      } else {
        if (inbuf[0]!='\004')
  	cout << inbuf << "\n";
! #if __GNUC__<3
        filebuf obuf(fd ? fd : 1);
        ostream ostr(&obuf);
        ostr << "\n";
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.6 ComTerp/comterp.c:1.7
*** ComTerp/comterp.c:1.6	Wed Jul 24 11:00:04 2002
--- src/ComTerp/comterp.c	Fri Aug  2 11:34:29 2002
***************
*** 59,65 ****
  #include <string.h>
  #include <strstream.h>
  #include <unistd.h>
! #if __GNUG__>=3
  #include <fstream.h>
  #endif
  
--- 59,65 ----
  #include <string.h>
  #include <strstream.h>
  #include <unistd.h>
! #if __GNUC__>=3
  #include <fstream.h>
  #endif
  
***************
*** 287,293 ****
      }
  
      if (stepflag()) {
! #if __GNUG__<3
        filebuf fbufout;
        fbufout.attach(handler() ? Math::max(1, handler()->get_handle()) : fileno(stdout));
  #else
--- 287,293 ----
      }
  
      if (stepflag()) {
! #if __GNUC__<3
        filebuf fbufout;
        fbufout.attach(handler() ? Math::max(1, handler()->get_handle()) : fileno(stdout));
  #else
***************
*** 876,882 ****
    errbuf_save[0] = '\0';
    
  
! #if __GNUG__<3
    filebuf fbuf;
    if (handler()) {
      int fd = Math::max(1, handler()->get_handle());
--- 876,882 ----
    errbuf_save[0] = '\0';
    
  
! #if __GNUC__<3
    filebuf fbuf;
    if (handler()) {
      int fd = Math::max(1, handler()->get_handle());
***************
*** 1108,1114 ****
  	if (read_expr()) {
  	    if (eval_expr(true)) {
  	        err_print( stderr, "comterp" );
! #if __GNUG__<3
  	        filebuf obuf(1);
  #else
  	        fileptr_filebuf obuf(stdout, ios_base::out);
--- 1108,1114 ----
  	if (read_expr()) {
  	    if (eval_expr(true)) {
  	        err_print( stderr, "comterp" );
! #if __GNUC__<3
  	        filebuf obuf(1);
  #else
  	        fileptr_filebuf obuf(stdout, ios_base::out);
Index: ComTerp/comterpserv.c
diff -c ComTerp/comterpserv.c:1.2 ComTerp/comterpserv.c:1.3
*** ComTerp/comterpserv.c:1.2	Wed Jul 24 11:00:04 2002
--- src/ComTerp/comterpserv.c	Fri Aug  2 11:34:29 2002
***************
*** 31,37 ****
  #include <OS/math.h>
  #include <iostream.h>
  #include <string.h>
! #if __GNUG__>=3
  #include <fstream.h>
  #endif
  
--- 31,37 ----
  #include <OS/math.h>
  #include <iostream.h>
  #include <string.h>
! #if __GNUC__>=3
  #include <fstream.h>
  #endif
  
***************
*** 145,151 ****
  char* ComTerpServ::fd_fgets(char* s, int n, void* serv) {
      ComTerpServ* server = (ComTerpServ*)serv;
      int fd = Math::max(server->_fd, 1);
! #if __GNUG__<3
      char* instr;
      filebuf fbuf;
      fbuf.attach(fd);
--- 145,151 ----
  char* ComTerpServ::fd_fgets(char* s, int n, void* serv) {
      ComTerpServ* server = (ComTerpServ*)serv;
      int fd = Math::max(server->_fd, 1);
! #if __GNUC__<3
      char* instr;
      filebuf fbuf;
      fbuf.attach(fd);
***************
*** 179,185 ****
      /* append a null byte */
      outstr[outpos] = '\0';
  
! #if __GNUG__>=3
      if (ifptr) fclose(ifptr);
  #endif
  
--- 179,185 ----
      /* append a null byte */
      outstr[outpos] = '\0';
  
! #if __GNUC__>=3
      if (ifptr) fclose(ifptr);
  #endif
  
***************
*** 193,199 ****
      int& bufsize = server->_bufsiz;
  
      int fd = (int)server->_fd;
! #if __GNUG__<3
      filebuf fbuf;
      fbuf.attach(fd);
  #else
--- 193,199 ----
      int& bufsize = server->_bufsiz;
  
      int fd = (int)server->_fd;
! #if __GNUC__<3
      filebuf fbuf;
      fbuf.attach(fd);
  #else
***************
*** 205,211 ****
  	out.put(s[outpos]);
      out.flush();
      outpos = 0;
! #if __GNUG__>=3
      if (ofptr) fclose(ofptr);
  #endif
      return 1;
--- 205,211 ----
  	out.put(s[outpos]);
      out.flush();
      outpos = 0;
! #if __GNUC__>=3
      if (ofptr) fclose(ofptr);
  #endif
      return 1;
***************
*** 286,292 ****
      char inbuf[bufsiz];
      char outbuf[bufsiz];
      inbuf[0] = '\0';
! #if __GNUG__<3
      filebuf ibuf;
      ibuf.open(filename, "r");
  #else
--- 286,292 ----
      char inbuf[bufsiz];
      char outbuf[bufsiz];
      inbuf[0] = '\0';
! #if __GNUC__<3
      filebuf ibuf;
      ibuf.open(filename, "r");
  #else
***************
*** 310,316 ****
  	if (*inbuf && read_expr()) {
  	    if (eval_expr(true)) {
  	        err_print( stderr, "comterp" );
! #if __GNUG__<3
  	        filebuf obuf(handler() ? handler()->get_handle() : 1);
  #else
                  FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); 
--- 310,316 ----
  	if (*inbuf && read_expr()) {
  	    if (eval_expr(true)) {
  	        err_print( stderr, "comterp" );
! #if __GNUC__<3
  	        filebuf obuf(handler() ? handler()->get_handle() : 1);
  #else
                  FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); 
***************
*** 318,324 ****
  #endif
  		ostream ostr(&obuf);
  		ostr.flush();
! #if __GNUG__>=3
                  if (ofptr) fclose(ofptr);
  #endif
  		status = -1;
--- 318,324 ----
  #endif
  		ostream ostr(&obuf);
  		ostr.flush();
! #if __GNUC__>=3
                  if (ofptr) fclose(ofptr);
  #endif
  		status = -1;
***************
*** 331,337 ****
  	    }
  	} else 	if (*inbuf) {
  	  err_print( stderr, "comterp" );
! #if __GNUG__<3
  	  filebuf obuf(handler() ? handler()->get_handle() : 1);
  #else
            FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); 
--- 331,337 ----
  	    }
  	} else 	if (*inbuf) {
  	  err_print( stderr, "comterp" );
! #if __GNUC__<3
  	  filebuf obuf(handler() ? handler()->get_handle() : 1);
  #else
            FILE* ofptr = fdopen(handler() ? handler()->get_handle() : 1, "w"); 
***************
*** 339,345 ****
  #endif
  	  ostream ostr(&obuf);
  	  ostr.flush();
! #if __GNUG__>=3
            if (ofptr) fclose(ofptr);
  #endif
  	  status = -1;
--- 339,345 ----
  #endif
  	  ostream ostr(&obuf);
  	  ostr.flush();
! #if __GNUC__>=3
            if (ofptr) fclose(ofptr);
  #endif
  	  status = -1;
Index: ComTerp/ctrlfunc.c
diff -c ComTerp/ctrlfunc.c:1.3 ComTerp/ctrlfunc.c:1.4
*** ComTerp/ctrlfunc.c:1.3	Wed Jul 24 15:24:42 2002
--- src/ComTerp/ctrlfunc.c	Fri Aug  2 11:34:29 2002
***************
*** 34,40 ****
  
  #define TITLE "CtrlFunc"
  
! #if __GNUG__>=3
  static char newline;
  #endif
  
--- 34,40 ----
  
  #define TITLE "CtrlFunc"
  
! #if __GNUC__>=3
  static char newline;
  #endif
  
***************
*** 129,135 ****
        return;
      }
  
! #if __GNUG__<3
      filebuf ofbuf;
      ofbuf.attach(socket.get_handle());
  #else
--- 129,135 ----
        return;
      }
  
! #if __GNUC__<3
      filebuf ofbuf;
      ofbuf.attach(socket.get_handle());
  #else
***************
*** 142,148 ****
      if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n";
      out.flush();
      if (nowaitv.is_false()) {
! #if __GNUG__<3
        filebuf ifbuf;
        ifbuf.attach(socket.get_handle());
        istream in(&ifbuf);
--- 142,148 ----
      if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n";
      out.flush();
      if (nowaitv.is_false()) {
! #if __GNUC__<3
        filebuf ifbuf;
        ifbuf.attach(socket.get_handle());
        istream in(&ifbuf);
Index: ComTerp/debugfunc.c
diff -c ComTerp/debugfunc.c:1.3 ComTerp/debugfunc.c:1.4
*** ComTerp/debugfunc.c:1.3	Wed Jul 24 11:00:04 2002
--- src/ComTerp/debugfunc.c	Fri Aug  2 11:34:29 2002
***************
*** 30,36 ****
  #else
  #include <vector.h>
  #endif
! #if __GNUG__>=3
  #include <fstream.h>
  #endif
  
--- 30,36 ----
  #else
  #include <vector.h>
  #endif
! #if __GNUC__>=3
  #include <fstream.h>
  #endif
  
***************
*** 87,93 ****
    cerr << sbuf2_s.str();
  
    comterp()->push_servstate();
! #if __GNUG__<3
    filebuf fbufin;
    if (comterp()->handler()) {
      int fd = max(0, comterp()->handler()->get_handle());
--- 87,93 ----
    cerr << sbuf2_s.str();
  
    comterp()->push_servstate();
! #if __GNUC__<3
    filebuf fbufin;
    if (comterp()->handler()) {
      int fd = max(0, comterp()->handler()->get_handle());
***************
*** 99,105 ****
  		 ? comterp()->handler()->rdfptr() : stdin, ios_base::in);
  #endif
    istream in(&fbufin);
! #if __GNUG__<3
    filebuf fbufout;
    if (comterp()->handler()) {
      int fd = max(1, comterp()->handler()->get_handle());
--- 99,105 ----
  		 ? comterp()->handler()->rdfptr() : stdin, ios_base::in);
  #endif
    istream in(&fbufin);
! #if __GNUC__<3
    filebuf fbufout;
    if (comterp()->handler()) {
      int fd = max(1, comterp()->handler()->get_handle());
Index: ComTerp/helpfunc.c
diff -c ComTerp/helpfunc.c:1.2 ComTerp/helpfunc.c:1.3
*** ComTerp/helpfunc.c:1.2	Wed Jul 24 11:00:04 2002
--- src/ComTerp/helpfunc.c	Fri Aug  2 11:34:29 2002
***************
*** 34,40 ****
  
  #include <iostream.h>
  #include <strstream.h>
! #if __GNUG__>=3
  #include <fstream.h>
  #endif
  
--- 34,40 ----
  
  #include <iostream.h>
  #include <strstream.h>
! #if __GNUC__>=3
  #include <fstream.h>
  #endif
  
***************
*** 127,133 ****
    reset_stack();
  
    strstreambuf sbuf;
! #if __GNUG__<3
    filebuf fbuf;
    if (comterp()->handler()) {
      int fd = Math::max(1, comterp()->handler()->get_handle());
--- 127,133 ----
    reset_stack();
  
    strstreambuf sbuf;
! #if __GNUC__<3
    filebuf fbuf;
    if (comterp()->handler()) {
      int fd = Math::max(1, comterp()->handler()->get_handle());
***************
*** 168,174 ****
  #else
  	    *out << '\n';
  #endif
! #if __GNUG__<3
  	  out->form(comfuncs[i]->docstring(), symbol_pntr(command_ids[i]));
  #else
  	  {
--- 168,174 ----
  #else
  	    *out << '\n';
  #endif
! #if __GNUC__<3
  	  out->form(comfuncs[i]->docstring(), symbol_pntr(command_ids[i]));
  #else
  	  {
***************
*** 198,204 ****
  		  first = false;
  		else
  		  out->put('\n');
! #if __GNUG__<3
  		out->form(comfunc->docstring(), symbol_pntr(value->command_symid()));
  #else
  		{
--- 198,204 ----
  		  first = false;
  		else
  		  out->put('\n');
! #if __GNUC__<3
  		out->form(comfunc->docstring(), symbol_pntr(value->command_symid()));
  #else
  		{
Index: ComTerp/iofunc.c
diff -c ComTerp/iofunc.c:1.2 ComTerp/iofunc.c:1.3
*** ComTerp/iofunc.c:1.2	Wed Jul 24 11:00:04 2002
--- src/ComTerp/iofunc.c	Fri Aug  2 11:34:29 2002
***************
*** 31,37 ****
  #include <OS/math.h>
  #include <iostream.h>
  #include <strstream.h>
! #if __GNUG__>=3
  #include <fstream.h>
  #endif
  
--- 31,37 ----
  #include <OS/math.h>
  #include <iostream.h>
  #include <strstream.h>
! #if __GNUC__>=3
  #include <fstream.h>
  #endif
  
***************
*** 60,66 ****
    const char* fstr = formatstr.is_string() ? formatstr.string_ptr() : "nil";
    ComValue::comterp(comterp());
  
! #if __GNUG__<3
    streambuf* strmbuf = nil;
    if (stringflag.is_false() && strflag.is_false() &&
        symbolflag.is_false() && symflag.is_false()) {
--- 60,66 ----
    const char* fstr = formatstr.is_string() ? formatstr.string_ptr() : "nil";
    ComValue::comterp(comterp());
  
! #if __GNUC__<3
    streambuf* strmbuf = nil;
    if (stringflag.is_false() && strflag.is_false() &&
        symbolflag.is_false() && symflag.is_false()) {
Index: ComTerp/parser.c
diff -c ComTerp/parser.c:1.1 ComTerp/parser.c:1.2
*** ComTerp/parser.c:1.1	Fri Nov  2 13:04:49 2001
--- src/ComTerp/parser.c	Fri Aug  2 11:34:29 2002
***************
*** 29,35 ****
  
  #define TITLE "Parser"
  
! #if __GNUG__>=3
  static char newline;
  #endif
  
--- 29,35 ----
  
  #define TITLE "Parser"
  
! #if __GNUC__>=3
  static char newline;
  #endif
  
***************
*** 135,141 ****
  
  char* Parser::istream_fgets(char* s, int n, void* instreamp) {
    istream& in  = *(istream*)instreamp;
! #if __GNUG__<3
    char *instr;
    in.gets(&instr);
  #else
--- 135,141 ----
  
  char* Parser::istream_fgets(char* s, int n, void* instreamp) {
    istream& in  = *(istream*)instreamp;
! #if __GNUC__<3
    char *instr;
    in.gets(&instr);
  #else
Index: ComTerp/postfunc.c
diff -c ComTerp/postfunc.c:1.2 ComTerp/postfunc.c:1.3
*** ComTerp/postfunc.c:1.2	Wed Jul 24 11:00:04 2002
--- src/ComTerp/postfunc.c	Fri Aug  2 11:34:29 2002
***************
*** 33,39 ****
  #include <OS/math.h>
  
  #include <iostream.h>
! #if __GNUG__>=3
  #include <fstream.h>
  #endif
  
--- 33,39 ----
  #include <OS/math.h>
  
  #include <iostream.h>
! #if __GNUC__>=3
  #include <fstream.h>
  #endif
  
***************
*** 46,52 ****
  
  void PostFixFunc::execute() {
    // print everything on the stack for this function
! #if __GNUG__<3
    filebuf fbuf;
    if (comterp()->handler()) {
      int fd = Math::max(1, comterp()->handler()->get_handle());
--- 46,52 ----
  
  void PostFixFunc::execute() {
    // print everything on the stack for this function
! #if __GNUC__<3
    filebuf fbuf;
    if (comterp()->handler()) {
      int fd = Math::max(1, comterp()->handler()->get_handle());
Index: comtest/main.c
diff -c comtest/main.c:1.1 comtest/main.c:1.2
*** comtest/main.c:1.1	Fri Nov  2 13:04:51 2001
--- src/comtest/main.c	Fri Aug  2 11:34:30 2002
***************
*** 24,29 ****
--- 24,30 ----
  #include <ComTerp/scanner.h>
  
  #include <iostream.h>
+ #include <string.h>
  
  char* type_names[] = {
  	"None",
Index: comterp/main.c
diff -c comterp/main.c:1.2 comterp/main.c:1.3
*** comterp/main.c:1.2	Wed Jul 24 15:24:44 2002
--- src/comterp_/main.c	Fri Aug  2 11:34:32 2002
***************
*** 55,61 ****
  FPointObj fp(0.,0.);
  #endif
  
! #if __GNUG__>=3
  static char newline;
  #endif
  
--- 55,61 ----
  FPointObj fp(0.,0.);
  #endif
  
! #if __GNUC__>=3
  static char newline;
  #endif
  
***************
*** 128,134 ****
  
      if (!telcat_flag) {
        
! #if __GNUG__<3
        filebuf obuf;
        obuf.attach(server.get_handle());
  #else
--- 128,134 ----
  
      if (!telcat_flag) {
        
! #if __GNUC__<3
        filebuf obuf;
        obuf.attach(server.get_handle());
  #else
***************
*** 137,143 ****
  #endif
        ostream out(&obuf);
        
! #if __GNUG__<3
        filebuf ibuf;
        ibuf.attach(server.get_handle());
  #else
--- 137,143 ----
  #endif
        ostream out(&obuf);
        
! #if __GNUC__<3
        filebuf ibuf;
        ibuf.attach(server.get_handle());
  #else
***************
*** 152,158 ****
  	if (feof(inptr)) break;
  	out << buffer;
  	out.flush();
! #if __GNUG__<3
  	char* inbuf;
  	char ch;
  	ch = in.get();
--- 152,158 ----
  	if (feof(inptr)) break;
  	out << buffer;
  	out.flush();
! #if __GNUC__<3
  	char* inbuf;
  	char ch;
  	ch = in.get();
***************
*** 180,186 ****
  #endif
        }
  
! #if __GNUG__>=3
        if (ofptr) fclose(ofptr);
        if (ifptr) fclose(ifptr);
  #endif
--- 180,186 ----
  #endif
        }
  
! #if __GNUC__>=3
        if (ofptr) fclose(ofptr);
        if (ifptr) fclose(ifptr);
  #endif
***************
*** 188,194 ****
      } else if (inptr) {
  
  
! #if __GNUG__<3
        filebuf inbuf;
        inbuf.attach(fileno(inptr));
  #else
--- 188,194 ----
      } else if (inptr) {
  
  
! #if __GNUC__<3
        filebuf inbuf;
        inbuf.attach(fileno(inptr));
  #else
***************
*** 197,203 ****
        istream in(&inbuf);
        
  
! #if __GNUG__<3
        filebuf obuf;
        obuf.attach(server.get_handle());
  #else
--- 197,203 ----
        istream in(&inbuf);
        
  
! #if __GNUC__<3
        filebuf obuf;
        obuf.attach(server.get_handle());
  #else
***************
*** 213,219 ****
  	  out.write(buffer, in.gcount());
        }
        out.flush();
! #if __GNUG__>=3
        if (ofptr) fclose(ofptr);
  #endif
      } else 
--- 213,219 ----
  	  out.write(buffer, in.gcount());
        }
        out.flush();
! #if __GNUC__>=3
        if (ofptr) fclose(ofptr);
  #endif
      } else 
Index: src_os/string.c
diff -c src_os/string.c:1.3 src_os/string.c:1.4
*** src_os/string.c:1.3	Fri Mar  1 14:10:09 2002
--- src/OS/string.c	Fri Aug  2 11:34:35 2002
***************
*** 337,343 ****
  };
  
  ostream& operator<< (ostream& out, const String& str) {
! #if defined(sun) && !defined(solaris) || __GNUG__>=3
    out.write(str.string(), str.length());
  #else
    out.write(str.string(), (streamsize)str.length());
--- 337,343 ----
  };
  
  ostream& operator<< (ostream& out, const String& str) {
! #if defined(sun) && !defined(solaris) || __GNUC__>=3
    out.write(str.string(), str.length());
  #else
    out.write(str.string(), (streamsize)str.length());
Index: src_dispatch/dispatcher.c
diff -c src_dispatch/dispatcher.c:1.3 src_dispatch/dispatcher.c:1.4
*** src_dispatch/dispatcher.c:1.3	Fri Mar  1 14:10:11 2002
--- src/Dispatch/dispatcher.c	Fri Aug  2 11:34:37 2002
***************
*** 60,66 ****
  #endif
  }
  
! #if defined(__GLIBC__) && (__GLIBC__==2 && __GLIBC_MINOR__>0 || __GLIBC__>2) && __GNUG__<3
  #define fds_bits __fds_bits
  #endif
  
--- 60,66 ----
  #endif
  }
  
! #if defined(__GLIBC__) && (__GLIBC__==2 && __GLIBC_MINOR__>0 || __GLIBC__>2) && __GNUC__<3
  #define fds_bits __fds_bits
  #endif
  
***************
*** 633,639 ****
  ) {
      int nfound;
  #ifdef SV_INTERRUPT                   /* BSD-style */
! #if defined(sun) && defined(__GNUG__)
      static struct sigaction sv, osv;
  #else
      static struct sigvec sv, osv;
--- 633,639 ----
  ) {
      int nfound;
  #ifdef SV_INTERRUPT                   /* BSD-style */
! #if defined(sun) && defined(__GNUC__)
      static struct sigaction sv, osv;
  #else
      static struct sigvec sv, osv;
***************
*** 648,654 ****
  
      if (!_cqueue->isEmpty()) {
  #ifdef SV_INTERRUPT                   /* BSD-style */
! #if defined(sun) && defined(__GNUG__)
  	sv.sa_handler = fxSIGVECHANDLER(&Dispatcher::sigCLD);
  	sv.sa_flags = SV_INTERRUPT;
  	sigaction(SIGCLD, &sv, &osv);
--- 648,654 ----
  
      if (!_cqueue->isEmpty()) {
  #ifdef SV_INTERRUPT                   /* BSD-style */
! #if defined(sun) && defined(__GNUC__)
  	sv.sa_handler = fxSIGVECHANDLER(&Dispatcher::sigCLD);
  	sv.sa_flags = SV_INTERRUPT;
  	sigaction(SIGCLD, &sv, &osv);
***************
*** 694,700 ****
      } while (nfound < 0 && !handleError());
      if (!_cqueue->isEmpty()) {
  #ifdef SV_INTERRUPT                   /* BSD-style */
! #if defined(sun) && defined(__GNUG__)
  	sigaction(SIGCLD, &osv, (struct sigaction*) 0);
  #else
  	sigvec(SIGCLD, &osv, (struct sigvec*) 0);
--- 694,700 ----
      } while (nfound < 0 && !handleError());
      if (!_cqueue->isEmpty()) {
  #ifdef SV_INTERRUPT                   /* BSD-style */
! #if defined(sun) && defined(__GNUC__)
  	sigaction(SIGCLD, &osv, (struct sigaction*) 0);
  #else
  	sigvec(SIGCLD, &osv, (struct sigvec*) 0);
Index: IVGlyph/printchooser.c
diff -c IVGlyph/printchooser.c:1.1 IVGlyph/printchooser.c:1.2
*** IVGlyph/printchooser.c:1.1	Fri Nov  2 13:05:31 2001
--- src/IVGlyph/printchooser.c	Fri Aug  2 11:34:41 2002
***************
*** 50,55 ****
--- 50,56 ----
  
  #include <iostream.h>
  #include <stdio.h>
+ #include <string.h>
  
  implementActionCallback(PrintChooserImpl)
  implementFieldEditorCallback(PrintChooserImpl)
Index: ComGlyph/comtextview.c
diff -c ComGlyph/comtextview.c:1.1 ComGlyph/comtextview.c:1.2
*** ComGlyph/comtextview.c:1.1	Fri Nov  2 13:06:40 2001
--- src/ComGlyph/comtextview.c	Fri Aug  2 11:35:09 2002
***************
*** 50,55 ****
--- 50,56 ----
  #include <ctype.h>
  #include <iostream.h>
  #include <strstream.h>
+ #include <string.h>
  
  #define XK_MISCELLANY           /* to get the keysym's we need */
  #include <X11/keysymdef.h>
Index: Unidraw/catalog.c
diff -c Unidraw/catalog.c:1.3 Unidraw/catalog.c:1.4
*** Unidraw/catalog.c:1.3	Wed Feb 20 11:54:00 2002
--- src/Unidraw/catalog.c	Fri Aug  2 11:35:16 2002
***************
*** 276,282 ****
      _curMap = nil;
      _substMap = new ObjectMap(nil, COMPONENT);
      _clipboard = new Clipboard;
! #ifdef __GNUG__
      _tmpfile = nil;
  #endif
  
--- 276,282 ----
      _curMap = nil;
      _substMap = new ObjectMap(nil, COMPONENT);
      _clipboard = new Clipboard;
! #ifdef __GNUC__
      _tmpfile = nil;
  #endif
  
***************
*** 367,373 ****
      _clipboard->DeleteComps();
      delete _clipboard;
  
! #ifdef __GNUG__
      if (_tmpfile != nil) {
          unlink(_tmpfile);
          delete _tmpfile;
--- 367,373 ----
      _clipboard->DeleteComps();
      delete _clipboard;
  
! #ifdef __GNUC__
      if (_tmpfile != nil) {
          unlink(_tmpfile);
          delete _tmpfile;
***************
*** 668,674 ****
      ObjectMap empty_subst_map(obj, base_id);    // copies
      _substMap = &empty_subst_map;
  
! #ifdef __GNUG__
      filebuf obuf, ibuf;
      ObjectMap* prevMap = _curMap;
      char* prevTmp = _tmpfile;
--- 668,674 ----
      ObjectMap empty_subst_map(obj, base_id);    // copies
      _substMap = &empty_subst_map;
  
! #ifdef __GNUC__
      filebuf obuf, ibuf;
      ObjectMap* prevMap = _curMap;
      char* prevTmp = _tmpfile;
Index: OverlayUnidraw/aceimport.c
diff -c OverlayUnidraw/aceimport.c:1.2 OverlayUnidraw/aceimport.c:1.3
*** OverlayUnidraw/aceimport.c:1.2	Wed Jul 24 15:25:09 2002
--- src/OverlayUnidraw/aceimport.c	Fri Aug  2 11:35:24 2002
***************
*** 89,95 ****
      }
      return _inptr->good() ? 0 : -1;
  #else
! #if __GNUG__<3
      filebuf fbuf;
      if(fbuf.attach(fd)==0) return -1;
  #else
--- 89,95 ----
      }
      return _inptr->good() ? 0 : -1;
  #else
! #if __GNUC__<3
      filebuf fbuf;
      if(fbuf.attach(fd)==0) return -1;
  #else
Index: OverlayUnidraw/aceimport.h
diff -c OverlayUnidraw/aceimport.h:1.4 OverlayUnidraw/aceimport.h:1.5
*** OverlayUnidraw/aceimport.h:1.4	Mon Jul 29 17:45:08 2002
--- src/OverlayUnidraw/aceimport.h	Fri Aug  2 11:35:24 2002
***************
*** 64,70 ****
    // host we are connected to.
  
    OvImportCmd* _import_cmd; // associated import command
! #if __GNUG__<3
    filebuf* _filebuf;
  #else				 
    fileptr_filebuf* _filebuf;        // associated input buffer#
--- 64,70 ----
    // host we are connected to.
  
    OvImportCmd* _import_cmd; // associated import command
! #if __GNUC__<3
    filebuf* _filebuf;
  #else				 
    fileptr_filebuf* _filebuf;        // associated input buffer#
Index: OverlayUnidraw/ovcatalog.c
diff -c OverlayUnidraw/ovcatalog.c:1.3 OverlayUnidraw/ovcatalog.c:1.4
*** OverlayUnidraw/ovcatalog.c:1.3	Wed Jul 24 11:00:26 2002
--- src/OverlayUnidraw/ovcatalog.c	Fri Aug  2 11:35:24 2002
***************
*** 181,187 ****
          _valid = true;
  
      } else {
! #if __GNUG__<3	  
          filebuf fbuf;
  	if (strcmp(name, "-") == 0) {
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
--- 181,187 ----
          _valid = true;
  
      } else {
! #if __GNUC__<3	  
          filebuf fbuf;
  	if (strcmp(name, "-") == 0) {
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
Index: OverlayUnidraw/ovcomps.c
diff -c OverlayUnidraw/ovcomps.c:1.2 OverlayUnidraw/ovcomps.c:1.3
*** OverlayUnidraw/ovcomps.c:1.2	Thu Aug  1 11:39:47 2002
--- src/OverlayUnidraw/ovcomps.c	Fri Aug  2 11:35:24 2002
***************
*** 60,66 ****
  #include <unistd.h>
  #include <stdlib.h>
  
! #if __GNUG__<3
  extern "C" 
  {
    char* realpath();
--- 60,66 ----
  #include <unistd.h>
  #include <stdlib.h>
  
! #if __GNUC__<2 || __GNUC__==2 && __GNUC_MINOR__<96
  extern "C" 
  {
    char* realpath();
Index: OverlayUnidraw/ovfile.c
diff -c OverlayUnidraw/ovfile.c:1.2 OverlayUnidraw/ovfile.c:1.3
*** OverlayUnidraw/ovfile.c:1.2	Wed Jul 24 11:00:26 2002
--- src/OverlayUnidraw/ovfile.c	Fri Aug  2 11:35:24 2002
***************
*** 220,226 ****
        OvImportCmd impcmd((Editor*)nil);
        FILE* fptr = popen(pathname, "r");
        if (fptr) {
! #if __GNUG__<3
  	ifstream ifs;
  	ifs.rdbuf()->attach(fileno(fptr));
  #else
--- 220,226 ----
        OvImportCmd impcmd((Editor*)nil);
        FILE* fptr = popen(pathname, "r");
        if (fptr) {
! #if __GNUC__<3
  	ifstream ifs;
  	ifs.rdbuf()->attach(fileno(fptr));
  #else
Index: OverlayUnidraw/ovimport.c
diff -c OverlayUnidraw/ovimport.c:1.11 OverlayUnidraw/ovimport.c:1.12
*** OverlayUnidraw/ovimport.c:1.11	Wed Jul 31 15:11:09 2002
--- src/OverlayUnidraw/ovimport.c	Fri Aug  2 11:35:24 2002
***************
*** 116,122 ****
  implementPtrList(StreamList,istream)
  implementPtrList(HandlerList,ReadImageHandler)
  
! #if __GNUG__>=3
  static char newline;
  #endif
  
--- 116,122 ----
  implementPtrList(StreamList,istream)
  implementPtrList(HandlerList,ReadImageHandler)
  
! #if __GNUC__>=3
  static char newline;
  #endif
  
***************
*** 462,468 ****
  
      if (pos >= 0) { 
  
! #if __GNUG__<3
        char* buffer;
        in.gets(&buffer);
  #else
--- 462,468 ----
  
      if (pos >= 0) { 
  
! #if __GNUC__<3
        char* buffer;
        in.gets(&buffer);
  #else
***************
*** 478,484 ****
  
        u_long width, height;
        do { 
! #if __GNUG__<3	
          in.gets(&buffer);
  #else
  	in.get(buffer,BUFSIZ);
--- 478,484 ----
  
        u_long width, height;
        do { 
! #if __GNUC__<3	
          in.gets(&buffer);
  #else
  	in.get(buffer,BUFSIZ);
***************
*** 487,493 ****
        } while (buffer[0] == '#');
        sscanf(buffer, "%d %d", &width, &height);
  
! #if __GNUG__<3	
        in.gets(&buffer);
  #else
        in.get(buffer,BUFSIZ);
--- 487,493 ----
        } while (buffer[0] == '#');
        sscanf(buffer, "%d %d", &width, &height);
  
! #if __GNUC__<3	
        in.gets(&buffer);
  #else
        in.get(buffer,BUFSIZ);
***************
*** 599,605 ****
  
      clr_fl(_fd, O_NONBLOCK);
  
! #if __GNUG__<3
      ifstream* ifs = new ifstream;
      ifs->rdbuf()->attach(_fd);
  #else
--- 599,605 ----
  
      clr_fl(_fd, O_NONBLOCK);
  
! #if __GNUC__<3
      ifstream* ifs = new ifstream;
      ifs->rdbuf()->attach(_fd);
  #else
***************
*** 608,614 ****
      istream* ifs = new istream(fbuf);
  #endif
      _helper.add_stream(ifs);
! #if __GNUG__>=3
      _helper.add_file(ifptr);
  #endif
      boolean empty;
--- 608,614 ----
      istream* ifs = new istream(fbuf);
  #endif
      _helper.add_stream(ifs);
! #if __GNUC__>=3
      _helper.add_file(ifptr);
  #endif
      boolean empty;
***************
*** 1093,1099 ****
        } else if (!is_url()) {
  	fptr = popen(path_, "r");
  	if (fptr) {
! #if __GNUG__<3
  	  ifstream* ifs = new ifstream;
            ifs->rdbuf()->attach(fileno(fptr));
  #else
--- 1093,1099 ----
        } else if (!is_url()) {
  	fptr = popen(path_, "r");
  	if (fptr) {
! #if __GNUC__<3
  	  ifstream* ifs = new ifstream;
            ifs->rdbuf()->attach(fileno(fptr));
  #else
***************
*** 1399,1405 ****
      
  
      if (fptr) {
! #if __GNUG__<3
        ifstream* in = new ifstream;
        in->rdbuf()->attach(fileno(fptr));
  #else
--- 1399,1405 ----
      
  
      if (fptr) {
! #if __GNUC__<3
        ifstream* in = new ifstream;
        in->rdbuf()->attach(fileno(fptr));
  #else
***************
*** 1488,1494 ****
  	gunzip_fptr = popen(buffer, "r");
          helper.add_pipe(gunzip_fptr);
  	if (gunzip_fptr) {
! #if __GNUG__<3
  	  ifstream* ifs = new ifstream;
            ifs->rdbuf()->attach(fileno(gunzip_fptr));
  #else
--- 1488,1494 ----
  	gunzip_fptr = popen(buffer, "r");
          helper.add_pipe(gunzip_fptr);
  	if (gunzip_fptr) {
! #if __GNUC__<3
  	  ifstream* ifs = new ifstream;
            ifs->rdbuf()->attach(fileno(gunzip_fptr));
  #else
***************
*** 1501,1507 ****
        } else {
  	int newfd = Pipe_Filter(instrm, "gunzip -c");
  	if (newfd != -1) {
! #if __GNUG__<3
  	  ifstream* ifs = new ifstream;
            ifs->rdbuf()->attach(newfd);
  #else
--- 1501,1507 ----
        } else {
  	int newfd = Pipe_Filter(instrm, "gunzip -c");
  	if (newfd != -1) {
! #if __GNUC__<3
  	  ifstream* ifs = new ifstream;
            ifs->rdbuf()->attach(newfd);
  #else
***************
*** 1548,1554 ****
  	      new_fd = fileno(pptr);
  	  } else 
  	    new_fd = Pipe_Filter(*in, "tf=`ivtmpnam`;pstoedit -f idraw - $tf.%d;cat $tf.*;rm $tf.*");
! #if __GNUG__<3
  	  ifstream new_in;
            new_in.rdbuf()->attach(new_fd);
  #else
--- 1548,1554 ----
  	      new_fd = fileno(pptr);
  	  } else 
  	    new_fd = Pipe_Filter(*in, "tf=`ivtmpnam`;pstoedit -f idraw - $tf.%d;cat $tf.*;rm $tf.*");
! #if __GNUC__<3
  	  ifstream new_in;
            new_in.rdbuf()->attach(new_fd);
  #else
***************
*** 1586,1592 ****
  	  FILE* pptr = popen(buffer, "r");
  	  if (pptr) {
  	    cerr << "input opened with " << buffer << "\n";
! #if __GNUG__<3
  	    ifstream new_in;
              new_in.rdbuf()->attach(fileno(pptr));
  #else
--- 1586,1592 ----
  	  FILE* pptr = popen(buffer, "r");
  	  if (pptr) {
  	    cerr << "input opened with " << buffer << "\n";
! #if __GNUC__<3
  	    ifstream new_in;
              new_in.rdbuf()->attach(fileno(pptr));
  #else
***************
*** 1650,1656 ****
            helper.add_pipe(pptr);
  	  if (pptr) {
  	    cerr << "input opened with " << buffer << "\n";
! #if __GNUG__<3
  	    ifstream* new_in = new ifstream;
              new_in->rdbuf()->attach(fileno(pptr));
  #else
--- 1650,1656 ----
            helper.add_pipe(pptr);
  	  if (pptr) {
  	    cerr << "input opened with " << buffer << "\n";
! #if __GNUC__<3
  	    ifstream* new_in = new ifstream;
              new_in->rdbuf()->attach(fileno(pptr));
  #else
***************
*** 1680,1686 ****
  	  FILE* pptr = popen(buffer, "r");
  	  if (pptr) {
  	    cerr << "input opened with " << buffer << "\n";
! #if __GNUG__<3
  	    ifstream new_in;
              new_in.rdbuf()->attach(fileno(pptr));
  #else
--- 1680,1686 ----
  	  FILE* pptr = popen(buffer, "r");
  	  if (pptr) {
  	    cerr << "input opened with " << buffer << "\n";
! #if __GNUC__<3
  	    ifstream new_in;
              new_in.rdbuf()->attach(fileno(pptr));
  #else
***************
*** 1943,1949 ****
  
  OverlayRaster* OvImportCmd::PGM_Raster (istream& in, boolean ascii) {
   
! #if __GNUG__<3 
      char* buffer;
      in.gets(&buffer);
  #else
--- 1943,1949 ----
  
  OverlayRaster* OvImportCmd::PGM_Raster (istream& in, boolean ascii) {
   
! #if __GNUC__<3 
      char* buffer;
      in.gets(&buffer);
  #else
***************
*** 1953,1959 ****
  #endif
  
      do {  // CREATOR and other comments
! #if __GNUG__<3 
          in.gets(&buffer);
  #else
  	in.get(buffer, BUFSIZ);
--- 1953,1959 ----
  #endif
  
      do {  // CREATOR and other comments
! #if __GNUC__<3 
          in.gets(&buffer);
  #else
  	in.get(buffer, BUFSIZ);
***************
*** 1963,1969 ****
  
      int nrows, ncols;
      if (sscanf(buffer, "%d %d", &ncols, &nrows)==1) {
! #if __GNUG__<3 
            in.gets(&buffer);
  #else
  	  in.get(buffer, BUFSIZ);
--- 1963,1969 ----
  
      int nrows, ncols;
      if (sscanf(buffer, "%d %d", &ncols, &nrows)==1) {
! #if __GNUC__<3 
            in.gets(&buffer);
  #else
  	  in.get(buffer, BUFSIZ);
***************
*** 1971,1977 ****
  #endif
            sscanf(buffer, "%d", &nrows);
      }
! #if __GNUG__<3 
      in.gets(&buffer);
  #else
      in.get(buffer, BUFSIZ, '\n');
--- 1971,1977 ----
  #endif
            sscanf(buffer, "%d", &nrows);
      }
! #if __GNUC__<3 
      in.gets(&buffer);
  #else
      in.get(buffer, BUFSIZ, '\n');
***************
*** 2381,2387 ****
  
  
  OverlayRaster* OvImportCmd::PPM_Raster (istream& in, boolean ascii) {
! #if __GNUG__<3
      char* buffer;
      in.gets(&buffer); // read magic number
  #else
--- 2381,2387 ----
  
  
  OverlayRaster* OvImportCmd::PPM_Raster (istream& in, boolean ascii) {
! #if __GNUC__<3
      char* buffer;
      in.gets(&buffer); // read magic number
  #else
***************
*** 2391,2397 ****
  #endif
  
      do { // CREATOR and other comments
! #if __GNUG__<3
          in.gets(&buffer);
  #else
  	in.get(buffer,BUFSIZ);
--- 2391,2397 ----
  #endif
  
      do { // CREATOR and other comments
! #if __GNUC__<3
          in.gets(&buffer);
  #else
  	in.get(buffer,BUFSIZ);
***************
*** 2400,2406 ****
      } while (buffer[0] == '#');
      int nrows, ncols;
      sscanf(buffer, "%d %d", &ncols, &nrows);
! #if __GNUG__<3
      in.gets(&buffer);
  #else
      in.get(buffer,BUFSIZ);
--- 2400,2406 ----
      } while (buffer[0] == '#');
      int nrows, ncols;
      sscanf(buffer, "%d %d", &ncols, &nrows);
! #if __GNUC__<3
      in.gets(&buffer);
  #else
      in.get(buffer,BUFSIZ);
***************
*** 2450,2456 ****
      fd = outfd;
    }
    else {
! #if __GNUG__<3    
      ifstream in2;
      in2.rdbuf()->attach(outfd);
  #else
--- 2450,2456 ----
      fd = outfd;
    }
    else {
! #if __GNUC__<3    
      ifstream in2;
      in2.rdbuf()->attach(outfd);
  #else
***************
*** 2463,2469 ****
  
      if(close(outfd)==-1)
        cerr << "error in parent closing last end of the pipes\n";
! #if __GNUG__>=3
      if (infptr) fclose(infptr);
  #endif
    }
--- 2463,2469 ----
  
      if(close(outfd)==-1)
        cerr << "error in parent closing last end of the pipes\n";
! #if __GNUC__>=3
      if (infptr) fclose(infptr);
  #endif
    }
***************
*** 2527,2533 ****
      } else
        if(close(pipe1[0])==-1) 
  	cerr << "error in child close of front end of pipe\n";
! #if __GNUG__<3
      ofstream out;
      out.rdbuf()->attach(pipe1[1]);
      char buffer[BUFSIZ];
--- 2527,2533 ----
      } else
        if(close(pipe1[0])==-1) 
  	cerr << "error in child close of front end of pipe\n";
! #if __GNUC__<3
      ofstream out;
      out.rdbuf()->attach(pipe1[1]);
      char buffer[BUFSIZ];
***************
*** 2708,2714 ****
  Bitmap* OvImportCmd::PBM_Bitmap (istream& in) {
      Bitmap* bitmap = nil;
    
! #if __GNUG__<3
      char* buffer;
      in.gets(&buffer);
  #else
--- 2708,2714 ----
  Bitmap* OvImportCmd::PBM_Bitmap (istream& in) {
      Bitmap* bitmap = nil;
    
! #if __GNUC__<3
      char* buffer;
      in.gets(&buffer);
  #else
***************
*** 2720,2726 ****
      boolean asciiflag = strncmp("P1", buffer, 2) == 0;
    
      do { // CREATOR and other comments
! #if __GNUG__<3
          in.gets(&buffer);
  #else
  	in.get(buffer,BUFSIZ);
--- 2720,2726 ----
      boolean asciiflag = strncmp("P1", buffer, 2) == 0;
    
      do { // CREATOR and other comments
! #if __GNUC__<3
          in.gets(&buffer);
  #else
  	in.get(buffer,BUFSIZ);
***************
*** 2730,2736 ****
  
      int nrows, ncols;
      if (sscanf(buffer, "%d %d", &ncols, &nrows)==1) {
! #if __GNUG__<3
            in.gets(&buffer);
  #else
  	  in.get(buffer,BUFSIZ);
--- 2730,2736 ----
  
      int nrows, ncols;
      if (sscanf(buffer, "%d %d", &ncols, &nrows)==1) {
! #if __GNUC__<3
            in.gets(&buffer);
  #else
  	  in.get(buffer,BUFSIZ);
Index: ComUnidraw/unifunc.c
diff -c ComUnidraw/unifunc.c:1.5 ComUnidraw/unifunc.c:1.6
*** ComUnidraw/unifunc.c:1.5	Wed Jul 24 15:25:12 2002
--- src/ComUnidraw/unifunc.c	Fri Aug  2 11:35:30 2002
***************
*** 53,61 ****
  #include <stdio.h>
  #include <strstream.h>
  #include <unistd.h>
! #if __GNUG__>=3
  #include <fstream.h>
  #endif
  
  #ifdef HAVE_ACE
  #include <ComTerp/comhandler.h>
--- 53,62 ----
  #include <stdio.h>
  #include <strstream.h>
  #include <unistd.h>
! #if __GNUC__>=3
  #include <fstream.h>
  #endif
+ #include <string.h>
  
  #ifdef HAVE_ACE
  #include <ComTerp/comhandler.h>
***************
*** 402,408 ****
  #endif
  
  
! #if __GNUG__<3
      filebuf fbuf;
      if (file.is_type(ComValue::StringType))
          fbuf.open(file.string_ptr(), "w");
--- 403,409 ----
  #endif
  
  
! #if __GNUC__<3
      filebuf fbuf;
      if (file.is_type(ComValue::StringType))
          fbuf.open(file.string_ptr(), "w");
***************
*** 495,501 ****
      if (string.is_true()||str.is_true())
        out = new strstream();
      else
! #if __GNUG__<3      
        out = new ostream(&fbuf);
  #else
        out = new ostream(pfbuf);
--- 496,502 ----
      if (string.is_true()||str.is_true())
        out = new strstream();
      else
! #if __GNUC__<3      
        out = new ostream(&fbuf);
  #else
        out = new ostream(pfbuf);
***************
*** 561,567 ****
      }
      delete out;
  
! #if __GNUG__>=3
      delete pfbuf;
  #endif    
      
--- 562,568 ----
      }
      delete out;
  
! #if __GNUC__>=3
      delete pfbuf;
  #endif    
      
Index: FrameUnidraw/framecatalog.c
diff -c FrameUnidraw/framecatalog.c:1.3 FrameUnidraw/framecatalog.c:1.4
*** FrameUnidraw/framecatalog.c:1.3	Wed Jul 24 11:00:31 2002
--- src/FrameUnidraw/framecatalog.c	Fri Aug  2 11:35:32 2002
***************
*** 55,67 ****
          _valid = true;
  
      } else {
! #if __GNUG__<3
          filebuf fbuf;
  #else
          filebuf* pfbuf = nil;
  #endif
  	if (strcmp(name, "-") == 0) {
! #if __GNUG__<3
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
  #else
  	    pfbuf = new fileptr_filebuf(stdin, input);
--- 55,67 ----
          _valid = true;
  
      } else {
! #if __GNUC__<3
          filebuf fbuf;
  #else
          filebuf* pfbuf = nil;
  #endif
  	if (strcmp(name, "-") == 0) {
! #if __GNUC__<3
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
  #else
  	    pfbuf = new fileptr_filebuf(stdin, input);
***************
*** 71,77 ****
  	} else {
  	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
! #if __GNUG__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
  #else
  	    pfbuf = fptr ? new fileptr_filebuf(fptr, input) : nil;
--- 71,77 ----
  	} else {
  	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
! #if __GNUC__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
  #else
  	    pfbuf = fptr ? new fileptr_filebuf(fptr, input) : nil;
***************
*** 85,91 ****
  	}
  
          if (_valid) {
! #if __GNUG__<3
  	    istream in(&fbuf);
  #else
  	    istream in(pfbuf);
--- 85,91 ----
  	}
  
          if (_valid) {
! #if __GNUC__<3
  	    istream in(&fbuf);
  #else
  	    istream in(pfbuf);
***************
*** 114,120 ****
  	    }
          }
  
! #if __GNUG__>=3
  	delete pfbuf;
  #endif
      }
--- 114,120 ----
  	    }
          }
  
! #if __GNUC__>=3
  	delete pfbuf;
  #endif
      }
Index: GraphUnidraw/graphcatalog.c
diff -c GraphUnidraw/graphcatalog.c:1.3 GraphUnidraw/graphcatalog.c:1.4
*** GraphUnidraw/graphcatalog.c:1.3	Wed Jul 24 11:00:33 2002
--- src/GraphUnidraw/graphcatalog.c	Fri Aug  2 11:35:35 2002
***************
*** 52,58 ****
  #include <stdio.h>
  #include <stream.h>
  #include <string.h>
! #if __GNUG__>=3
  #include <fstream.h>
  #endif
  
--- 52,58 ----
  #include <stdio.h>
  #include <stream.h>
  #include <string.h>
! #if __GNUC__>=3
  #include <fstream.h>
  #endif
  
***************
*** 75,87 ****
          _valid = true;
  
      } else {
! #if __GNUG__<3
          filebuf fbuf;
  #else
  	filebuf* pfbuf = nil;
  #endif
  	if (strcmp(name, "-") == 0) {
! #if __GNUG__<3
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
  #else
  	    pfbuf = new fileptr_filebuf(stdin, input);
--- 75,87 ----
          _valid = true;
  
      } else {
! #if __GNUC__<3
          filebuf fbuf;
  #else
  	filebuf* pfbuf = nil;
  #endif
  	if (strcmp(name, "-") == 0) {
! #if __GNUC__<3
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
  #else
  	    pfbuf = new fileptr_filebuf(stdin, input);
***************
*** 91,97 ****
  	} else {
  	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
! #if __GNUG__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
  #else
  	    pfbuf = new fileptr_filebuf(fptr, input);
--- 91,97 ----
  	} else {
  	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
! #if __GNUC__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
  #else
  	    pfbuf = new fileptr_filebuf(fptr, input);
***************
*** 105,111 ****
  	}
  
          if (_valid) {
! #if __GNUG__<3
  	    istream in(&fbuf);
  #else
  	    istream in(pfbuf);
--- 105,111 ----
  	}
  
          if (_valid) {
! #if __GNUC__<3
  	    istream in(&fbuf);
  #else
  	    istream in(pfbuf);
***************
*** 131,137 ****
  		comp = nil;
  	    }
          }
! #if __GNUG__>=3
  	delete pfbuf;
  #endif
      }
--- 131,137 ----
  		comp = nil;
  	    }
          }
! #if __GNUC__>=3
  	delete pfbuf;
  #endif
      }
Index: DrawServ/drawcatalog.c
diff -c DrawServ/drawcatalog.c:1.4 DrawServ/drawcatalog.c:1.5
*** DrawServ/drawcatalog.c:1.4	Wed Jul 24 11:00:35 2002
--- src/DrawServ/drawcatalog.c	Fri Aug  2 11:35:37 2002
***************
*** 37,43 ****
  #include <iostream.h>
  #include <stdio.h>
  #include <string.h>
! #if __GNUG__>=3
  #include <fstream.h>
  #endif
  
--- 37,43 ----
  #include <iostream.h>
  #include <stdio.h>
  #include <string.h>
! #if __GNUC__>=3
  #include <fstream.h>
  #endif
  
***************
*** 60,72 ****
          _valid = true;
  
      } else {
! #if __GNUG__<3
          filebuf fbuf;
  #else
          filebuf* pfbuf = nil;
  #endif
  	if (strcmp(name, "-") == 0) {
! #if __GNUG__<3
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
  #else
  	    pfbuf = new fileptr_filebuf(stdin, input);
--- 60,72 ----
          _valid = true;
  
      } else {
! #if __GNUC__<3
          filebuf fbuf;
  #else
          filebuf* pfbuf = nil;
  #endif
  	if (strcmp(name, "-") == 0) {
! #if __GNUC__<3
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
  #else
  	    pfbuf = new fileptr_filebuf(stdin, input);
***************
*** 76,82 ****
  	} else {
  	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
! #if __GNUG__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
  #else
  	    pfbuf = new fileptr_filebuf(fptr, input);
--- 76,82 ----
  	} else {
  	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
! #if __GNUC__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
  #else
  	    pfbuf = new fileptr_filebuf(fptr, input);
***************
*** 90,96 ****
  	}
  	
          if (_valid) {
! #if __GNUG__<3
  	    istream in(&fbuf);
  #else
  	    istream in(pfbuf);
--- 90,96 ----
  	}
  	
          if (_valid) {
! #if __GNUC__<3
  	    istream in(&fbuf);
  #else
  	    istream in(pfbuf);
***************
*** 116,122 ****
  		comp = nil;
  	    }
          }
! #if __GNUG__>=3
  	delete pfbuf;
  #endif
      }
--- 116,122 ----
  		comp = nil;
  	    }
          }
! #if __GNUC__>=3
  	delete pfbuf;
  #endif
      }
Index: include_iviv-2_6/minmax.h
diff -c include_iviv-2_6/minmax.h:1.2 include_iviv-2_6/minmax.h:1.3
*** include_iviv-2_6/minmax.h:1.2	Fri Jun 28 12:46:46 2002
--- src/include/IV-2_6/InterViews/minmax.h	Fri Aug  2 11:35:40 2002
***************
*** 59,65 ****
  
  #endif /* !defined(min) && !defined(max) */
  
! #if __GNUG__<3 && 0 /* removed, used Math::round from now on */
  inline int round(double x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); }
  #endif
  
--- 59,65 ----
  
  #endif /* !defined(min) && !defined(max) */
  
! #if __GNUC__<3 && 0 /* removed, used Math::round from now on */
  inline int round(double x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); }
  #endif
  
Index: include_unidraw/catalog.h
diff -c include_unidraw/catalog.h:1.2 include_unidraw/catalog.h:1.3
*** include_unidraw/catalog.h:1.2	Thu Nov 29 07:39:32 2001
--- src/include/Unidraw/catalog.h	Fri Aug  2 11:35:43 2002
***************
*** 227,233 ****
      ObjectMap* _curMap;
      ObjectMap* _substMap;
      float _fileVersion;
! #ifdef __GNUG__
      char* _tmpfile;
  #endif
  
--- 227,233 ----
      ObjectMap* _curMap;
      ObjectMap* _substMap;
      float _fileVersion;
! #ifdef __GNUC__
      char* _tmpfile;
  #endif
  
Index: include_std/fstream.h
diff -c include_std/fstream.h:1.2 include_std/fstream.h:1.3
*** include_std/fstream.h:1.2	Wed Jul 24 11:00:42 2002
--- src/include/ivstd/fstream.h	Fri Aug  2 11:35:46 2002
***************
*** 1,10 ****
  #ifndef _iv_fstream_
  #define _iv_fstream_
  #include_next <fstream.h>
! #if __GNUG__>=3
  #define input ios_base::in
  #define output ios_base::out
! #if __GNUG__>3 || __GNUG__==3 && __GNUC_MINOR__>0
  #include <ext/stdio_filebuf.h>
  #define fileptr_filebuf __gnu_cxx::stdio_filebuf<char>
  #else
--- 1,10 ----
  #ifndef _iv_fstream_
  #define _iv_fstream_
  #include_next <fstream.h>
! #if __GNUC__>=3
  #define input ios_base::in
  #define output ios_base::out
! #if __GNUC__>3 || __GNUC__==3 && __GNUC_MINOR__>0
  #include <ext/stdio_filebuf.h>
  #define fileptr_filebuf __gnu_cxx::stdio_filebuf<char>
  #else
Index: include_std/iostream.h
diff -c include_std/iostream.h:1.2 include_std/iostream.h:1.3
*** include_std/iostream.h:1.2	Fri May 17 13:54:10 2002
--- src/include/ivstd/iostream.h	Fri Aug  2 11:35:46 2002
***************
*** 3,9 ****
  #include <iosfwd>
  #include_next <iostream.h>
  
! #if __GNUG__>=3
  #if 0
  #include <unistd.h>
  
--- 3,9 ----
  #include <iosfwd>
  #include_next <iostream.h>
  
! #if __GNUC__>=3
  #if 0
  #include <unistd.h>
  
Index: include_std/stdio.h
diff -c include_std/stdio.h:1.2 include_std/stdio.h:1.3
*** include_std/stdio.h:1.2	Wed Feb 20 11:54:20 2002
--- src/include/ivstd/stdio.h	Fri Aug  2 11:35:46 2002
***************
*** 1,6 ****
--- 1,8 ----
  #ifndef ivtools_stdio_h
  #define ivtools_stdio_h
  
+ #include <string.h> /* to work-around RedHat 7.* problem */
+ 
  #if defined(__cplusplus)
  #include_next <stdio.h>
  #else
Index: include_std/version.h
diff -c include_std/version.h:1.6 include_std/version.h:1.7
*** include_std/version.h:1.6	Thu Aug  1 11:52:22 2002
--- src/include/ivstd/version.h	Fri Aug  2 11:35:46 2002
***************
*** 1,3 ****
! #define IvtoolsVersion 1.0.5
! #define VersionString "1.0.5"
! #define ReleaseString "ivtools-1.0.5"
--- 1,3 ----
! #define IvtoolsVersion 1.0.6
! #define VersionString "1.0.6"
! #define ReleaseString "ivtools-1.0.6"
Index: utils_ivtools/thrower.cc
diff -c utils_ivtools/thrower.cc:1.1 utils_ivtools/thrower.cc:1.2
*** utils_ivtools/thrower.cc:1.1	Fri Nov  2 13:07:54 2001
--- src/utils/thrower.cc	Fri Aug  2 11:35:48 2002
***************
*** 23,30 ****
  */
  
  #include "thrower.h"
  
! // Yes this is utterly simple, but can be revised for more sofisticated
  // error handling without editing all of the other files involved in 
  // the downloader program.        
  
--- 23,31 ----
  */
  
  #include "thrower.h"
+ #include <stdlib.h>
  
! // Yes this is utterly simple, but can be revised for more sophisticated
  // error handling without editing all of the other files involved in 
  // the downloader program.        
  
Index: config_ivtools/params.def
diff -c config_ivtools/params.def:1.7 config_ivtools/params.def:1.8
*** config_ivtools/params.def:1.7	Thu Aug  1 11:52:24 2002
--- config/params.def	Fri Aug  2 11:35:52 2002
***************
*** 27,33 ****
   * Name of the software release
   */
  #ifndef Release
! #define	Release ivtools-1.0.5
  #endif
  
     RELEASE = Release
--- 27,33 ----
   * Name of the software release
   */
  #ifndef Release
! #define	Release ivtools-1.0.6
  #endif
  
     RELEASE = Release
***************
*** 36,42 ****
   * VersionNumber
   */
  #ifndef Version
! #define	Version 1.0.5
  #endif
  
     VERSION = Version
--- 36,42 ----
   * VersionNumber
   */
  #ifndef Version
! #define	Version 1.0.6
  #endif
  
     VERSION = Version
*** /dev/null	 Fri Aug 2 11:35:55 PDT 2002
--- patches/ivtools-020802-johnston-064
*************** patches/ivtools-020802-johnston-064
*** 0 ****
--- 1 ----
+ ivtools-020802-johnston-064


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf