Patches to libg++ 1.37.0 for A/UX

John Coolidge coolidge at casca.cs.uiuc.edu
Tue Mar 20 13:26:11 AEST 1990


Here's the promised patches for libg++ 1.37.0. There is very little
functionally different here --- most of these just fix header file
dependancies or makefile problems. There are a few changes just intended
to make life easier (like turning -Wall off) which can easily be ignored
or changed back. The stdio and file buffering patches may be overkill ---
some of them are required, though, or the streambuf/{i,o}stream stuff
will fail.

As always, send bug reports (and hopefully fixes!) to coolidge at cs.uiuc.edu
and I'll put them together for the next release.

--John

--------------------------------------------------------------------------
diff -r -c libg++-1.37.0/Makefile libg++.aux/Makefile
*** libg++-1.37.0/Makefile	Wed Feb 28 04:17:18 1990
--- libg++.aux/Makefile	Fri Mar 16 15:01:05 1990
***************
*** 57,69 ****
  # ------- use the second form of each for SystemV (USG)
  
  # g++ flags
! OSFLAG=
! #OSFLAG = -DUSG
  
  # other compilation control flags -- use any combination
  
  # use this only if you have a strange stdio implementation
! #XTRAFLAGS = -DDEFAULT_filebuf
  
  # use this if you do not want gnulib3 in libg++.a
  #XTRAFLAGS = -DNO_GNULIB3
--- 57,69 ----
  # ------- use the second form of each for SystemV (USG)
  
  # g++ flags
! #OSFLAG=
! OSFLAG = -DUSG -DAUX
  
  # other compilation control flags -- use any combination
  
  # use this only if you have a strange stdio implementation
! XTRAFLAGS = -DDEFAULT_filebuf
  
  # use this if you do not want gnulib3 in libg++.a
  #XTRAFLAGS = -DNO_GNULIB3
***************
*** 72,79 ****
  #XTRAFLAGS = -DCOFF_ENCAPSULATE
  
  # use this if you want to disable line buffering for stream output
! #XTRAFLAGS = -DNO_LINE_BUFFER_STREAMBUF
  
  # Use this to disable placing libg++ version of malloc in libg++.a 
  #XTRAFLAGS = -DNO_LIBGXX_MALLOC
  
--- 72,81 ----
  #XTRAFLAGS = -DCOFF_ENCAPSULATE
  
  # use this if you want to disable line buffering for stream output
! XTRAFLAGS = -DNO_LINE_BUFFER_STREAMBUF
  
+ XTRAFLAGS = -DNO_LINE_BUFFER_STREAMBUF -DDEFAULT_filebuf
+ 
  # Use this to disable placing libg++ version of malloc in libg++.a 
  #XTRAFLAGS = -DNO_LIBGXX_MALLOC
  
***************
*** 82,97 ****
  #XTRAFLAGS = -DMALLOC_STATS
  
  # ld or ld++ flags
! OSLDFLAG =
! #OSLDFLAG= -lPW
  
  # how to install
! INSTALL=install -c
! #INSTALL=cp
  
  # ranlib if necessary
! RANLIB=ranlib
! #RANLIB=echo
  
  # which make?
  MAKE=make
--- 84,99 ----
  #XTRAFLAGS = -DMALLOC_STATS
  
  # ld or ld++ flags
! #OSLDFLAG =
! OSLDFLAG= -lPW
  
  # how to install
! #INSTALL=install -c
! INSTALL=cp
  
  # ranlib if necessary
! #RANLIB=ranlib
! RANLIB=echo
  
  # which make?
  MAKE=make
***************
*** 119,133 ****
  # ------ Other compilation flags
  # ------ modify as you like -- the ones here are sheer overkill
  
! GXX_OPTIMIZATION_FLAGS= -O -fstrength-reduce  -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized 
  
  GCC_OPTIMIZATION_FLAGS= -O -fstrength-reduce -fdelayed-branch 
  
! DEBUG_FLAGS= -g
  
  #use this only if you like to look at lots of useless messages
  #VERBOSITY_FLAGS= -Wall -v 
! VERBOSITY_FLAGS= -Wall
  
  GXX_INCLUDE_DIRS= -I$(SRCIDIR)
  
--- 121,136 ----
  # ------ Other compilation flags
  # ------ modify as you like -- the ones here are sheer overkill
  
! #GXX_OPTIMIZATION_FLAGS= -O -fstrength-reduce  -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized 
! GXX_OPTIMIZATION_FLAGS= -O -fstrength-reduce  -felide-constructors -fschedule-insns -fsave-memoized 
  
  GCC_OPTIMIZATION_FLAGS= -O -fstrength-reduce -fdelayed-branch 
  
! DEBUG_FLAGS=  
  
  #use this only if you like to look at lots of useless messages
  #VERBOSITY_FLAGS= -Wall -v 
