*** ./etc/Makefile.orig	Tue Feb 19 16:52:38 1991
--- ./etc/Makefile	Tue Jun 18 01:58:16 1991
***************
*** 82,88 ****
  
  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
--- 82,88 ----
  
  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
*** ./g++-include/errno.h.orig	Tue Feb 19 16:52:01 1991
--- ./g++-include/errno.h	Tue Jun 18 01:23:51 1991
***************
*** 8,14 ****
--- 8,18 ----
  #ifdef VMS
  #include "GNU_CC_INCLUDE:[000000]errno.h"
  #else
+ #ifdef apollo
+ #include "/usr/include/errno.h"
+ #else
  #include "//usr/include/errno.h"
+ #endif
  #endif
  }
  
*** ./g++-include/signal.h.orig	Tue Feb 19 16:52:03 1991
--- ./g++-include/signal.h	Tue Jun 18 02:54:30 1991
***************
*** 38,44 ****
--- 38,48 ----
  #define KERNEL
  #endif
  
+ #ifdef apollo
+ #include </usr/include/sys/signal.h>
+ #else
  #include <//usr/include/sys/signal.h>
+ #endif
  
  #ifndef masscomp
  #undef KERNEL
*** ./g++-include/stdio.h.orig	Tue Feb 19 16:52:01 1991
--- ./g++-include/stdio.h	Tue Jun 18 16:50:25 1991
***************
*** 65,78 ****
  
  */
  
  #ifdef SYSTEM_FIVE
  #define USG
  #endif
  
! #if defined(USG)
  #define  HAVE_VPRINTF
  #define  HAVE_SETVBUF  
! //#define  HAVE_SETLINEBUF
  
  #elif defined(VMS)
  #define  HAVE_VPRINTF
--- 65,81 ----
  
  */
  
+ 
  #ifdef SYSTEM_FIVE
  #define USG
  #endif
  
! #if defined(USG) || defined(apollo)
  #define  HAVE_VPRINTF
  #define  HAVE_SETVBUF  
! #ifdef apollo
! #define  HAVE_SETLINEBUF
! #endif
  
  #elif defined(VMS)
  #define  HAVE_VPRINTF
***************
*** 83,88 ****
--- 86,103 ----
  #define IOBUF_FLAG_TYPE char
  #define IOBUF_BUFSIZ_FIELD	/* we aint got one either*/
  
+ #ifdef apollo
+ #define _NFILE 128
+ #define BUFSIZ 1024
+ #define IOBUF_FLAG_TYPE short
+ #define IOBUF_FILE_TYPE short
+ #define IOBUF_BASE_TYPE unsigned char *
+ #define _bufend(p) (_bufendtab[ ((p) >= &_iob[0] && (p) < &_iob[_NFILE]) ? \
+ 				((FILE *)(p) - &_iob[0]) : \
+ 				_NFILE ] )
+ #define _bufsiz(p) (_bufend(p) - (p)->_base)
+ #endif
+ 
  #elif masscomp
  #ifndef _NFILE
  #define _NFILE 40
***************
*** 149,155 ****
  #define IOBUF_FLAG_TYPE char
  #endif
  
! #ifdef USG
  #define IOBUF_BUFSIZ_FIELD	/* System V ain't got one */
  #endif
  
--- 164,170 ----
  #define IOBUF_FLAG_TYPE char
  #endif
  
! #if defined(USG) || defined(apollo)
  #define IOBUF_BUFSIZ_FIELD	/* System V ain't got one */
  #endif
  
***************
*** 168,173 ****
--- 183,192 ----
  #define IOBUF_FILE_TYPE char
  #endif
  
+ #ifndef IOBUF_BASE_TYPE
+ #define IOBUF_BASE_TYPE char *
+ #endif
+ 
  #ifndef IOBUF_EXTRA_FIELDS
  #define IOBUF_EXTRA_FIELDS
  #endif
***************
*** 180,188 ****
  #endif
  #endif
  
! #ifdef USG
  #define _bufend(p) _bufendtab[(p)->_file]
  #define _bufsiz(p) (_bufend(p) - (p)->_base)
  #ifndef BUFEND_ENTRY_TYPE
  #define BUFEND_ENTRY_TYPE char *
  #endif
--- 199,211 ----
  #endif
  #endif
  
