From: mrs@MIRKWOOD.CYGNUS.COM (Mike Stump)
Subject: new release of InterViews 3.1 patch kit for g++
Organization: Internet-USENET Gateway at Stanford University
Date: Fri, 22 Jan 1993 11:57:41 GMT

I have finally upgraded my InterViews to 3.1, ported over my patches, and
verified everything works pretty well when compiled with g++.

First is the README, then the patches.

							January 22, 1993

This file comes to you from:

    pub/contrib/g++/iv-3.1-g++-3.1.tar.Z@interviews.stanford.edu


Here is a set of patches to help you get iv-3.1 working with a free
compiler.  I am using iv-3.1 and libg++-2.2 and gcc-2.3.3 on a Sun ELC
(sun4 SPARC) running SunOS 4.1.2.  Future versions of libg++ and gcc
should continue to work as well as the versions describe here.

This file does not constitute a release, or a permanent migration
version of iv.  In the future, I will provide ONLY diffs against
virgin sources, with the specified fixes applied.

After patching, keep the patches around, because when you get the next
one, you will need to UNDO these patches, or re-extract virgin 3.1.
You will need to apply any fixes that you want, should any be released
for InterViews 3.1, so far, none are available.

Note, these patches should now enable you to compile any interviews
programs you have.  Your programs should now work.

You will need around 34 megabytes to compile g++ and 64 megabytes to
compile and install InterViews.  InterViews takes up around 20
megabytes when installed.  The compiler takes around 12 megabytes when
installed, and libg++ takes around 3.  You might want to get gdb-4.6
(or higher) from prep.ai.mit.edu to debug your InterViews programs.
On quite a few machines you will either need to use gas and GNU ld, or
collect (collect2) from gcc.

To build the compiler and libg++, I use something like:

	PATH="/usr/local/gcc-2.3.3/bin:$PATH"
	./configure --prefix=/usr/local/gcc-2.3.3 sun4
	make -k
	make -k INSTALL_HEADERS=install-fixincludes install

After extracting InterViews 3.1, you will need to patch it:

	patch -p0 <iv-3.1.diffs

In order for make depend to work, you will need to edit the gcc.def
file and let it know where the include directories are.  If you
configure as above, you should be pretty well set.  You will need to
edit local.def (down in iv/src/config/InterViews) if your X11
installation is not in /usr/local/X11R5.  You will need to edit
local.def if you want InterViews installed someplace other than
/usr/local/interviews-3.1-g++-2.3.3.

Then to build InterViews, I:

	make XCONFIGDIR=/usr/local/X11R5/lib/X11/config World

You might need to build tif_fax3.c in iv/src/lib/IV with /bin/cc if
gcc core dumps.

Every demo program should work, including doc.  idraw might be short
on one of it's menus, this is related to a bug in libg++ I think.  Let
me know what works for you and what does not, and what machine you are
using.  Also, if you have CFront, let me know of behavior differences
between a CFront compiled InterViews and a g++ compiled InterViews.


Machines software is known to work on:  (Please help me fill out this list)

	sun4		SunOS 4.1.2


Here is my planning guide:

Phase One	(Completed)
   Get the source files turned into .o files a quickly as possible
   If this means making weird changes to IV, so be it.
Phase Two	(Completed)
   Get things to link
Phase Three	(Completed)
   Verify that the a.out's work.  Bug fix the compiler where necessary.
   Bug fix IV where necessary.  (This so far has not been the case, usually)
   Work-around as necessary.
Phase Four	(Continuing work)
   Reduce the number of #ifdef __GNUC__ in the code, by way of compiler
   enhancement, to an absolute minimum.
Phase Five	(Completed)
   Write the missing library code for libg++ for doc.
Phase Six	(In progress for InterViews, Completed for gcc 2.3.3)
   Verify that author released versions of software work as well as what I
   have.  If not, submit bug fixes and enhancements.


Send any mods, additions, problems or comments to Mike Stump <mrs@cygnus.com>.


And here are the patches:

--------------
Doing diffs in iv/src:
*** iv/src/config/InterViews/local.def.~1~	Tue Nov 24 12:08:51 1992
--- iv/src/config/InterViews/local.def	Thu Jan 21 18:28:08 1993
***************
*** 6,11 ****
--- 6,19 ----
  #define LanguageCCDefines -Dcplusplus_2_0
  
  /*
+  * Build RPC classes on machines that support it.
+  */
+ #if defined(SGIArchitecture) || defined(SunArchitecture)
+ #undef BuildRPCClasses
+ #define BuildRPCClasses YES
+ #endif
+ 
+ /*
   * If you are using gcc/g++, then uncomment the include below.
   */
  /* #include <InterViews/gcc.def> */