! #VERBOSITY_FLAGS= -Wall
  
  GXX_INCLUDE_DIRS= -I$(SRCIDIR)
  
***************
*** 135,142 ****
  
  #use this only if you use GNU as (gas) or other assemblers that 
  #can read from pipes. 
! PIPE_AS= -pipe
! #PIPE_AS=
  
  # Flags for all C++ compiles
  GXXFLAGS = $(OSFLAG) $(GXX_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GXX_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(XTRAFLAGS) $(PIPE_AS)
--- 138,145 ----
  
  #use this only if you use GNU as (gas) or other assemblers that 
  #can read from pipes. 
! #PIPE_AS= -pipe
! PIPE_AS=
  
  # Flags for all C++ compiles
  GXXFLAGS = $(OSFLAG) $(GXX_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GXX_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(XTRAFLAGS) $(PIPE_AS)
diff -r -c libg++-1.37.0/g++-include/math.h libg++.aux/g++-include/math.h
*** libg++-1.37.0/g++-include/math.h	Sat Jan  6 08:09:52 1990
--- libg++.aux/g++-include/math.h	Mon Mar 12 21:40:52 1990
***************
*** 31,37 ****
  #endif
  
  
! #ifdef __HAVE_68881__		/* MC68881/2 Floating-Point Coprocessor */
  #include <math-68881.h>
  extern "C" {			/* fill in what we've left out */
  
--- 31,37 ----
  #endif
  
  
! #if defined(__HAVE_68881__) && !defined(AUX)	/* MC68881/2 Floating-Point Coprocessor */
  #include <math-68881.h>
  extern "C" {			/* fill in what we've left out */
  
***************
*** 88,94 ****
  double  gamma(double);
  double  hypot(double,double);
  double  infnan(int);
! #if !defined(sequent) && !defined(DGUX) /* see below */
  int     isinf(double);
  int     isnan(double);
  #endif
--- 88,94 ----
  double  gamma(double);
  double  hypot(double,double);
  double  infnan(int);
! #if !defined(sequent) && !defined(DGUX) && !defined(AUX) /* see below */
  int     isinf(double);
  int     isnan(double);
  #endif
***************
*** 154,160 ****
  #endif
  
  /* sequents don't supply these. The following should suffice */
! #if defined(sequent) || defined(DGUX)
  static inline int isnan(double x) { return x != x; }
  static inline int isinf(double x) { return x > MAXDOUBLE || x < -MAXDOUBLE; }
  #endif
--- 154,160 ----
  #endif
  
  /* sequents don't supply these. The following should suffice */
! #if defined(sequent) || defined(DGUX) || defined(AUX)
  static inline int isnan(double x) { return x != x; }
  static inline int isinf(double x) { return x > MAXDOUBLE || x < -MAXDOUBLE; }
  #endif
diff -r -c libg++-1.37.0/src/Makefile libg++.aux/src/Makefile
*** libg++-1.37.0/src/Makefile	Wed Feb 28 04:14:22 1990
--- libg++.aux/src/Makefile	Tue Mar 13 13:35:48 1990
***************
*** 142,148 ****
   Fix.cc Fix16.cc Fix24.cc Curses.cc GetOpt.cc gnulib3.c EH.cc EH2.c \
   malloc.c new.cc delete.cc xyzzy.cc chr.cc dtoa.cc error.cc \
   form.cc gcd.cc hash.cc itoa.cc \
!  lg.cc libgxx_fmtq.cc libgxx_io_ob.cc pow.cc sqrt.cc str.cc timer.cc
  
  OBJS = AllocRing.o Obstack.o File.o  ostream.o istream.o \
   streambuf.o filebuf.o Filebuf.o \
--- 142,148 ----
   Fix.cc Fix16.cc Fix24.cc Curses.cc GetOpt.cc gnulib3.c EH.cc EH2.c \
   malloc.c new.cc delete.cc xyzzy.cc chr.cc dtoa.cc error.cc \
   form.cc gcd.cc hash.cc itoa.cc \
!  lg.cc libgxx_fmtq.cc libgxx_ioob.cc pow.cc sqrt.cc str.cc timer.cc
  
  OBJS = AllocRing.o Obstack.o File.o  ostream.o istream.o \
   streambuf.o filebuf.o Filebuf.o \
***************
*** 155,161 ****
   Fix.o Fix16.o Fix24.o Curses.o GetOpt.o EH.o EH2.o\
   xyzzy.o gnulib3.o new.o delete.o malloc.o chr.o dtoa.o error.o form.o gcd.o \
   hash.o itoa.o \
!  lg.o libgxx_fmtq.o libgxx_io_ob.o pow.o sqrt.o str.o timer.o
  
  ###########################################################################
  #
--- 155,161 ----
   Fix.o Fix16.o Fix24.o Curses.o GetOpt.o EH.o EH2.o\
   xyzzy.o gnulib3.o new.o delete.o malloc.o chr.o dtoa.o error.o form.o gcd.o \
   hash.o itoa.o \
!  lg.o libgxx_fmtq.o libgxx_ioob.o pow.o sqrt.o str.o timer.o
  
  ###########################################################################
  #
***************
*** 412,418 ****
    $(SRCIDIR)/stddef.h $(SRCIDIR)/std.h \
    $(SRCIDIR)/stdio.h $(SRCIDIR)/math.h \
    $(SRCIDIR)/values.h $(SRCIDIR)/AllocRing.h 
! libgxx_io_ob.o : libgxx_io_ob.cc $(SRCIDIR)/Obstack.h \
    $(SRCIDIR)/std.h $(SRCIDIR)/stddef.h \
    $(SRCIDIR)/stdio.h 
  new.o : new.cc $(SRCIDIR)/stddef.h \
--- 412,418 ----
    $(SRCIDIR)/stddef.h $(SRCIDIR)/std.h \
    $(SRCIDIR)/stdio.h $(SRCIDIR)/math.h \
    $(SRCIDIR)/values.h $(SRCIDIR)/AllocRing.h 
! libgxx_ioob.o : libgxx_ioob.cc $(SRCIDIR)/Obstack.h \
    $(SRCIDIR)/std.h $(SRCIDIR)/stddef.h \
    $(SRCIDIR)/stdio.h 
  new.o : new.cc $(SRCIDIR)/stddef.h \
diff -r -c libg++-1.37.0/src/ostream.cc libg++.aux/src/ostream.cc
*** libg++-1.37.0/src/ostream.cc	Sat Feb  3 10:41:42 1990
--- libg++.aux/src/ostream.cc	Fri Mar 16 16:01:15 1990
***************
*** 88,93 ****
--- 88,94 ----
  
  ostream::~ostream()
  {
+   flush();
    if (ownbuf) delete bp;
  }
  
diff -r -c libg++-1.37.0/tests/Makefile libg++.aux/tests/Makefile
*** libg++-1.37.0/tests/Makefile	Wed Feb 28 04:14:07 1990
--- libg++.aux/tests/Makefile	Fri Mar 16 16:58:51 1990
***************
*** 98,110 ****
  DEBUG_FLAGS= -g
  
  #use this only if you like to look at lots of useless messages
! VERBOSITY_FLAGS= -Wall -v
  
  GXX_INCLUDE_DIRS= -I$(SRCIDIR)
  
  GCC_INCLUDE_DIRS= -I$(prefix)/lib/gcc-include -I/usr/include -I$(SRCIDIR)
  
! PIPE_AS= -pipe
  
  # Flags for all C++ compiles
  GXXFLAGS = $(OSFLAG) $(GXX_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GXX_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(PIPE_AS)
--- 98,112 ----
  DEBUG_FLAGS= -g
  
  #use this only if you like to look at lots of useless messages
! #VERBOSITY_FLAGS= -Wall -v
! VERBOSITY_FLAGS=
  
  GXX_INCLUDE_DIRS= -I$(SRCIDIR)
  
  GCC_INCLUDE_DIRS= -I$(prefix)/lib/gcc-include -I/usr/include -I$(SRCIDIR)
  
! #PIPE_AS= -pipe
! PIPE_AS=
  
  # Flags for all C++ compiles
  GXXFLAGS = $(OSFLAG) $(GXX_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GXX_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(PIPE_AS)
***************
*** 197,203 ****
  
  tests: $(SRCDIR)/libg++.a $(GENCLASS) $(TOUTS)
  
! runtests: tests
  	for i in $(TOUTS); do \
  		case $$i in \
  			test0) echo "Must run test0 from tty";; \
--- 199,205 ----
  
  tests: $(SRCDIR)/libg++.a $(GENCLASS) $(TOUTS)
  
! runtests:
  	for i in $(TOUTS); do \
  		case $$i in \
  			test0) echo "Must run test0 from tty";; \
diff -r -c libg++-1.37.0/tests/test.hello.cc libg++.aux/tests/test.hello.cc
*** libg++-1.37.0/tests/test.hello.cc	Fri Dec 29 08:12:49 1989
--- libg++.aux/tests/test.hello.cc	Tue Mar 13 15:33:13 1990
***************
*** 13,18 ****
--- 13,22 ----
  
  #include <sys/file.h>
  
+ #ifdef AUX
+ #define getpagesize() 4096
+ #endif
+ 
  #if defined(MIPSEL) || defined(USG) 
  #if !defined(hpux)
  #define exec aouthdr

--------------------------------------------------------------------------
John L. Coolidge     Internet:coolidge at cs.uiuc.edu   UUCP:uiucdcs!coolidge
Of course I don't speak for the U of I (or anyone else except myself)
Copyright 1990 John L. Coolidge. Copying allowed if (and only if) attributed.
You may redistribute this article if and only if your recipients may as well.



More information about the Comp.unix.aux mailing list