[gnu.g++.lib.bug] Some diffs needed for libg++ in USG systems

jkp@SAUNA.HUT.FI (Jyrki Kuoppala) (05/25/89)

Here are some diffs that need to be applied to libg++ 1.35.0 so it can
be used with USG systems.  These diffs are not complete, but you get
libg++.a up and (I think) working with them.  These diffs do not
get the tests and other things working; they need similar changes.
I'll probably get them done later when I find the time.

The filename src/CursesWindow.cc is too long; make thinks it's a C
file and tries to compile it with $(CC).  This should be fixed; these
diffs do not address that bug.

Happy GNUing,

//Jyrki

the diff:

diff -cr libg++-1.35.0/g++-include/stdio.h libg++-1.35.0./g++-include/stdio.h
*** libg++-1.35.0/g++-include/stdio.h	Sun May  7 15:30:07 1989
--- libg++-1.35.0./g++-include/stdio.h	Thu May 18 05:09:24 1989
***************
*** 54,62 ****
  
  /* check and possibly comment out the following */
  
! #ifndef USG
! #define HAVE_BUFSIZ 
! #endif
  
  #define SPRINTF_RETURNS_INT
  
--- 54,60 ----
  
  /* check and possibly comment out the following */
  
! #define HAVE_BUFSIZ 
  
  #define SPRINTF_RETURNS_INT
  
diff -cr libg++-1.35.0/libconfig.h libg++-1.35.0./libconfig.h
***************
*** 71,76 ****
--- 71,81 ----
  //#define  HAVE_SETLINEBUF
  #define  USG
  
+ #elif defined(USG)
+ #define  HAVE_VPRINTF
+ #define  HAVE_SETVBUF  
+ //#define  HAVE_SETLINEBUF
+ 
  #endif
  
  /*
***************
*** 79,88 ****
  
  #ifdef USG
  #define bzero(src, len)       memset((src), 0, (len))
! #define bcopy(src, dest, len) memcopy((dest), (src), (len))
  #define bcmp(s1,s2,n)         memcmp((s1),(s2),(n))
  #endif
  
  
  /* 
    Define SHOULD_FREE_TO_REALLOC
--- 84,100 ----
  
  #ifdef USG
  #define bzero(src, len)       memset((src), 0, (len))
! #define bcopy(src, dest, len) memcpy((dest), (src), (len))
  #define bcmp(s1,s2,n)         memcmp((s1),(s2),(n))
  #endif
  
+ #ifdef __GNUC__
+ #define alloca __builtin_alloca
+ #else
+ #ifdef sparc
+ #include <alloca.h>
+ #endif
+ #endif
  
  /* 
    Define SHOULD_FREE_TO_REALLOC
diff -cr libg++-1.35.0/src/File.cc libg++-1.35.0./src/File.cc
*** libg++-1.35.0/src/File.cc	Sun May  7 15:32:18 1989
--- libg++-1.35.0./src/File.cc	Thu May 18 05:10:21 1989
***************
*** 26,32 ****
--- 26,34 ----
  #include "libconfig.h"
  
  extern "C" {
+ #ifndef USG
  #include <sys/file.h>           // needed to determine values of O_RDONLY...
+ #endif
  
  #ifndef sun
  #include "/usr/include/fcntl.h"
diff -cr libg++-1.35.0/src/Obstack.cc libg++-1.35.0./src/Obstack.cc
*** libg++-1.35.0/src/Obstack.cc	Thu Mar 30 12:59:52 1989
--- libg++-1.35.0./src/Obstack.cc	Thu May 18 05:10:05 1989
***************
*** 23,28 ****
--- 23,29 ----
  #include <values.h>
  #include <builtin.h>
+ #include "libconfig.h"
  #include <Obstack.h>
  
  Obstack::Obstack(int size = 4092, int alignment = 4)
  {