***************
*** 26,39 ****
  #endif
  
  /*
-  * If you are using g++, define BuildRPCClasses to NO.
-  */
- #if defined(SGIArchitecture) || defined(SunArchitecture)
- #undef BuildRPCClasses
- #define BuildRPCClasses YES
- #endif
- 
- /*
   * Delete this definition if your /tmp space is less than five megabytes.
   */
  #undef HasLargeTmp
--- 34,39 ----
***************
*** 68,70 ****
--- 68,93 ----
  #undef XLibDir
  #define XLibDir /usr/X11R5/lib
  */
+ 
+ #include <InterViews/gcc.def>
+ 
+ #undef InstalledRoot
+ #define InstalledRoot /usr/local/interviews-3.1-g++-2.3.3
+ 
+ /*
+  * If we are going to define the above, then, we might as well have it
+  * take effect. (mrs)
+  */
+ #undef InstallRelative
+ #define InstallRelative         NO      /* need absolute pathnames */
+ 
+ #define BinDir InstalledRoot/bin
+ #define LibDir InstalledRoot/lib
+ #define LibAllDir InstalledRoot/lib
+ 
+ #undef XConfigDir
+ #define XConfigDir /usr/local/X11R5/lib/X11/config
+ #undef XIncDir
+ #define XIncDir /usr/local/X11R5/include
+ #undef XLibDir
+ #define XLibDir /usr/local/X11R5/lib
*** iv/src/config/InterViews/gcc.def.~1~	Tue Sep  8 15:38:37 1992
--- iv/src/config/InterViews/gcc.def	Fri Jan 22 03:14:55 1993
***************
*** 9,16 ****
  #define CCDriver g++
  #endif
  
  #ifndef DependCCFlags
! #define DependCCFlags $(CCDEFINES) $(CCINCLUDES)
  #endif
  
  #ifndef ExtraCCLdLibs
--- 9,31 ----
  #define CCDriver g++
  #endif
  
+ #ifndef CcCmd
+ #define CcCmd gcc
+ #endif
+ 
+ #if defined(SunArchitecture)
+ #ifndef TIFFStdCDefines
+ #define TIFFStdCDefines \
+     -DCOLORIMETRY_SUPPORT -DYCBCR_SUPPORT \
+     -DHAVE_IEEEFP=1 -DUSE_VARARGS=0 -DUSE_PROTOTYPES=1
+ #endif
+ #endif
+ 
+ /* The below include directories can be figured out by examining the
+  * output from gcc -v ...
+  */
  #ifndef DependCCFlags
! #define DependCCFlags $(CCDEFINES) $(CCINCLUDES) -I/usr/local/gcc-2.3.3/lib/g++-include -I/usr/local/gcc-2.3.3/lib/gcc-lib/sun4/2.3.3/include
  #endif
  
  #ifndef ExtraCCLdLibs
***************
*** 19,21 ****
--- 34,42 ----
  
  #undef HasSunOSSharedLibraries
  #define HasSunOSSharedLibraries NO
+ 
+ /*
+  * Right now, libg++ cannot be used to build the RPC classes.
+  */
+ #undef BuildRPCClasses
+ #define BuildRPCClasses NO
*** iv/src/include/InterViews/glyph.h.~1~	Mon Apr 13 09:59:05 1992
--- iv/src/include/InterViews/glyph.h	Thu Jan 21 21:21:15 1993
***************
*** 42,48 ****
  typedef long GlyphIndex;
  typedef unsigned int GlyphBreakType;
  
! class Glyph : public Resource {
  public:
      enum { no_break, pre_break, in_break, post_break };
  
--- 42,48 ----
  typedef long GlyphIndex;
  typedef unsigned int GlyphBreakType;
  
! class Glyph : virtual public Resource {
  public:
      enum { no_break, pre_break, in_break, post_break };
  
*** iv/src/include/InterViews/handler.h.~1~	Tue Feb 11 09:33:42 1992
--- iv/src/include/InterViews/handler.h	Thu Jan 21 21:20:57 1993
***************
*** 31,37 ****
  
  class Event;
  
! class Handler : public Resource {
  protected:
      Handler();
      virtual ~Handler();
--- 31,37 ----
  
  class Event;
  
! class Handler : virtual public Resource {
  protected:
      Handler();
      virtual ~Handler();
Newsgroups: comp.windows.interviews