"gcc-3.1 with ACE"

[email protected] Wed, 24 Jul 2002 15:29:08 -0700
Newsgroups gmane.comp.lib.ivtools.patches
Message-ID <[email protected]>
Patch:    ivtools-020724-johnston-059
For:      ivtools-1.0.4
Author:   [email protected]
Subject:  gcc-3.1 with ACE
Requires: 

This is an intermediate patch to ivtools-1.0.4.  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:

- fixes for using ACE and ivtools with gcc-3.1

Index: ComTerp/comhandler.c
diff -c ComTerp/comhandler.c:1.4 ComTerp/comhandler.c:1.5
*** ComTerp/comhandler.c:1.4	Wed Jul 24 11:00:04 2002
--- src/ComTerp/comhandler.c	Wed Jul 24 15:24:42 2002
***************
*** 28,33 ****
--- 28,34 ----
  #include <ComTerp/comterpserv.h>
  
  #include <iostream.h>
+ #include <fstream.h>
  #if __GNUC__==2 && __GNUC_MINOR__<=7
  #else
  #include <vector.h>
Index: ComTerp/ctrlfunc.c
diff -c ComTerp/ctrlfunc.c:1.2 ComTerp/ctrlfunc.c:1.3
*** ComTerp/ctrlfunc.c:1.2	Wed Jul 24 11:00:04 2002
--- src/ComTerp/ctrlfunc.c	Wed Jul 24 15:24:42 2002
***************
*** 26,31 ****
--- 26,32 ----
  #include <ComTerp/comvalue.h>
  #include <ComTerp/comterpserv.h>
  #include <Attribute/attrlist.h>
+ #include <fstream.h>
  
  #ifdef HAVE_ACE
  #include <ace/SOCK_Connector.h>
Index: comterp/main.c
diff -c comterp/main.c:1.1 comterp/main.c:1.2
*** comterp/main.c:1.1	Fri Nov  2 13:04:52 2001
--- src/comterp_/main.c	Wed Jul 24 15:24:44 2002
***************
*** 32,37 ****
--- 32,39 ----
  static const char *const SERVER_HOST = ACE_DEFAULT_SERVER_HOST;
  #endif
  
+ #include <fstream.h>
+ 
  #include <iostream.h>
  #include <string.h>
  
***************
*** 131,137 ****
        obuf.attach(server.get_handle());
  #else
        FILE* ofptr = nil;
!       filebuf obuf(ofptr = fdopen(server.get_handle(), "w"), ios_base::out);
  #endif
        ostream out(&obuf);
        
--- 133,139 ----
        obuf.attach(server.get_handle());
  #else
        FILE* ofptr = nil;
!       fileptr_filebuf obuf(ofptr = fdopen(server.get_handle(), "w"), ios_base::out);
  #endif
        ostream out(&obuf);
        
***************
*** 140,146 ****
        ibuf.attach(server.get_handle());
  #else
        FILE* ifptr = nil;
!       filebuf ibuf(ifptr = fdopen(server.get_handle(), "r"), ios_base::in);
  #endif
        
        istream in(&ibuf);
--- 142,148 ----
        ibuf.attach(server.get_handle());
  #else
        FILE* ifptr = nil;
!       fileptr_filebuf ibuf(ifptr = fdopen(server.get_handle(), "r"), ios_base::in);
  #endif
        
        istream in(&ibuf);
***************
*** 190,196 ****
        filebuf inbuf;
        inbuf.attach(fileno(inptr));
  #else
!       filebuf inbuf(inptr, ios_base::in);
  #endif
        istream in(&inbuf);
        
--- 192,198 ----
        filebuf inbuf;
        inbuf.attach(fileno(inptr));
  #else
!       fileptr_filebuf inbuf(inptr, ios_base::in);
  #endif
        istream in(&inbuf);
        
***************
*** 200,206 ****
        obuf.attach(server.get_handle());
  #else
        FILE* ofptr = nil;
!       filebuf obuf(fdopen(server.get_handle(), "w"), ios_base::out);
  #endif
        ostream out(&obuf);
  
--- 202,208 ----
        obuf.attach(server.get_handle());
  #else
        FILE* ofptr = nil;
!       fileptr_filebuf obuf(fdopen(server.get_handle(), "w"), ios_base::out);
  #endif
        ostream out(&obuf);
  