! #if defined(USG) || defined(apollo)
! #ifndef _bufend
  #define _bufend(p) _bufendtab[(p)->_file]
+ #endif
+ #ifndef _bufsiz
  #define _bufsiz(p) (_bufend(p) - (p)->_base)
+ #endif
  #ifndef BUFEND_ENTRY_TYPE
  #define BUFEND_ENTRY_TYPE char *
  #endif
***************
*** 203,226 ****
  #endif
  
  #ifdef masscomp 
- extern struct _iobuf {
  #ifdef BUFSIZ
  #  undef BUFSIZ
  #endif
  #define BUFSIZ  4096
  
  #ifdef mc68000
      unsigned char*    _ptr;
      int      _cnt;
  #endif
!     char*    _base;
      IOBUF_BUFSIZ_FIELD
      IOBUF_FLAG_TYPE	_flag;
      IOBUF_FILE_TYPE	_file;
      IOBUF_EXTRA_FIELDS
  } _iob[];
! #else /* not masscomp */
  extern  struct  _iobuf {
      int      _cnt;
      char*    _ptr;
      char*    _base;
--- 226,265 ----
  #endif
  
  #ifdef masscomp 
  #ifdef BUFSIZ
  #  undef BUFSIZ
  #endif
  #define BUFSIZ  4096
  
+ #define HAVE_IOBUF
+ extern struct _iobuf {
  #ifdef mc68000
      unsigned char*    _ptr;
      int      _cnt;
  #endif
!     IOBUF_BASE_TYPE _base;
      IOBUF_BUFSIZ_FIELD
      IOBUF_FLAG_TYPE	_flag;
      IOBUF_FILE_TYPE	_file;
      IOBUF_EXTRA_FIELDS
  } _iob[];
! #endif
! 
! #ifdef apollo
! #define  HAVE_IOBUF
! 
  extern  struct  _iobuf {
+     unsigned char	*_ptr __attribute((aligned(1)));
+     short		 _cnt;
+     IOBUF_BASE_TYPE 	 _base __attribute((aligned(1)));
+     IOBUF_FLAG_TYPE	 _flag;
+     IOBUF_FILE_TYPE	 _file;
+ } _iob[];
+ 
+ #endif /* apollo */
+ 
+ #ifndef HAVE_IOBUF
+ extern  struct  _iobuf {
      int      _cnt;
      char*    _ptr;
      char*    _base;
***************
*** 245,252 ****
  #define _IOMYBUF  00010
  #define _IOEOF    00020
  #define _IOERR    00040
! #if defined(USG) && !defined(hpux)
  #define _IOSTRG   00000  /* faked out for USG */
  #define _IOLBF    00100
  #define _IORW     00200
  #define _IOAPPEND 00000 /* faked out for USG */
--- 284,295 ----
  #define _IOMYBUF  00010
  #define _IOEOF    00020
  #define _IOERR    00040
! #if (defined(USG) || defined(apollo)) && !defined(hpux)
! #ifndef apollo
  #define _IOSTRG   00000  /* faked out for USG */
+ #else
+ #define _IOSTRG	  00400
+ #endif
  #define _IOLBF    00100
  #define _IORW     00200
  #define _IOAPPEND 00000 /* faked out for USG */
*** ./g++-include/sys/fcntl.h.orig	Tue Feb 19 16:52:13 1991
--- ./g++-include/sys/fcntl.h	Tue Jun 18 01:25:37 1991
***************
*** 8,14 ****
--- 8,18 ----
  #ifdef VMS
  #include "GNU_CC_INCLUDE:[sys]fcntl.h"
  #else
+ #ifdef apollo
+ #include "/usr/include/sys/fcntl.h"
+ #else
  #include "//usr/include/sys/fcntl.h"
+ #endif
  #endif
  
  #ifndef sys_fcntl_h
*** ./g++-include/sys/file.h.orig	Tue Feb 19 16:52:11 1991
--- ./g++-include/sys/file.h	Tue Jun 18 01:25:21 1991
***************
*** 18,24 ****
--- 18,28 ----
  #ifdef VMS
  #include "GNU_CC_INCLUDE:[sys]file.h"
  #else
+ #ifdef apollo
+ #include "/usr/include/sys/file.h"
+ #else
  #include "//usr/include/sys/file.h"
+ #endif
  #endif
  
  /* try to guess whether file.h actually gave the right defs */
*** ./g++-include/sys/param.h.orig	Tue Feb 19 16:52:13 1991
--- ./g++-include/sys/param.h	Tue Jun 18 02:53:34 1991
***************
*** 12,18 ****
--- 12,22 ----
  #ifdef VMS
  #include "GNU_CC_INCLUDE:[sys]param.h"
  #else
+ #ifdef apollo
+ #include "/usr/include/sys/param.h"
+ #else
  #include "//usr/include/sys/param.h"
+ #endif
  #endif
  #undef KERNEL
  
*** ./g++-include/sys/resource.h.orig	Tue Feb 19 16:52:11 1991
--- ./g++-include/sys/resource.h	Tue Jun 18 01:39:25 1991
***************
*** 10,16 ****
--- 10,20 ----
  #ifdef VMS
  #include "GNU_CC_INCLUDE:[sys]resource.h"
  #else
+ #ifdef apollo
+ #include "/usr/include/sys/resource.h"
+ #else
  #include "//usr/include/sys/resource.h"
+ #endif
  #endif
  #undef KERNEL
  
*** ./g++-include/sys/socket.h.orig	Tue Feb 19 16:52:10 1991
--- ./g++-include/sys/socket.h	Tue Jun 18 01:39:43 1991
***************
*** 10,16 ****
--- 10,20 ----
  #ifdef VMS
  #include "GNU_CC_INCLUDE:[sys]socket.h"
  #else
+ #ifdef apollo
+ #include "/usr/include/sys/socket.h"
+ #else
  #include "//usr/include/sys/socket.h"
+ #endif
  #endif
  #undef KERNEL
  
*** ./g++-include/sys/types.h.orig	Tue Feb 19 16:52:13 1991
--- ./g++-include/sys/types.h	Tue Jun 18 01:25:00 1991
***************
*** 11,17 ****
--- 11,21 ----
  #ifdef VMS
  #include "GNU_CC_INCLUDE:[sys]types.h"
  #else
+ #ifdef apollo
+ #include "/usr/include/sys/types.h"
+ #else
  #include "//usr/include/sys/types.h"
+ #endif
  #endif
  #undef size_t
  #undef ptrdiff_t
*** ./g++-include/time.h.orig	Tue Feb 19 16:52:00 1991
--- ./g++-include/time.h	Tue Jun 18 01:38:52 1991
***************
*** 42,52 ****
--- 42,64 ----
  #ifdef hpux
  #define _INCLUDE_POSIX_SOURCE
  #endif
+ #ifdef apollo
+ #include "/usr/include/sys/time.h"
+ #else
  #include "//usr/include/sys/time.h"
  #endif
+ #endif
+ #ifdef apollo
+ #include "/usr/include/sys/times.h"
+ #else
  #include "//usr/include/sys/times.h"
+ #endif
  #ifndef __NeXT__
+ #ifdef apollo
+ #include "/usr/include/time.h"
+ #else
  #include "//usr/include/time.h"
+ #endif
  #endif
  #endif
  #undef KERNEL
*** ./gperf/src/Makefile.orig	Tue Feb 19 16:51:42 1991
--- ./gperf/src/Makefile	Tue Feb 19 16:51:36 1991
***************
*** 22,30 ****
  OFLAGS= -O -fstrength-reduce -fdelayed-branch -fsave-memoized \
          -finline-functions -felide-constructors
  GXXFLAGS= $(DFLAGS) $(OFLAGS)
  OBJS  = new.o options.o iterator.o main.o gen-perf.o key-list.o list-node.o \
          hash-table.o bool-array.o read-line.o std-err.o version.o 
- LIBS  = -lg++
  .SUFFIXES: .cc
  .cc.o:
  	$(GXX) $(GXXFLAGS) -c  $<
--- 22,34 ----
  OFLAGS= -O -fstrength-reduce -fdelayed-branch -fsave-memoized \
          -finline-functions -felide-constructors
  GXXFLAGS= $(DFLAGS) $(OFLAGS)
+ prefix=/usr/local
+ BINDIR=$(prefix)/bin
+ LIBDIR=$(prefix)/lib
+ MANDIR=$(prefix)/man
+ INSTALL=install
  OBJS  = new.o options.o iterator.o main.o gen-perf.o key-list.o list-node.o \
          hash-table.o bool-array.o read-line.o std-err.o version.o 
  .SUFFIXES: .cc
  .cc.o:
  	$(GXX) $(GXXFLAGS) -c  $<
***************
*** 32,41 ****
  all: gperf
  
  gperf: $(OBJS) 
! 	$(GXX) $(GXXFLAGS) -o gperf $(OBJS) $(LIBS)
  
  clean: 
! 	-rm -f gperf *.o core *~ #*# mon.out
  
  depend:
  	g++dep *.cc
--- 36,51 ----
  all: gperf
  
  gperf: $(OBJS) 
! 	$(GXX) $(GXXFLAGS) -o gperf $(OBJS) -L../../src $(LIBS)
  
+ install: all
+ 	$(INSTALL) gperf $(BINDIR)/gperf
+ 
  clean: 
! 	rm -f *.o core *~ #*# mon.out
! 
! realclean: clean
! 	rm -f gperf
  
  depend:
  	g++dep *.cc
*** ./gperf/src/main.cc.orig	Tue Feb 19 16:51:42 1991
--- ./gperf/src/main.cc	Tue Feb 19 16:51:38 1991
***************
*** 25,30 ****
--- 25,31 ----
  #include <sys/time.h>
  #include <sys/resource.h>
  #include <time.h>
+ #include <stdio.h>
  #include "std-err.h"
  #include "options.h"
  #include "gen-perf.h"
***************
*** 36,42 ****
    T (Trace t ("main");)
    struct tm *tm;
    time_t     clock; 
-   int        status;
  
    time (&clock);
    tm = localtime (&clock);
--- 37,42 ----
***************
*** 62,71 ****
  
    /* Generates and prints the Gen_Perf hash table.
       Don't use exit here, it skips the destructors. */
!   status = generate_table ();     
  
    time (&clock);
    tm = localtime (&clock);
    printf ("/* ending time is %d:%02d:%02d */\n", tm->tm_hour, tm->tm_min, tm->tm_sec);
    return status;
  }
--- 62,72 ----
  
    /* Generates and prints the Gen_Perf hash table.
       Don't use exit here, it skips the destructors. */
!   int status = generate_table ();     
  
    time (&clock);
    tm = localtime (&clock);
    printf ("/* ending time is %d:%02d:%02d */\n", tm->tm_hour, tm->tm_min, tm->tm_sec);
+ 
    return status;
  }