Index: OverlayUnidraw/aceimport.c
diff -c OverlayUnidraw/aceimport.c:1.1 OverlayUnidraw/aceimport.c:1.2
*** OverlayUnidraw/aceimport.c:1.1	Fri Nov  2 13:07:02 2001
--- src/OverlayUnidraw/aceimport.c	Wed Jul 24 15:25:09 2002
***************
*** 30,35 ****
--- 30,36 ----
  #include <IVGlyph/importchooser.h>
  #include <Unidraw/iterator.h>
  #include <Unidraw/unidraw.h>
+ #include <fstream.h>
  #include <stdio.h>
  
  /*****************************************************************************/
***************
*** 93,99 ****
      if(fbuf.attach(fd)==0) return -1;
  #else
      if (!_infptr) _infptr = fdopen(fd, "r");
!     filebuf fbuf(_infptr, ios_base::in);
  #endif
      istream in(&fbuf);
      int ch = in.get();
--- 94,100 ----
      if(fbuf.attach(fd)==0) return -1;
  #else
      if (!_infptr) _infptr = fdopen(fd, "r");
!     fileptr_filebuf fbuf(_infptr, ios_base::in);
  #endif
      istream in(&fbuf);
      int ch = in.get();
Index: OverlayUnidraw/aceimport.h
diff -c OverlayUnidraw/aceimport.h:1.2 OverlayUnidraw/aceimport.h:1.3
*** OverlayUnidraw/aceimport.h:1.2	Fri May 17 13:54:01 2002
--- src/OverlayUnidraw/aceimport.h	Wed Jul 24 15:25:09 2002
***************
*** 35,41 ****
  #include <ace/SOCK_Acceptor.h>
  
  class OvImportCmd;
! class filebuf;
  #include <iosfwd>
  
  //: handler for import by socket into OverlayUnidraw.
--- 35,41 ----
  #include <ace/SOCK_Acceptor.h>
  
  class OvImportCmd;
! #include <fstream.h>
  #include <iosfwd>
  
  //: handler for import by socket into OverlayUnidraw.
***************
*** 64,70 ****
    // host we are connected to.
  
    OvImportCmd* _import_cmd; // associated import command
!   filebuf* _filebuf;        // associated input buffer
    istream* _inptr;          // associated input stream
    FILE* _infptr;            // associated FILE*
  };
--- 64,70 ----
    // host we are connected to.
  
    OvImportCmd* _import_cmd; // associated import command
!   fileptr_filebuf* _filebuf;        // associated input buffer
    istream* _inptr;          // associated input stream
    FILE* _infptr;            // associated FILE*
  };
Index: ComUnidraw/unifunc.c
diff -c ComUnidraw/unifunc.c:1.4 ComUnidraw/unifunc.c:1.5
*** ComUnidraw/unifunc.c:1.4	Wed Jul 24 11:00:29 2002
--- src/ComUnidraw/unifunc.c	Wed Jul 24 15:25:12 2002
***************
*** 460,466 ****
  	if (handler) {
  	  ACE_SOCK_Stream peer = handler->peer();
  	  ofptr = fdopen(peer.get_handle(), "r");
! 	  pfbuf = new filebuf(ofptr, output);
  	}
  	else 
  #endif
--- 460,466 ----
  	if (handler) {
  	  ACE_SOCK_Stream peer = handler->peer();
  	  ofptr = fdopen(peer.get_handle(), "r");
! 	  pfbuf = new fileptr_filebuf(ofptr, output);
  	}
  	else 
  #endif
***************
*** 482,490 ****
      
              if (conn.connect (*socket, addr) == -1)
                  ACE_ERROR ((LM_ERROR, "%p\n", "open"));
!             pfbuf = new filebuf(ofptr = fdopen(socket->get_handle(), "r"), output);
          } else if (comterp()->handler() && comterp()->handler()->get_handle()>-1) {
!             pfbuf = new filebuf(comterp()->handler()->rdfptr(), output);
          } else
  #endif
              pfbuf = new fileptr_filebuf(stdout, output);
--- 482,490 ----
      
              if (conn.connect (*socket, addr) == -1)
                  ACE_ERROR ((LM_ERROR, "%p\n", "open"));
!             pfbuf = new fileptr_filebuf(ofptr = fdopen(socket->get_handle(), "r"), output);
          } else if (comterp()->handler() && comterp()->handler()->get_handle()>-1) {
!             pfbuf = new fileptr_filebuf(comterp()->handler()->rdfptr(), output);
          } else
  #endif
              pfbuf = new fileptr_filebuf(stdout, output);
*** /dev/null	 Wed Jul 24 15:25:31 PDT 2002
--- patches/ivtools-020724-johnston-059
*************** patches/ivtools-020724-johnston-059
*** 0 ****
--- 1 ----
+ ivtools-020724-johnston-059


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