*** ./gperf/src/options.cc.orig	Tue Feb 19 16:51:42 1991
--- ./gperf/src/options.cc	Tue Feb 19 16:51:39 1991
***************
*** 173,179 ****
    argument_count  = argc;
    argument_vector = argv;
  
!   while ((option_char = getopt ()) != EOF)
      {
        switch (option_char)
          {
--- 173,179 ----
    argument_count  = argc;
    argument_vector = argv;
  
!   while ((option_char = getopt ()) != -1)
      {
        switch (option_char)
          {
*** ./src/Makefile.orig	Tue Feb 19 16:52:59 1991
--- ./src/Makefile	Tue Jun 18 01:42:32 1991
***************
*** 164,170 ****
  
  install:
  	$(INSTALL) libg++.a $(LIBDIR)/libg++.a
! 	-if [ -x /usr/bin/$(RANLIB) -o -x /bin/ranlib ] ; then \
  		$(RANLIB) $(LIBDIR)/libg++.a; \
  	fi
  
--- 164,170 ----
  
  install:
  	$(INSTALL) libg++.a $(LIBDIR)/libg++.a
! 	-if [ -r /usr/bin/$(RANLIB) -o -r /bin/ranlib ] ; then \
  		$(RANLIB) $(LIBDIR)/libg++.a; \
  	fi
  
*** ./src/malloc.c.orig	Tue Feb 19 16:53:05 1991
--- ./src/malloc.c	Tue Jun 18 01:36:26 1991
***************
*** 236,242 ****
--- 236,246 ----
  #ifdef __cplusplus
  #include <stdio.h>
  #else
+ #ifdef apollo
+ #include "/usr/include/stdio.h"  /* needed for error reporting */
+ #else
  #include "//usr/include/stdio.h"  /* needed for error reporting */
+ #endif
  #endif
  
  #ifdef __cplusplus
