This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to atexit handling


The current situation is that if a target defines neither NEED_ATEXIT nor
HAVE_ATEXIT, we redefine exit without actually adding atexit functionality.
This is completely stupid, and breaks things quietly.  The patch below
changes the default behavior to assume that atexit is supported.  If this
is wrong, links will fail with an undefined symbol, which is easy to catch.

Mon Aug  2 20:57:05 1999  Jason Merrill  <jason@yorick.cygnus.com>

	* gbl-ctors.h: Lose HAVE_ATEXIT.  Don't define ON_EXIT.
	* libgcc2.c: Lose obsolete defn of WEAK_ALIAS.
	(__bb_init_func, __bb_init_prg): Use atexit instead of ON_EXIT.
	(__do_global_dtors): Likewise.  Don't mess with _exit_dummy_decl.
	(atexit, exit): Simplify.
	* tm.texi: Document NEED_ATEXIT and ON_EXIT.  Remove HAVE_ATEXIT.
	* config/lots: Remove defns of HAVE_ATEXIT.

Index: gbl-ctors.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gbl-ctors.h,v
retrieving revision 1.6
diff -c -p -r1.6 gbl-ctors.h
*** gbl-ctors.h	1998/12/16 20:55:56	1.6
--- gbl-ctors.h	1999/08/03 06:30:48
***************
*** 2,8 ****
     for getting g++ file-scope static objects constructed.  This file
     will get included either by libgcc2.c (for systems that don't support
     a .init section) or by crtstuff.c (for those that do).
!    Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
     Contributed by Ron Guilmette (rfg@segfault.us.com)
  
  This file is part of GNU CC.
--- 2,8 ----
     for getting g++ file-scope static objects constructed.  This file
     will get included either by libgcc2.c (for systems that don't support
     a .init section) or by crtstuff.c (for those that do).
!    Copyright (C) 1991, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
     Contributed by Ron Guilmette (rfg@segfault.us.com)
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 31,51 ****
  */
  
  #ifdef NEED_ATEXIT
- #ifndef HAVE_ATEXIT
- #define HAVE_ATEXIT	1	/* Take it from libgcc2.c */
- #endif
- #endif
- 
- #ifdef HAVE_ATEXIT
- #if defined (WINNT) || defined (NEED_ATEXIT)
  extern int atexit (void (*) (void));
- #endif
- #define ON_EXIT(FUNC,ARG) atexit ((FUNC))
- #else
- #ifdef sun
- extern int on_exit (void *, void *);	/* The man page says it returns int. */
- #define ON_EXIT(FUNC,ARG) on_exit ((FUNC), (ARG))
- #endif
  #endif
  
  /*  Declare a pointer to void function type.  */
--- 31,37 ----
Index: libgcc2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/libgcc2.c,v
retrieving revision 1.64
diff -c -p -r1.64 libgcc2.c
*** libgcc2.c	1999/06/11 03:12:22	1.64
--- libgcc2.c	1999/08/03 06:30:49
*************** Boston, MA 02111-1307, USA.  */
*** 53,62 ****
  #undef abort
  #endif
  
- #if (SUPPORTS_WEAK == 1) && (defined (ASM_OUTPUT_DEF) || defined (ASM_OUTPUT_WEAK_ALIAS))
- #define WEAK_ALIAS
- #endif
- 
  /* In a cross-compilation situation, default to inhibiting compilation
     of routines that use libc.  */
  
--- 53,58 ----
*************** __bb_init_func (struct bb *blocks)
*** 1709,1719 ****
    if (blocks->zero_word)
      return;
  
- #ifdef ON_EXIT
    /* Initialize destructor.  */
    if (!bb_head)
!     ON_EXIT (__bb_exit_func, 0);
! #endif
  
    /* Set up linked list.  */
    blocks->zero_word = 1;
--- 1705,1713 ----
    if (blocks->zero_word)
      return;
  
    /* Initialize destructor.  */
    if (!bb_head)
!     atexit (__bb_exit_func);
  
    /* Set up linked list.  */
    blocks->zero_word = 1;
*************** __bb_init_prg ()
*** 2084,2093 ****
    const char *pos;
    enum bb_func_mode m;
  
- #ifdef ON_EXIT
    /* Initialize destructor.  */
!   ON_EXIT (__bb_exit_func, 0);
! #endif
  
    if (!(file = fopen ("bb.in", "r")))
      return;
--- 2078,2085 ----
    const char *pos;
    enum bb_func_mode m;
  
    /* Initialize destructor.  */
!   atexit (__bb_exit_func);
  
    if (!(file = fopen ("bb.in", "r")))
      return;
*************** __bb_init_prg ()
*** 2172,2183 ****
        bb_stacksize = 10;
        bb_stack = (unsigned long *) malloc (bb_stacksize * sizeof (*bb_stack));
      }
- 
- #ifdef ON_EXIT
-       /* Initialize destructor.  */
-       ON_EXIT (__bb_exit_trace_func, 0);
- #endif
  
  }
  
  /* Called upon entering a basic block.  */
--- 2164,2172 ----
        bb_stacksize = 10;
        bb_stack = (unsigned long *) malloc (bb_stacksize * sizeof (*bb_stack));
      }
  
+   /* Initialize destructor.  */
+   atexit (__bb_exit_trace_func);
  }
  
  /* Called upon entering a basic block.  */
*************** __do_global_dtors ()
*** 2854,2875 ****
  #ifndef HAS_INIT_SECTION
  /* Run all the global constructors on entry to the program.  */
  
- #ifndef ON_EXIT
- #define ON_EXIT(a, b)
- #else
- /* Make sure the exit routine is pulled in to define the globals as
-    bss symbols, just in case the linker does not automatically pull
-    bss definitions from the library.  */
- 
- extern int _exit_dummy_decl;
- int *_exit_dummy_ref = &_exit_dummy_decl;
- #endif /* ON_EXIT */
- 
  void
  __do_global_ctors ()
  {
    DO_GLOBAL_CTORS_BODY;
!   ON_EXIT (__do_global_dtors, 0);
  }
  #endif /* no HAS_INIT_SECTION */
  
--- 2843,2853 ----
  #ifndef HAS_INIT_SECTION
  /* Run all the global constructors on entry to the program.  */
  
  void
  __do_global_ctors ()
  {
    DO_GLOBAL_CTORS_BODY;
!   atexit (__do_global_dtors);
  }
  #endif /* no HAS_INIT_SECTION */
  
*************** func_ptr __DTOR_LIST__[2];
*** 2931,2952 ****
  #include "gbl-ctors.h"
  
  #ifdef NEED_ATEXIT
- # ifdef ON_EXIT
- #  undef ON_EXIT
- # endif
- int _exit_dummy_decl = 0;	/* prevent compiler & linker warnings */
- #endif
  
! #ifndef ON_EXIT
  
- #ifdef NEED_ATEXIT
  # include <errno.h>
  
  static func_ptr *atexit_chain = 0;
  static long atexit_chain_length = 0;
  static volatile long last_atexit_chain_slot = -1;
  
! int atexit (func_ptr func)
  {
    if (++last_atexit_chain_slot == atexit_chain_length)
      {
--- 2909,2925 ----
  #include "gbl-ctors.h"
  
  #ifdef NEED_ATEXIT
  
! #ifndef HAVE_ON_EXIT
  
  # include <errno.h>
  
  static func_ptr *atexit_chain = 0;
  static long atexit_chain_length = 0;
  static volatile long last_atexit_chain_slot = -1;
  
! int
! atexit (func_ptr func)
  {
    if (++last_atexit_chain_slot == atexit_chain_length)
      {
*************** int atexit (func_ptr func)
*** 2968,2989 ****
    atexit_chain[last_atexit_chain_slot] = func;
    return (0);
  }
- #endif /* NEED_ATEXIT */
  
- /* If we have no known way of registering our own __do_global_dtors
-    routine so that it will be invoked at program exit time, then we
-    have to define our own exit routine which will get this to happen.  */
- 
- extern void __do_global_dtors ();
- extern void __bb_exit_func ();
  extern void _cleanup ();
  extern void _exit () __attribute__ ((noreturn));
  
  void 
  exit (int status)
  {
- #if !defined (INIT_SECTION_ASM_OP) || !defined (OBJECT_FORMAT_ELF)
- #ifdef NEED_ATEXIT
    if (atexit_chain)
      {
        for ( ; last_atexit_chain_slot-- >= 0; )
--- 2941,2953 ----
*************** exit (int status)
*** 2994,3012 ****
        free (atexit_chain);
        atexit_chain = 0;
      }
- #else /* No NEED_ATEXIT */
-   __do_global_dtors ();
- #endif /* No NEED_ATEXIT */
- #endif /* !defined (INIT_SECTION_ASM_OP) || !defined (OBJECT_FORMAT_ELF) */
- /* In gbl-ctors.h, ON_EXIT is defined if HAVE_ATEXIT is defined.  In
-    __bb_init_func and _bb_init_prg, __bb_exit_func is registered with
-    ON_EXIT if ON_EXIT is defined.  Thus we must not call __bb_exit_func here
-    if HAVE_ATEXIT is defined. */
- #ifndef HAVE_ATEXIT
- #ifndef inhibit_libc
-   __bb_exit_func ();
- #endif
- #endif /* !HAVE_ATEXIT */
  #ifdef EXIT_BODY
    EXIT_BODY;
  #else
--- 2958,2963 ----
*************** exit (int status)
*** 3015,3031 ****
    _exit (status);
  }
  
! #else /* ON_EXIT defined */
! int _exit_dummy_decl = 0;	/* prevent compiler & linker warnings */
  
! # ifndef HAVE_ATEXIT
! /* Provide a fake for atexit() using ON_EXIT.  */
! int atexit (func_ptr func)
  {
!   return ON_EXIT (func, NULL);
  }
! # endif /* HAVE_ATEXIT */
! #endif /* ON_EXIT defined */
  
  #endif /* L_exit */
  
--- 2966,2982 ----
    _exit (status);
  }
  
! #else /* HAVE_ON_EXIT */
  
! /* Simple; we just need a wrapper for ON_EXIT.  */
! int
! atexit (func_ptr func)
  {
!   return ON_EXIT (func);
  }
! 
! #endif /* HAVE_ON_EXIT */
! #endif /* NEED_ATEXIT */
  
  #endif /* L_exit */
  
Index: tm.texi
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/tm.texi,v
retrieving revision 1.84
diff -c -p -r1.84 tm.texi
*** tm.texi	1999/08/02 23:17:06	1.84
--- tm.texi	1999/08/03 06:30:49
*************** The definition should be a C statement (
*** 7611,7622 ****
  appropriate rtl instructions.  It is used only when compiling the end of
  @code{main}.
  
! @item HAVE_ATEXIT
! @findex HAVE_ATEXIT
! Define this if the target system supports the function
! @code{atexit} from the ANSI C standard.  If this is not defined,
! and @code{INIT_SECTION_ASM_OP} is not defined, a default
! @code{exit} function will be provided to support C++.
  
  @item EXIT_BODY
  @findex EXIT_BODY
--- 7611,7631 ----
  appropriate rtl instructions.  It is used only when compiling the end of
  @code{main}.
  
! @item NEED_ATEXIT
! @findex NEED_ATEXIT
! Define this if the target system lacks the function @code{atexit}
! from the ANSI C standard.  If this macro is defined, a default definition
! will be provided to support C++.  If @code{ON_EXIT} is not defined,
! a default @code{exit} function will also be provided.
! 
! @item ON_EXIT
! @findex ON_EXIT
! Define this macro if the target has another way to implement atexit
! functionality without replacing @code{exit}.  For instance, SunOS 4 has
! a similar @code{on_exit} library function.
! 
! The definition should be a functional macro which can be used just like
! the @code{atexit} function.
  
  @item EXIT_BODY
  @findex EXIT_BODY
Index: config/elfos.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/elfos.h,v
retrieving revision 1.6
diff -c -p -r1.6 elfos.h
*** config/elfos.h	1999/06/30 05:58:43	1.6
--- config/elfos.h	1999/08/03 06:30:50
*************** along with GNU CC; see the file COPYING.
*** 20,28 ****
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
- /* For the sake of libgcc2.c, indicate target supports atexit.  */
- #define HAVE_ATEXIT
- 
  #undef  ENDFILE_SPEC
  #define ENDFILE_SPEC "crtend.o%s"
  
--- 20,25 ----
Index: config/gnu.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/gnu.h,v
retrieving revision 1.2
diff -c -p -r1.2 gnu.h
*** config/gnu.h	1998/12/16 20:59:50	1.2
--- config/gnu.h	1999/08/03 06:30:50
***************
*** 12,21 ****
  #undef STANDARD_INCLUDE_DIR
  #define STANDARD_INCLUDE_DIR "/include"
  
- 
- /* We have atexit.  */
- #define HAVE_ATEXIT
- 
  /* Implicit library calls should use memcpy, not bcopy, etc.  */
  #define TARGET_MEM_FUNCTIONS
  
--- 12,17 ----
Index: config/interix.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/interix.h,v
retrieving revision 1.2
diff -c -p -r1.2 interix.h
*** config/interix.h	1999/04/13 22:02:14	1.2
--- config/interix.h	1999/08/03 06:30:50
*************** for windows/multi thread */
*** 102,107 ****
  #define WCHAR_UNSIGNED 1
  #define WCHAR_TYPE "short unsigned int"
  #define WCHAR_TYPE_SIZE 16
- 
- /* For the sake of libgcc2.c, indicate target supports atexit.  */
- #define HAVE_ATEXIT
--- 102,104 ----
Index: config/linux-aout.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/linux-aout.h,v
retrieving revision 1.4
diff -c -p -r1.4 linux-aout.h
*** config/linux-aout.h	1998/12/16 20:59:54	1.4
--- config/linux-aout.h	1999/08/03 06:30:50
***************
*** 1,5 ****
  /* Definitions for Linux-based GNU systems.
!    Copyright (C) 1995, 1997 Free Software Foundation, Inc.
     Contributed by H.J. Lu (hjl@nynexst.com)
  
  This file is part of GNU CC.
--- 1,5 ----
  /* Definitions for Linux-based GNU systems.
!    Copyright (C) 1995, 1997, 1999 Free Software Foundation, Inc.
     Contributed by H.J. Lu (hjl@nynexst.com)
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 21,29 ****
  
  /* Don't assume anything about the header files. */
  #define NO_IMPLICIT_EXTERN_C
- 
- #undef HAVE_ATEXIT
- #define HAVE_ATEXIT
  
  /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is.
     For now, we play safe. It may change later. */
--- 21,26 ----
Index: config/linux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/linux.h,v
retrieving revision 1.8
diff -c -p -r1.8 linux.h
*** config/linux.h	1998/12/16 20:59:55	1.8
--- config/linux.h	1999/08/03 06:30:50
***************
*** 1,5 ****
  /* Definitions for Linux-based GNU systems with ELF format
!    Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
     Contributed by Eric Youngdale.
     Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
  
--- 1,5 ----
  /* Definitions for Linux-based GNU systems with ELF format
!    Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
     Contributed by Eric Youngdale.
     Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
  
*************** Boston, MA 02111-1307, USA.  */
*** 22,30 ****
  
  /* Don't assume anything about the header files. */
  #define NO_IMPLICIT_EXTERN_C
- 
- #undef HAVE_ATEXIT
- #define HAVE_ATEXIT
  
  /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is.
     For now, we play safe. It may change later. */
--- 22,27 ----
Index: config/lynx-ng.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/lynx-ng.h,v
retrieving revision 1.2
diff -c -p -r1.2 lynx-ng.h
*** config/lynx-ng.h	1998/12/16 20:59:56	1.2
--- config/lynx-ng.h	1999/08/03 06:30:50
***************
*** 1,5 ****
  /* Target independent definitions for LynxOS, using Lynx's old as and ld.
!    Copyright (C) 1993 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Target independent definitions for LynxOS, using Lynx's old as and ld.
!    Copyright (C) 1993, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 97,106 ****
      warning ("-msystem-v and -p are incompatible");		\
    if (TARGET_SYSTEM_V && TARGET_THREADS)			\
      warning ("-msystem-v and -mthreads are incompatible"); }
- 
- /* Define this so that C++ destructors will use atexit.  */
- 
- #define HAVE_ATEXIT
  
  /* This is defined only so that we can find the assembler.  Everything else
     is in /bin.  */
--- 97,102 ----
Index: config/lynx.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/lynx.h,v
retrieving revision 1.2
diff -c -p -r1.2 lynx.h
*** config/lynx.h	1998/12/16 20:59:57	1.2
--- config/lynx.h	1999/08/03 06:30:50
***************
*** 1,5 ****
  /* Target independent definitions for LynxOS.
!    Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Target independent definitions for LynxOS.
!    Copyright (C) 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** do {								\
*** 121,131 ****
    if (TARGET_SYSTEM_V && TARGET_THREADS)			\
      warning ("-msystem-v and -mthreads are incompatible");	\
  } while (0)
- 
- /* Define this so that C++ destructors will use atexit, since LynxOS
-    calls exit after main returns.  */
- 
- #define HAVE_ATEXIT
  
  /* Since init.o et al put all sorts of stuff into the init section,
     we can't use the standard init section support in crtbegin.o. */
--- 121,126 ----
Index: config/netbsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/netbsd.h,v
retrieving revision 1.4
diff -c -p -r1.4 netbsd.h
*** config/netbsd.h	1998/12/16 20:59:58	1.4
--- config/netbsd.h	1999/08/03 06:30:50
***************
*** 66,75 ****
    (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
     || (CHAR) == 'R')
  
- /* We have atexit(3).  */
- 
- #define HAVE_ATEXIT
- 
  /* Implicit library calls should use memcpy, not bcopy, etc.  */
  
  #define TARGET_MEM_FUNCTIONS
--- 66,71 ----
Index: config/nextstep.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/nextstep.h,v
retrieving revision 1.5
diff -c -p -r1.5 nextstep.h
*** config/nextstep.h	1998/12/16 21:00:00	1.5
--- config/nextstep.h	1999/08/03 06:30:50
***************
*** 1,6 ****
  /* Operating system specific defines to be used when targeting GCC
     for NeXTSTEP.
!    Copyright (C) 1989, 90-93, 1996, 1997 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,6 ----
  /* Operating system specific defines to be used when targeting GCC
     for NeXTSTEP.
!    Copyright (C) 1989, 90-93, 1996, 1997, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 80,89 ****
  /* Make -fnext-runtime the default.  */
  
  #define NEXT_OBJC_RUNTIME
- 
- /* We have atexit.  */
- 
- #define HAVE_ATEXIT
  
  /* Enable recent gcc to compile under the old gcc in Next release 1.0.  */
  
--- 80,85 ----
Index: config/openbsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/openbsd.h,v
retrieving revision 1.2
diff -c -p -r1.2 openbsd.h
*** config/openbsd.h	1999/03/08 20:40:03	1.2
--- config/openbsd.h	1999/08/03 06:30:50
*************** Boston, MA 02111-1307, USA.  */
*** 139,147 ****
  
  /* Miscellaneous parameters.  */
  
- /* Tell libgcc2.c that OpenBSD targets support atexit.  */
- #define HAVE_ATEXIT
- 
  /* Controlling debugging info: dbx options.  */
  
  /* Don't use the `xsTAG;' construct in DBX output; OpenBSD systems that
--- 139,144 ----
Index: config/psos.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/psos.h,v
retrieving revision 1.2
diff -c -p -r1.2 psos.h
*** config/psos.h	1998/12/16 21:00:02	1.2
--- config/psos.h	1999/08/03 06:30:50
***************
*** 1,7 ****
  /* Operating system specific defines to be used when targeting GCC for some
     embedded system running pSOS. We assume GNU tools with ELF, but
     try to maintain compatibility with the MRI tools. Based on svr4.h.
!    Copyright (C) 1996 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,7 ----
  /* Operating system specific defines to be used when targeting GCC for some
     embedded system running pSOS. We assume GNU tools with ELF, but
     try to maintain compatibility with the MRI tools. Based on svr4.h.
!    Copyright (C) 1996, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** dtors_section ()							\
*** 175,183 ****
  /* For pSOS we use DBX debugging info.  */
  
  #define DBX_DEBUGGING_INFO
- 
- 
- /* Prevent generation of an exit function.  */
- 
- #define HAVE_ATEXIT
- 
--- 175,177 ----
Index: config/ptx4.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/ptx4.h,v
retrieving revision 1.6
diff -c -p -r1.6 ptx4.h
*** config/ptx4.h	1999/01/31 17:46:33	1.6
--- config/ptx4.h	1999/08/03 06:30:50
*************** Boston, MA 02111-1307, USA.
*** 27,35 ****
  /* Define a symbol indicating that we are using svr4.h.  */
  #define USING_SVR4_H
  
- /* For the sake of libgcc2.c, indicate target supports atexit.  */
- #define HAVE_ATEXIT
- 
  /* Cpp, assembler, linker, library, and startfile spec's.  */
  
  /* This defines which switch letters take arguments.  On svr4, most of
--- 27,32 ----
Index: config/svr4.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/svr4.h,v
retrieving revision 1.15
diff -c -p -r1.15 svr4.h
*** config/svr4.h	1999/07/26 06:07:02	1.15
--- config/svr4.h	1999/08/03 06:30:50
*************** Boston, MA 02111-1307, USA.
*** 42,50 ****
  /* Define a symbol indicating that we are using svr4.h.  */
  #define USING_SVR4_H
  
- /* For the sake of libgcc2.c, indicate target supports atexit.  */
- #define HAVE_ATEXIT
- 
  /* Cpp, assembler, linker, library, and startfile spec's.  */
  
  /* This defines which switch letters take arguments.  On svr4, most of
--- 42,47 ----
Index: config/xm-linux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/xm-linux.h,v
retrieving revision 1.7
diff -c -p -r1.7 xm-linux.h
*** config/xm-linux.h	1998/12/16 21:00:23	1.7
--- config/xm-linux.h	1999/08/03 06:30:50
***************
*** 1,5 ****
  /* Configuration for GCC for Intel i386 running Linux-based GNU systems.
!    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
     Contributed by H.J. Lu (hjl@nynexst.com)
  
  This file is part of GNU CC.
--- 1,5 ----
  /* Configuration for GCC for Intel i386 running Linux-based GNU systems.
!    Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
     Contributed by H.J. Lu (hjl@nynexst.com)
  
  This file is part of GNU CC.
*************** You should have received a copy of the G
*** 18,26 ****
  along with GNU CC; see the file COPYING.  If not, write to
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
- 
- #undef  HAVE_ATEXIT
- #define HAVE_ATEXIT
  
  #undef  POSIX
  #define POSIX
--- 18,23 ----
Index: config/alpha/alpha.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/alpha/alpha.h,v
retrieving revision 1.71
diff -c -p -r1.71 alpha.h
*** config/alpha/alpha.h	1999/07/26 05:48:39	1.71
--- config/alpha/alpha.h	1999/08/03 06:30:51
*************** config/alpha/alpha.h									\
*** 1745,1754 ****
     few bits. */
  #define SHIFT_COUNT_TRUNCATED 1
  
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
- 
  /* The EV4 is dual issue; EV5/EV6 are quad issue.  */
  #define ISSUE_RATE  (alpha_cpu == PROCESSOR_EV4 ? 2 : 4)
  
--- 1745,1750 ----
Index: config/arc/arc.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arc/arc.h,v
retrieving revision 1.14
diff -c -p -r1.14 arc.h
*** config/arc/arc.h	1999/08/02 23:19:24	1.14
--- config/arc/arc.h	1999/08/03 06:30:51
*************** extern void arc_set_default_type_attribu
*** 1608,1619 ****
  #define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
  arc_set_default_type_attributes (TYPE)
  
- /* Define this if the target system supports the function
-    atexit from the ANSI C standard.  If this is not defined,
-    and INIT_SECTION_ASM_OP is not defined, a default
-    exit function will be provided to support C++.  */
- #define HAVE_ATEXIT
- 
  /* alloca should avoid clobbering the old register save area.  */
  /* ??? Not defined in tm.texi.  */
  #define SETJMP_VIA_SAVE_AREA
--- 1608,1613 ----
Index: config/arm/coff.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/coff.h,v
retrieving revision 1.11
diff -c -p -r1.11 coff.h
*** config/arm/coff.h	1999/07/27 17:02:41	1.11
--- config/arm/coff.h	1999/08/03 06:30:51
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler,
     for ARM with COFF obj format.
!    Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
     Contributed by Doug Evans (dje@cygnus.com).
     
  This file is part of GNU CC.
--- 1,6 ----
  /* Definitions of target machine for GNU compiler,
     for ARM with COFF obj format.
!    Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
     Contributed by Doug Evans (dje@cygnus.com).
     
  This file is part of GNU CC.
*************** dtors_section ()							\
*** 207,220 ****
  
  #undef DO_GLOBAL_CTORS_BODY
  #undef DO_GLOBAL_DTORS_BODY
- 
- /* If you don't define HAVE_ATEXIT, and the object file format/OS/whatever 
-    does not support constructors/destructors, then gcc implements destructors
-    by defining its own exit function, which calls the destructors.  This gcc
-    exit function overrides the C library's exit function, and this can cause
-    all kinds of havoc if the C library has a non-trivial exit function.  You
-    really don't want to use the exit function in libgcc2.c.  */
- #define HAVE_ATEXIT
  
  /* The ARM development system defines __main.  */
  #define NAME__MAIN  "__gccmain"
--- 207,212 ----
Index: config/arm/linux-elf.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/linux-elf.h,v
retrieving revision 1.7
diff -c -p -r1.7 linux-elf.h
*** config/arm/linux-elf.h	1999/03/31 10:25:34	1.7
--- config/arm/linux-elf.h	1999/08/03 06:30:51
*************** Boston, MA 02111-1307, USA.  */
*** 22,30 ****
  /* Run-time Target Specification.  */
  #define TARGET_VERSION  fputs (" (ARM GNU/Linux with ELF)", stderr);
  
- /* We have libgcc2.  */
- #define HAVE_ATEXIT
- 
  /* Default is to use APCS-32 mode.  */
  #ifndef SUBTARGET_DEFAULT_APCS26
  #define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SHORT_BYTE)
--- 22,27 ----
Index: config/arm/linux-telf.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/linux-telf.h,v
retrieving revision 1.1
diff -c -p -r1.1 linux-telf.h
*** config/arm/linux-telf.h	1999/07/28 08:52:05	1.1
--- config/arm/linux-telf.h	1999/08/03 06:30:51
*************** along with this program; see the file CO
*** 19,27 ****
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
- /* We have libgcc2.  */
- #define HAVE_ATEXIT
- 
  #define SUBTARGET_EXTRA_ASM_SPEC	\
  	" %{fPIC:-k} %{fpic:-k}"
  
--- 19,24 ----
Index: config/arm/riscix.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/riscix.h,v
retrieving revision 1.5
diff -c -p -r1.5 riscix.h
*** config/arm/riscix.h	1999/04/12 09:43:37	1.5
--- config/arm/riscix.h	1999/08/03 06:30:51
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler.  ARM RISCiX version.
!    Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
     Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
  	      work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
     	      and Martin Simmons (@harleqn.co.uk).
--- 1,5 ----
  /* Definitions of target machine for GNU compiler.  ARM RISCiX version.
!    Copyright (C) 1993, 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
     Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
  	      work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
     	      and Martin Simmons (@harleqn.co.uk).
*************** Boston, MA 02111-1307, USA.  */
*** 94,105 ****
  
  /* Unsigned chars produces much better code than signed.  */
  #define DEFAULT_SIGNED_CHAR  0
- 
- /* Define this if the target system supports the function atexit from the
-    ANSI C standard.  If this is not defined, and INIT_SECTION_ASM_OP is not
-    defined, a default exit function will be provided to support C++.  
-    The man page only describes on_exit, but atexit is also there.  */
- #define HAVE_ATEXIT 1
  
  /* Some systems use __main in a way incompatible with its use in gcc, in these
     cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
--- 94,99 ----
Index: config/arm/riscix1-1.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/riscix1-1.h,v
retrieving revision 1.4
diff -c -p -r1.4 riscix1-1.h
*** config/arm/riscix1-1.h	1999/03/23 09:02:04	1.4
--- config/arm/riscix1-1.h	1999/08/03 06:30:51
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler.  ARM RISCiX 1.1x version.
!    Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
     Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
  	      work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
     	      and Martin Simmons (@harleqn.co.uk).
--- 1,5 ----
  /* Definitions of target machine for GNU compiler.  ARM RISCiX 1.1x version.
!    Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
     Contributed by Richard Earnshaw (rwe11@cl.cam.ac.uk), based on original
  	      work by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
     	      and Martin Simmons (@harleqn.co.uk).
*************** Boston, MA 02111-1307, USA.  */
*** 62,73 ****
  #define DEFAULT_SIGNED_CHAR  1
  #endif
  
! /* Define this if the target system supports the function atexit form the
!    ANSI C standard.  If this is not defined, and INIT_SECTION_ASM_OP is not
     defined, a default exit function will be provided to support C++.  
     The man page only describes on_exit, but atexit is also there.  
!    This seems to be missing in early versions. */
! /*#define HAVE_ATEXIT 1 */
  /* Some systems use __main in a way incompatible with its use in gcc, in these
     cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
     give the same symbol without quotes for an alternative entry point.  You
--- 62,76 ----
  #define DEFAULT_SIGNED_CHAR  1
  #endif
  
! /* Define this if the target system lacks the function atexit from the
!    ANSI C standard.  If this is defined, and ON_EXIT is not
     defined, a default exit function will be provided to support C++.  
     The man page only describes on_exit, but atexit is also there.  
!    This seems to be missing in early versions.
! 
!    FIXME Should we define ON_EXIT here?  */
! #define NEED_ATEXIT
! 
  /* Some systems use __main in a way incompatible with its use in gcc, in these
     cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
     give the same symbol without quotes for an alternative entry point.  You
Index: config/arm/tcoff.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/tcoff.h,v
retrieving revision 1.5
diff -c -p -r1.5 tcoff.h
*** config/arm/tcoff.h	1999/06/02 08:46:55	1.5
--- config/arm/tcoff.h	1999/08/03 06:30:51
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler,
     for Thumb with COFF obj format.
!    Copyright (C) 1995, 1996 Free Software Foundation, Inc.
     Derived from arm/coff.h originally by Doug Evans (dje@cygnus.com).
     
  This file is part of GNU CC.
--- 1,6 ----
  /* Definitions of target machine for GNU compiler,
     for Thumb with COFF obj format.
!    Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
     Derived from arm/coff.h originally by Doug Evans (dje@cygnus.com).
     
  This file is part of GNU CC.
*************** do {						\
*** 182,191 ****
  
  #undef DO_GLOBAL_CTORS_BODY
  #undef DO_GLOBAL_DTORS_BODY
- 
- /* The ARM development system has atexit and doesn't have _exit,
-    so define this for now.  */
- #define HAVE_ATEXIT
  
  /* The ARM development system defines __main.  */
  #define NAME__MAIN "__gccmain"
--- 182,187 ----
Index: config/arm/telf.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/telf.h,v
retrieving revision 1.4
diff -c -p -r1.4 telf.h
*** config/arm/telf.h	1999/07/28 08:52:05	1.4
--- config/arm/telf.h	1999/08/03 06:30:51
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler,
     for Thumb with ELF obj format.
!    Copyright (C) 1995, 1996 Free Software Foundation, Inc.
     
  This file is part of GNU CC.
  
--- 1,6 ----
  /* Definitions of target machine for GNU compiler,
     for Thumb with ELF obj format.
!    Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
     
  This file is part of GNU CC.
  
*************** dtors_section ()							\
*** 298,307 ****
        fprintf (STREAM, "\n");			\
      }						\
    while (0)
- 
- /* The ARM development system has atexit and doesn't have _exit,
-    so define this for now.  */
- #define HAVE_ATEXIT
  
  /* The ARM development system defines __main.  */
  #define NAME__MAIN "__gccmain"
--- 298,303 ----
Index: config/arm/thumb.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/thumb.h,v
retrieving revision 1.12
diff -c -p -r1.12 thumb.h
*** config/arm/thumb.h	1999/07/28 08:52:05	1.12
--- config/arm/thumb.h	1999/08/03 06:30:51
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler, for ARM/Thumb.
!    Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
     The basis of this contribution was generated by
     		Richard Earnshaw, Advanced RISC Machines Ltd
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler, for ARM/Thumb.
!    Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
     The basis of this contribution was generated by
     		Richard Earnshaw, Advanced RISC Machines Ltd
  
*************** extern int making_const_table;
*** 1276,1283 ****
  #define DOLLARS_IN_IDENTIFIERS 0
  
  #define NO_DOLLAR_IN_LABEL 1
- 
- #define HAVE_ATEXIT
  
  /* The literal pool needs to reside in the text area due to the
     limited PC addressing range: */
--- 1276,1281 ----
Index: config/arm/tpe.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/tpe.h,v
retrieving revision 1.3
diff -c -p -r1.3 tpe.h
*** config/arm/tpe.h	1999/07/01 01:18:35	1.3
--- config/arm/tpe.h	1999/08/03 06:30:51
*************** config/arm/tpe.h						\
*** 214,223 ****
  #undef DO_GLOBAL_CTORS_BODY
  #undef DO_GLOBAL_DTORS_BODY
  
- /* The ARM development system has atexit and doesn't have _exit,
-    so define this for now.  */
- #define HAVE_ATEXIT
- 
  /* The ARM development system defines __main.  */
  #define NAME__MAIN "__gccmain"
  #define SYMBOL__MAIN __gccmain
--- 214,219 ----
Index: config/arm/unknown-elf.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/unknown-elf.h,v
retrieving revision 1.6
diff -c -p -r1.6 unknown-elf.h
*** config/arm/unknown-elf.h	1999/04/09 13:07:56	1.6
--- config/arm/unknown-elf.h	1999/08/03 06:30:51
***************
*** 1,5 ****
  /* Definitions for non-Linux based ARM systems using ELF
!    Copyright (C) 1998 Free Software Foundation, Inc.
     Contributed by Catherine Moore <clm@cygnus.com>
  
  This file is part of GNU CC.
--- 1,5 ----
  /* Definitions for non-Linux based ARM systems using ELF
!    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
     Contributed by Catherine Moore <clm@cygnus.com>
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 23,36 ****
  #ifndef TARGET_VERSION
  #define TARGET_VERSION	fputs (" (ARM/ELF non-Linux)", stderr);
  #endif
- 
- /* If you don't define HAVE_ATEXIT, and the object file format/OS/whatever 
-    does not support constructors/destructors, then gcc implements destructors
-    by defining its own exit function, which calls the destructors.  This gcc
-    exit function overrides the C library's exit function, and this can cause
-    all kinds of havoc if the C library has a non-trivial exit function.  You
-    really don't want to use the exit function in libgcc2.c.  */
- #define HAVE_ATEXIT
  
  /* Default to using APCS-32 and software floating point.  */
  #ifndef TARGET_DEFAULT
--- 23,28 ----
Index: config/c4x/c4x.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/c4x/c4x.h,v
retrieving revision 1.22
diff -c -p -r1.22 c4x.h
*** config/c4x/c4x.h	1999/07/26 23:44:33	1.22
--- config/c4x/c4x.h	1999/08/03 06:30:51
***************
*** 8,14 ****
  
     GNU CC is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
!    the Free Software Foundation; either version 1, or (at your option)
     any later version.
  
     GNU CC is distributed in the hope that it will be useful,
--- 8,14 ----
  
     GNU CC is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
!    the Free Software Foundation; either version 2, or (at your option)
     any later version.
  
     GNU CC is distributed in the hope that it will be useful,
*************** do {								\
*** 1929,1937 ****
    while (p != beg)						\
      (*--p) ();							\
  } while (0)
- 
- /* The TI tooling uses atexit.  */
- #define	HAVE_ATEXIT
  
  #undef EXTRA_SECTIONS
  #define EXTRA_SECTIONS in_const, in_init, in_fini, in_ctors, in_dtors
--- 1929,1934 ----
Index: config/clipper/clix.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/clipper/clix.h,v
retrieving revision 1.2
diff -c -p -r1.2 clix.h
*** config/clipper/clix.h	1998/12/16 21:02:21	1.2
--- config/clipper/clix.h	1999/08/03 06:30:51
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler.  Clipper/Clix version.
!    Copyright (C) 1988, 1993, 1996, 1997 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler.  Clipper/Clix version.
!    Copyright (C) 1988, 1993, 1996, 1997, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 32,40 ****
  #undef LIB_SPEC
  
  #define TARGET_MEM_FUNCTIONS
- 
- #undef HAVE_ATEXIT
- #define HAVE_ATEXIT
  
  #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)			\
  do {							\
--- 32,37 ----
Index: config/i386/386bsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/386bsd.h,v
retrieving revision 1.4
diff -c -p -r1.4 386bsd.h
*** config/i386/386bsd.h	1998/12/16 21:03:04	1.4
--- config/i386/386bsd.h	1999/08/03 06:30:51
***************
*** 28,37 ****
  #undef WCHAR_TYPE_SIZE
  #define WCHAR_TYPE_SIZE 16
  
- /* 386BSD does have atexit.  */
- 
- #define HAVE_ATEXIT
- 
  /* Redefine this to use %eax instead of %edx.  */
  #undef FUNCTION_PROFILER
  #define FUNCTION_PROFILER(FILE, LABELNO)  \
--- 28,33 ----
Index: config/i386/cygwin.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/cygwin.h,v
retrieving revision 1.8
diff -c -p -r1.8 cygwin.h
*** config/i386/cygwin.h	1999/06/21 04:52:49	1.8
--- config/i386/cygwin.h	1999/08/03 06:30:51
*************** Boston, MA 02111-1307, USA. */
*** 127,134 ****
  #define WCHAR_TYPE_SIZE 16
  #define WCHAR_TYPE "short unsigned int"
  
- #define HAVE_ATEXIT 1
- 
  
  /* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop).  */
  #define HANDLE_PRAGMA_PACK_PUSH_POP 1
--- 127,132 ----
Index: config/i386/djgpp.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/djgpp.h,v
retrieving revision 1.4
diff -c -p -r1.4 djgpp.h
*** config/i386/djgpp.h	1999/06/21 05:23:15	1.4
--- config/i386/djgpp.h	1999/08/03 06:30:51
*************** config/i386/djgpp.h							\
*** 152,161 ****
  #define ASM_OUTPUT_ALIGN(FILE,LOG) \
    if ((LOG) != 0) fprintf ((FILE), "\t.p2align %d\n", LOG)
  
- /* djgpp has atexit ().  */
- #undef HAVE_ATEXIT
- #define HAVE_ATEXIT
- 
  /* djgpp automatically calls its own version of __main, so don't define one
     in libgcc, nor call one in main().  */
  #define HAS_INIT_SECTION
--- 152,157 ----
Index: config/i386/freebsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/freebsd.h,v
retrieving revision 1.14
diff -c -p -r1.14 freebsd.h
*** config/i386/freebsd.h	1999/06/02 00:08:18	1.14
--- config/i386/freebsd.h	1999/08/03 06:30:51
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler for Intel 80386
     running FreeBSD.
!    Copyright (C) 1988, 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
     Contributed by Poul-Henning Kamp <phk@login.dkuug.dk>
  
  This file is part of GNU CC.
--- 1,6 ----
  /* Definitions of target machine for GNU compiler for Intel 80386
     running FreeBSD.
!    Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999 Free Software Foundation, Inc.
     Contributed by Poul-Henning Kamp <phk@login.dkuug.dk>
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 55,62 ****
  
  #undef WCHAR_TYPE_SIZE
  #define WCHAR_TYPE_SIZE BITS_PER_WORD
- 
- #define HAVE_ATEXIT
  
  /* Override the default comment-starter of "/".  */
  
--- 55,60 ----
Index: config/i386/i386-interix.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/i386-interix.h,v
retrieving revision 1.2
diff -c -p -r1.2 i386-interix.h
*** config/i386/i386-interix.h	1999/04/13 23:00:11	1.2
--- config/i386/i386-interix.h	1999/08/03 06:30:52
*************** Boston, MA 02111-1307, USA.  */
*** 57,65 ****
  
  #define ASM_LOAD_ADDR(loc, reg)   "     leal " #loc "," #reg "\n"
  
- /* For the sake of libgcc2.c, indicate target supports atexit.  */
- #define HAVE_ATEXIT
- 
  /* cpp handles __STDC__ */
  #undef CPP_PREDEFINES
  #define CPP_PREDEFINES " \
--- 57,62 ----
Index: config/i386/linux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/linux.h,v
retrieving revision 1.15
diff -c -p -r1.15 linux.h
*** config/i386/linux.h	1999/04/08 00:32:13	1.15
--- config/i386/linux.h	1999/08/03 06:30:52
***************
*** 1,5 ****
  /* Definitions for Intel 386 running Linux-based GNU systems with ELF format.
!    Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
     Contributed by Eric Youngdale.
     Modified for stabs-in-ELF by H.J. Lu.
  
--- 1,5 ----
  /* Definitions for Intel 386 running Linux-based GNU systems with ELF format.
!    Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
     Contributed by Eric Youngdale.
     Modified for stabs-in-ELF by H.J. Lu.
  
Index: config/i386/osfrose.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/osfrose.h,v
retrieving revision 1.7
diff -c -p -r1.7 osfrose.h
*** config/i386/osfrose.h	1999/04/02 17:20:09	1.7
--- config/i386/osfrose.h	1999/08/03 06:30:52
*************** while (0)
*** 850,859 ****
  #define REAL_NM_FILE_NAME	"/usr/ccs/gcc/bfd-nm"
  #define REAL_STRIP_FILE_NAME	"/usr/ccs/bin/strip"
  
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
- 
  /* Define this macro meaning that gcc should find the library 'libgcc.a'
     by hand, rather than passing the argument '-lgcc' to tell the linker
     to do the search */
--- 850,855 ----
Index: config/i386/sco.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/sco.h,v
retrieving revision 1.5
diff -c -p -r1.5 sco.h
*** config/i386/sco.h	1999/01/19 20:33:01	1.5
--- config/i386/sco.h	1999/08/03 06:30:52
*************** Boston, MA 02111-1307, USA.  */
*** 71,80 ****
   "%{!fsigned-char:-D__CHAR_UNSIGNED__ -D_CHAR_UNSIGNED}"
  #endif
  
- /* Use atexit for static destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
- 
  /* Specify the size_t type.  */
  #define SIZE_TYPE "unsigned int"
  
--- 71,76 ----
Index: config/i386/sco5.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/sco5.h,v
retrieving revision 1.26
diff -c -p -r1.26 sco5.h
*** config/i386/sco5.h	1999/02/27 12:48:26	1.26
--- config/i386/sco5.h	1999/08/03 06:30:52
*************** compiler at the end of the day. Onward w
*** 940,946 ****
  
  #if defined(CRT_BEGIN) || defined(CRT_END) || defined(IN_LIBGCC2)
  # undef OBJECT_FORMAT_ELF
- # undef HAVE_ATEXIT
  # undef INIT_SECTION_ASM_OP
  # undef FINI_SECTION_ASM_OP
  # undef CTORS_SECTION_ASM_OP
--- 940,945 ----
*************** compiler at the end of the day. Onward w
*** 952,958 ****
  
  # if defined (_SCO_ELF)
  #  define OBJECT_FORMAT_ELF
- #  define HAVE_ATEXIT 1
  #  define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_ELF
  #  define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_ELF
  #  define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_ELF
--- 951,956 ----
Index: config/i386/scodbx.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/scodbx.h,v
retrieving revision 1.4
diff -c -p -r1.4 scodbx.h
*** config/i386/scodbx.h	1999/01/19 20:33:03	1.4
--- config/i386/scodbx.h	1999/08/03 06:30:52
*************** Boston, MA 02111-1307, USA.  */
*** 66,75 ****
   "%{!fsigned-char:-D__CHAR_UNSIGNED__ -D_CHAR_UNSIGNED}"
  #endif
  
- /* Use atexit for static destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
- 
  /* caller has to pop the extra argument passed to functions that return
     structures. */
  
--- 66,71 ----
Index: config/i386/seq-sysv3.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/seq-sysv3.h,v
retrieving revision 1.2
diff -c -p -r1.2 seq-sysv3.h
*** config/i386/seq-sysv3.h	1998/12/16 21:04:05	1.2
--- config/i386/seq-sysv3.h	1999/08/03 06:30:52
***************
*** 40,42 ****
--- 40,45 ----
  /* Assembler pseudo-op for uninitialized shared local variables (.shbss). */
  #undef  SHARED_BSS_SECTION_ASM_OP
  #define SHARED_BSS_SECTION_ASM_OP ".section .shbss, \"bs\""
+ 
+ /* seq2-sysv3.h used to define HAVE_ATEXIT, so I assume ptx1 needs this...  */
+ #define NEED_ATEXIT
Index: config/i386/seq2-sysv3.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/seq2-sysv3.h,v
retrieving revision 1.2
diff -c -p -r1.2 seq2-sysv3.h
*** config/i386/seq2-sysv3.h	1998/12/16 21:04:06	1.2
--- config/i386/seq2-sysv3.h	1999/08/03 06:30:52
***************
*** 4,8 ****
  
  /* Use atexit for static destructors, instead of defining
     our own exit function.  */
! #define HAVE_ATEXIT
! 
--- 4,7 ----
  
  /* Use atexit for static destructors, instead of defining
     our own exit function.  */
! #undef NEED_ATEXIT
Index: config/i386/win-nt.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/win-nt.h,v
retrieving revision 1.3
diff -c -p -r1.3 win-nt.h
*** config/i386/win-nt.h	1998/12/16 21:04:47	1.3
--- config/i386/win-nt.h	1999/08/03 06:30:52
***************
*** 1,6 ****
  /* Operating system specific defines to be used when targeting GCC for
     Windows NT 3.x on an i386.
!    Copyright (C) 1994, 1995 Free Software Foundation, Inc.
     Contributed by Douglas B. Rupp (drupp@cs.washington.edu).
  
  This file is part of GNU CC.
--- 1,6 ----
  /* Operating system specific defines to be used when targeting GCC for
     Windows NT 3.x on an i386.
!    Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc.
     Contributed by Douglas B. Rupp (drupp@cs.washington.edu).
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA. */
*** 41,47 ****
  #define WCHAR_TYPE "short unsigned int"
  #undef LONG_DOUBLE_TYPE_SIZE
  #define LONG_DOUBLE_TYPE_SIZE 64
- #define HAVE_ATEXIT 1
  
  #undef EXTRA_SECTIONS
  #define EXTRA_SECTIONS in_ctor, in_dtor
--- 41,46 ----
Index: config/i386/win32.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/win32.h,v
retrieving revision 1.5
diff -c -p -r1.5 win32.h
*** config/i386/win32.h	1999/04/02 17:20:12	1.5
--- config/i386/win32.h	1999/08/03 06:30:52
***************
*** 2,8 ****
     hosting on Windows NT 3.x, using a Unix style C library and tools,
     as distinct from winnt.h, which is used to build GCC for use with a
     windows style library and tool set and uses the Microsoft tools.
!    Copyright (C) 1995-1998 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 2,8 ----
     hosting on Windows NT 3.x, using a Unix style C library and tools,
     as distinct from winnt.h, which is used to build GCC for use with a
     windows style library and tool set and uses the Microsoft tools.
!    Copyright (C) 1995-1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA. */
*** 97,103 ****
     so take that from libgcc2.c */
  
  #define NEED_ATEXIT 1
- #define HAVE_ATEXIT 1     
  
  #undef EXTRA_SECTIONS
  #define EXTRA_SECTIONS in_ctor, in_dtor
--- 97,102 ----
Index: config/i860/fx2800.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i860/fx2800.h,v
retrieving revision 1.3
diff -c -p -r1.3 fx2800.h
*** config/i860/fx2800.h	1999/01/31 17:46:40	1.3
--- config/i860/fx2800.h	1999/08/03 06:30:52
*************** Boston, MA 02111-1307, USA.  */
*** 38,44 ****
  /* atexit is not present prior to Concentrix 2.2. Uncomment the following
     if you're on 2.1 or older. */
   
! /* #undef HAVE_ATEXIT */
  
  #define I860_STRICT_ABI_PROLOGUES
  
--- 38,44 ----
  /* atexit is not present prior to Concentrix 2.2. Uncomment the following
     if you're on 2.1 or older. */
   
! /* #define NEED_ATEXIT */
  
  #define I860_STRICT_ABI_PROLOGUES
  
Index: config/i860/paragon.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i860/paragon.h,v
retrieving revision 1.5
diff -c -p -r1.5 paragon.h
*** config/i860/paragon.h	1999/08/02 23:19:33	1.5
--- config/i860/paragon.h	1999/08/03 06:30:52
***************
*** 1,5 ****
  /* Target definitions for GNU compiler for Intel 80860 running OSF/1AD
!    Copyright (C) 1991, 1996 Free Software Foundation, Inc.
     Based upon original work of Ron Guilmette (rfg@monkeys.com).
     Contributed by Andy Pfiffer (andyp@ssd.intel.com).
     Partially inspired by
--- 1,5 ----
  /* Target definitions for GNU compiler for Intel 80860 running OSF/1AD
!    Copyright (C) 1991, 1996, 1999 Free Software Foundation, Inc.
     Based upon original work of Ron Guilmette (rfg@monkeys.com).
     Contributed by Andy Pfiffer (andyp@ssd.intel.com).
     Partially inspired by
*************** You should have received a copy of the G
*** 22,30 ****
  along with GNU CC; see the file COPYING.  If not, write to
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
- 
- /* For the sake of libgcc2.c, indicate target supports atexit.  */
- #define HAVE_ATEXIT
  
  #undef TARGET_SWITCHES
  #define TARGET_SWITCHES  \
--- 22,27 ----
Index: config/m68k/3b1.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m68k/3b1.h,v
retrieving revision 1.3
diff -c -p -r1.3 3b1.h
*** config/m68k/3b1.h	1998/12/16 21:06:07	1.3
--- config/m68k/3b1.h	1999/08/03 06:30:52
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler.
     AT&T UNIX PC version (pc7300, 3b1)
!    Copyright (C) 1987, 1993, 1996 Free Software Foundation, Inc.
     Contributed by Alex Crain (alex@umbc3.umd.edu).
  
  This file is part of GNU CC.
--- 1,6 ----
  /* Definitions of target machine for GNU compiler.
     AT&T UNIX PC version (pc7300, 3b1)
!    Copyright (C) 1987, 1993, 1996, 1999 Free Software Foundation, Inc.
     Contributed by Alex Crain (alex@umbc3.umd.edu).
  
  This file is part of GNU CC.
*************** output_file_directive ((FILE), main_inpu
*** 99,105 ****
  
  /* The 3b1 does not have `atexit'.  */
  
! #undef HAVE_ATEXIT
  
  /* Override parts of m68k.h to fit the SGS-3b1 assembler.  */
  
--- 99,105 ----
  
  /* The 3b1 does not have `atexit'.  */
  
! #define NEED_ATEXIT
  
  /* Override parts of m68k.h to fit the SGS-3b1 assembler.  */
  
Index: config/m68k/a-ux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m68k/a-ux.h,v
retrieving revision 1.2
diff -c -p -r1.2 a-ux.h
*** config/m68k/a-ux.h	1998/12/16 21:06:09	1.2
--- config/m68k/a-ux.h	1999/08/03 06:30:52
***************
*** 1,5 ****
  /* Definitions for Motorola 680x0 running A/UX
!    Copyright (C) 1996, 1998 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions for Motorola 680x0 running A/UX
!    Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** crt2.o%s "
*** 67,73 ****
  #define NO_SYS_SIGLIST
  
  /* We provide atexit(), A/UX does not have it */
! #define HAVE_ATEXIT
  
  /* Generate calls to memcpy, memcmp and memset, as opposed to bcopy, bcmp,
     and bzero */
--- 67,73 ----
  #define NO_SYS_SIGLIST
  
  /* We provide atexit(), A/UX does not have it */
! #define NEED_ATEXIT
  
  /* Generate calls to memcpy, memcmp and memset, as opposed to bcopy, bcmp,
     and bzero */
Index: config/m68k/apollo68.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m68k/apollo68.h,v
retrieving revision 1.2
diff -c -p -r1.2 apollo68.h
*** config/m68k/apollo68.h	1998/12/16 21:06:12	1.2
--- config/m68k/apollo68.h	1999/08/03 06:30:52
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler.  Apollo 680X0 version.
!    Copyright (C) 1989, 1992, 1996, 1997 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler.  Apollo 680X0 version.
!    Copyright (C) 1989, 1992, 1996, 1997, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 116,127 ****
  #undef DBX_DEBUGGING_INFO
  #undef SDB_DEBUGGING_INFO
  
! /* We have atexit(2).  So C++ can use it for global destructors.  */
! 
! #if 0 /* troy@cbme.unsw.edu.au says people are still using sr10.2
! 	 and it does not support atexit.  */
! #define HAVE_ATEXIT
! #endif
  
  /* Every structure or union's size must be a multiple of 2 bytes.  */
  
--- 116,124 ----
  #undef DBX_DEBUGGING_INFO
  #undef SDB_DEBUGGING_INFO
  
! /* troy@cbme.unsw.edu.au says people are still using sr10.2
!    and it does not support atexit.  */
! #define NEED_ATEXIT
  
  /* Every structure or union's size must be a multiple of 2 bytes.  */
  
Index: config/m68k/dpx2.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m68k/dpx2.h,v
retrieving revision 1.3
diff -c -p -r1.3 dpx2.h
*** config/m68k/dpx2.h	1998/12/16 21:06:29	1.3
--- config/m68k/dpx2.h	1999/08/03 06:30:52
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler.  
     Bull DPX/2 200 and 300 systems (m68k, SysVr3).
!    Copyright (C) 1987, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
     Contributed by Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr).
  
  This file is part of GNU CC.
--- 1,6 ----
  /* Definitions of target machine for GNU compiler.  
     Bull DPX/2 200 and 300 systems (m68k, SysVr3).
!    Copyright (C) 1987, 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
     Contributed by Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr).
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 66,72 ****
  # define __HAVE_68881__ 1
  # define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ }"
  
- #define HAVE_ATEXIT
  #undef DO_GLOBAL_CTORS_BODY		/* don't use svr3.h version */
  #undef DO_GLOBAL_DTORS_BODY
  
--- 66,71 ----
Index: config/m68k/hp320.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m68k/hp320.h,v
retrieving revision 1.4
diff -c -p -r1.4 hp320.h
*** config/m68k/hp320.h	1999/06/17 15:09:40	1.4
--- config/m68k/hp320.h	1999/08/03 06:30:52
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler.  HP-UX 68000/68020 version.
!    Copyright (C) 1987, 88, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler.  HP-UX 68000/68020 version.
!    Copyright (C) 1987, 88, 93, 94, 95, 96, 1997, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 55,64 ****
  
  /* Be compatible with system stddef.h.  */
  #define SIZE_TYPE "unsigned int"
- 
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
  
  #include "m68k/m68k.h"
  
--- 55,60 ----
Index: config/m68k/mot3300.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m68k/mot3300.h,v
retrieving revision 1.8
diff -c -p -r1.8 mot3300.h
*** config/m68k/mot3300.h	1999/01/12 04:16:42	1.8
--- config/m68k/mot3300.h	1999/08/03 06:30:52
*************** do {(CUM).offset = 0;\
*** 800,806 ****
     so take that from libgcc2.c */
  
  #define NEED_ATEXIT 1
- #define HAVE_ATEXIT 1
  
  #define EXIT_BODY	\
    do								\
--- 800,805 ----
Index: config/m88k/sysv3.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/m88k/sysv3.h,v
retrieving revision 1.6
diff -c -p -r1.6 sysv3.h
*** config/m88k/sysv3.h	1999/01/12 04:16:45	1.6
--- config/m88k/sysv3.h	1999/08/03 06:30:52
*************** Boston, MA 02111-1307, USA.  */
*** 70,79 ****
  /* Although the .init section is used, it is not automatically invoked.  */
  #define INVOKE__main
  
- /* State that atexit exists so __do_global_ctors will register
-    __do_global_dtors.  */
- #define HAVE_ATEXIT
- 
  #define CTOR_LIST_BEGIN	    		\
    asm (INIT_SECTION_ASM_OP);		\
    asm ("\tsubu\t r31,r31,16");	/* (STACK_BOUNDARY / BITS_PER_UNIT) == 16 */ \
--- 70,75 ----
Index: config/mips/iris4.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/iris4.h,v
retrieving revision 1.2
diff -c -p -r1.2 iris4.h
*** config/mips/iris4.h	1998/12/16 21:09:05	1.2
--- config/mips/iris4.h	1999/08/03 06:30:52
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler.  Iris version 4.
!    Copyright (C) 1991, 1993 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler.  Iris version 4.
!    Copyright (C) 1991, 1993, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** You should have received a copy of the G
*** 17,26 ****
  along with GNU CC; see the file COPYING.  If not, write to
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
- 
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
  
  /* Profiling is supported via libprof1.a not -lc_p as in Irix 3.  */
  #undef STARTFILE_SPEC
--- 17,22 ----
Index: config/mips/linux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/linux.h,v
retrieving revision 1.3
diff -c -p -r1.3 linux.h
*** config/mips/linux.h	1999/04/14 10:46:45	1.3
--- config/mips/linux.h	1999/08/03 06:30:52
***************
*** 1,5 ****
  /* Definitions for MIPS running Linux-based GNU systems with ELF format.
!    Copyright (C) 1998 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions for MIPS running Linux-based GNU systems with ELF format.
!    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 20,27 ****
  
  /* Required to keep collect2.c happy */
  #undef OBJECT_FORMAT_COFF 
- 
- #define HAVE_ATEXIT
  
  /* If we don't set MASK_ABICALLS, we can't default to PIC. */
  #undef TARGET_DEFAULT
--- 20,25 ----
Index: config/mips/netbsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/netbsd.h,v
retrieving revision 1.2
diff -c -p -r1.2 netbsd.h
*** config/mips/netbsd.h	1998/12/16 21:09:19	1.2
--- config/mips/netbsd.h	1999/08/03 06:30:52
***************
*** 1,5 ****
  /* Definitions for DECstation running BSD as target machine for GNU compiler.
!    Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions for DECstation running BSD as target machine for GNU compiler.
!    Copyright (C) 1993, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 51,60 ****
  #define LINK_SPEC \
    "%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
     %{!nostartfiles:%{!r*:%{!e*:-e __start}}} -dc -dp %{static:-Bstatic} %{assert*}"
- 
- /* We have atexit(3).  */
- 
- #define HAVE_ATEXIT
  
  /* Implicit library calls should use memcpy, not bcopy, etc.  */
  
--- 51,56 ----
Index: config/mips/osfrose.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/osfrose.h,v
retrieving revision 1.3
diff -c -p -r1.3 osfrose.h
*** config/mips/osfrose.h	1999/03/16 08:04:00	1.3
--- config/mips/osfrose.h	1999/08/03 06:30:52
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler.
     DECstation (OSF/1 reference port with OSF/rose) version.
!    Copyright (C) 1991, 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,6 ----
  /* Definitions of target machine for GNU compiler.
     DECstation (OSF/1 reference port with OSF/rose) version.
!    Copyright (C) 1991, 1992, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 112,121 ****
  
  /* Default to -G 0 unless doing ecoff work.  */
  #define MIPS_DEFAULT_GVALUE ((TARGET_MIPS_AS) ? 8 : 0)
- 
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
  
  /* Generate calls to memcpy, etc., not bcopy, etc.  */
  #define TARGET_MEM_FUNCTIONS
--- 112,117 ----
Index: config/mips/sni-svr4.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/sni-svr4.h,v
retrieving revision 1.5
diff -c -p -r1.5 sni-svr4.h
*** config/mips/sni-svr4.h	1999/01/11 13:34:03	1.5
--- config/mips/sni-svr4.h	1999/08/03 06:30:53
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler.  SNI SINIX version.
!    Copyright (C) 1996, 1997 Free Software Foundation, Inc.
     Contributed by Marco Walther (Marco.Walther@mch.sni.de).
  
  This file is part of GNU CC.
--- 1,5 ----
  /* Definitions of target machine for GNU compiler.  SNI SINIX version.
!    Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
     Contributed by Marco Walther (Marco.Walther@mch.sni.de).
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 53,62 ****
  
  #define getpagesize()	sysconf(_SC_PAGE_SIZE)
  #endif /*  L_trampoline */
- 
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
  
  /* Generate calls to memcpy, etc., not bcopy, etc.  */
  #define TARGET_MEM_FUNCTIONS
--- 53,58 ----
Index: config/mips/svr4-4.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/svr4-4.h,v
retrieving revision 1.2
diff -c -p -r1.2 svr4-4.h
*** config/mips/svr4-4.h	1998/12/16 21:09:30	1.2
--- config/mips/svr4-4.h	1999/08/03 06:30:53
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler.
     MIPS RISC-OS System V.4 version.
!    Copyright (C) 1992, 1998 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,6 ----
  /* Definitions of target machine for GNU compiler.
     MIPS RISC-OS System V.4 version.
!    Copyright (C) 1992, 1998, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 52,61 ****
  
  #define getpagesize()	sysconf(_SC_PAGE_SIZE)
  #endif /*  L_trampoline */
- 
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
  
  /* Generate calls to memcpy, etc., not bcopy, etc.  */
  #define TARGET_MEM_FUNCTIONS
--- 52,57 ----
Index: config/mips/svr4-5.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/svr4-5.h,v
retrieving revision 1.2
diff -c -p -r1.2 svr4-5.h
*** config/mips/svr4-5.h	1998/12/16 21:09:31	1.2
--- config/mips/svr4-5.h	1999/08/03 06:30:53
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler.
     MIPS RISC-OS 5.0 System V.4 version.
!    Copyright (C) 1992 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,6 ----
  /* Definitions of target machine for GNU compiler.
     MIPS RISC-OS 5.0 System V.4 version.
!    Copyright (C) 1992, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 65,74 ****
  
  #define getpagesize()	sysconf(_SC_PAGE_SIZE)
  #endif /*  L_trampoline */
- 
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
  
  /* Generate calls to memcpy, etc., not bcopy, etc.  */
  #define TARGET_MEM_FUNCTIONS
--- 65,70 ----
Index: config/mips/ultrix.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/mips/ultrix.h,v
retrieving revision 1.2
diff -c -p -r1.2 ultrix.h
*** config/mips/ultrix.h	1998/12/16 21:09:48	1.2
--- config/mips/ultrix.h	1999/08/03 06:30:53
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler; DECstation (Ultrix) version.
!    Copyright (C) 1991, 1997, 1998 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler; DECstation (Ultrix) version.
!    Copyright (C) 1991, 1997, 1998, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 44,53 ****
  #ifndef MACHINE_TYPE
  #define MACHINE_TYPE "DECstation running ultrix"
  #endif
- 
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  Ultrix 4.x has this, 3.x probably does not.  */
- #define HAVE_ATEXIT
  
  /* Generate calls to memcpy, etc., not bcopy, etc.  */
  #define TARGET_MEM_FUNCTIONS
--- 44,49 ----
Index: config/ns32k/pc532-min.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/ns32k/pc532-min.h,v
retrieving revision 1.2
diff -c -p -r1.2 pc532-min.h
*** config/ns32k/pc532-min.h	1998/12/16 21:10:41	1.2
--- config/ns32k/pc532-min.h	1999/08/03 06:30:53
***************
*** 1,7 ****
  /* Definitions of target machine for GNU compiler.
     PC532 with National 32532, running Minix.
     Works with pc532 Minix 1.5hybrid.
!    Copyright (C) 1990 Free Software Foundation, Inc.
  
     Derived from SEQUENT NS32000, written originally
     by Bruce Culbertson <culberts@hplabs.hp.com>,
--- 1,7 ----
  /* Definitions of target machine for GNU compiler.
     PC532 with National 32532, running Minix.
     Works with pc532 Minix 1.5hybrid.
!    Copyright (C) 1990, 1999 Free Software Foundation, Inc.
  
     Derived from SEQUENT NS32000, written originally
     by Bruce Culbertson <culberts@hplabs.hp.com>,
*************** Boston, MA 02111-1307, USA.  */
*** 35,41 ****
     call-saved-regs in a function calling setjmp */
  
  #define NON_SAVING_SETJMP (current_function_calls_setjmp)
- 
- /* at least with estdio there's no _cleanup() but we have atexit() */
- 
- #define HAVE_ATEXIT
--- 35,37 ----
Index: config/pa/pa.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/pa/pa.h,v
retrieving revision 1.57
diff -c -p -r1.57 pa.h
*** config/pa/pa.h	1999/08/02 23:19:29	1.57
--- config/pa/pa.h	1999/08/03 06:30:53
*************** This file is part of GNU CC.
*** 8,14 ****
  
  GNU CC is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 1, or (at your option)
  any later version.
  
  GNU CC is distributed in the hope that it will be useful,
--- 8,14 ----
  
  GNU CC is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2, or (at your option)
  any later version.
  
  GNU CC is distributed in the hope that it will be useful,
*************** extern struct rtx_def *hppa_legitimize_a
*** 1665,1674 ****
  /* Define this to be nonzero if shift instructions ignore all but the low-order
     few bits. */
  #define SHIFT_COUNT_TRUNCATED 1
- 
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
  
  /* Compute the cost of computing a constant rtl expression RTX
     whose rtx-code is CODE.  The body of this macro is a portion
--- 1665,1670 ----
Index: config/rs6000/mach.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/rs6000/mach.h,v
retrieving revision 1.2
diff -c -p -r1.2 mach.h
*** config/rs6000/mach.h	1998/12/16 21:12:01	1.2
--- config/rs6000/mach.h	1999/08/03 06:30:53
***************
*** 1,6 ****
  /* Definitions of target machine for GNU compiler,
     for IBM RS/6000 running MACH.
!    Copyright (C) 1992 Free Software Foundation, Inc.
     Contributed by Richard Kenner (kenner@nyu.edu)
  
  This file is part of GNU CC.
--- 1,6 ----
  /* Definitions of target machine for GNU compiler,
     for IBM RS/6000 running MACH.
!    Copyright (C) 1992, 1999 Free Software Foundation, Inc.
     Contributed by Richard Kenner (kenner@nyu.edu)
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 35,41 ****
    -bnoso -berrmsg -btextro -bhalt:4 -bnodelcsect"
  
  /* MACH doesn't have atexit.  */
! #undef HAVE_ATEXIT
  
  /* Don't default to pcc-struct-return, because gcc is the only compiler, and
     we want to retain compatibility with older gcc versions.  */
--- 35,41 ----
    -bnoso -berrmsg -btextro -bhalt:4 -bnodelcsect"
  
  /* MACH doesn't have atexit.  */
! #define NEED_ATEXIT
  
  /* Don't default to pcc-struct-return, because gcc is the only compiler, and
     we want to retain compatibility with older gcc versions.  */
Index: config/rs6000/rs6000.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.57
diff -c -p -r1.57 rs6000.h
*** config/rs6000/rs6000.h	1999/08/02 20:40:56	1.57
--- config/rs6000/rs6000.h	1999/08/03 06:30:54
*************** do {                                    
*** 2266,2275 ****
  
  #define SHIFT_COUNT_TRUNCATED (TARGET_POWER ? 1 : 0)
  
- /* Use atexit for static constructors/destructors, instead of defining
-    our own exit function.  */
- #define HAVE_ATEXIT
- 
  /* Compute the cost of computing a constant rtl expression RTX
     whose rtx-code is CODE.  The body of this macro is a portion
     of a switch statement.  If the code is computed here,
--- 2266,2271 ----
Index: config/rs6000/xm-beos.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/rs6000/xm-beos.h,v
retrieving revision 1.3
diff -c -p -r1.3 xm-beos.h
*** config/rs6000/xm-beos.h	1999/05/06 20:04:33	1.3
--- config/rs6000/xm-beos.h	1999/08/03 06:30:54
***************
*** 1,5 ****
  /* Configuration for GNU C-compiler for BeOS host.
!    Copyright (C) 1997 Free Software Foundation, Inc.
     Contributed by Fred Fish (fnf@cygnus.com), based on xm-rs6000.h
     by Richard Kenner (kenner@vlsi1.ultra.nyu.edu).
  
--- 1,5 ----
  /* Configuration for GNU C-compiler for BeOS host.
!    Copyright (C) 1997, 1999 Free Software Foundation, Inc.
     Contributed by Fred Fish (fnf@cygnus.com), based on xm-rs6000.h
     by Richard Kenner (kenner@vlsi1.ultra.nyu.edu).
  
*************** extern void *alloca ();
*** 77,85 ****
  #endif
  #ifndef HAVE_PUTENV
  #define HAVE_PUTENV
- #endif
- #ifndef HAVE_ATEXIT
- #define HAVE_ATEXIT
  #endif
  #ifndef HAVE_RENAME
  #define HAVE_RENAME
--- 77,82 ----
Index: config/sh/sh.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/sh/sh.h,v
retrieving revision 1.37
diff -c -p -r1.37 sh.h
*** config/sh/sh.h	1999/07/26 01:21:58	1.37
--- config/sh/sh.h	1999/08/03 06:30:54
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler for Hitachi Super-H.
!    Copyright (C) 1993-1998 Free Software Foundation, Inc.
     Contributed by Steve Chamberlain (sac@cygnus.com).
     Improved by Jim Wilson (wilson@cygnus.com).
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler for Hitachi Super-H.
!    Copyright (C) 1993-1999 Free Software Foundation, Inc.
     Contributed by Steve Chamberlain (sac@cygnus.com).
     Improved by Jim Wilson (wilson@cygnus.com).
  
*************** do {									\
*** 2240,2248 ****
  	   && GET_MODE (SET_SRC (PATTERN (dep_insn))) == SImode)	\
      cost = 20;								\
  } while (0)								\
- 
- /* For the sake of libgcc2.c, indicate target supports atexit.  */
- #define HAVE_ATEXIT
  
  #define SH_DYNAMIC_SHIFT_COST \
    (TARGET_HARD_SH4 ? 1 : TARGET_SH3 ? (TARGET_SMALLCODE ? 1 : 2) : 20)
--- 2240,2245 ----
Index: config/sparc/linux-aout.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/sparc/linux-aout.h,v
retrieving revision 1.8
diff -c -p -r1.8 linux-aout.h
*** config/sparc/linux-aout.h	1999/08/02 23:06:52	1.8
--- config/sparc/linux-aout.h	1999/08/03 06:30:54
***************
*** 1,5 ****
  /* Definitions for SPARC running Linux-based GNU systems with a.out.
!    Copyright (C) 1996, 1997 Free Software Foundation, Inc.
     Contributed by Eddie C. Dost (ecd@skynet.be)
  
  This file is part of GNU CC.
--- 1,5 ----
  /* Definitions for SPARC running Linux-based GNU systems with a.out.
!    Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
     Contributed by Eddie C. Dost (ecd@skynet.be)
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 24,32 ****
  
  /* Don't assume anything about the header files. */
  #define NO_IMPLICIT_EXTERN_C
- 
- #undef HAVE_ATEXIT
- #define HAVE_ATEXIT
  
  /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is.
     For now, we play safe. It may change later. */
--- 24,29 ----
Index: config/sparc/linux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/sparc/linux.h,v
retrieving revision 1.11
diff -c -p -r1.11 linux.h
*** config/sparc/linux.h	1999/08/02 23:06:52	1.11
--- config/sparc/linux.h	1999/08/03 06:30:54
***************
*** 1,5 ****
  /* Definitions for SPARC running Linux-based GNU systems with ELF.
!    Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
     Contributed by Eddie C. Dost (ecd@skynet.be)
  
  This file is part of GNU CC.
--- 1,5 ----
  /* Definitions for SPARC running Linux-based GNU systems with ELF.
!    Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
     Contributed by Eddie C. Dost (ecd@skynet.be)
  
  This file is part of GNU CC.
*************** Boston, MA 02111-1307, USA.  */
*** 23,31 ****
  
  /* Don't assume anything about the header files. */
  #define NO_IMPLICIT_EXTERN_C
- 
- #undef HAVE_ATEXIT
- #define HAVE_ATEXIT
  
  /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is.
     For now, we play safe. It may change later. */
--- 23,28 ----
Index: config/sparc/linux64.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/sparc/linux64.h,v
retrieving revision 1.17
diff -c -p -r1.17 linux64.h
*** config/sparc/linux64.h	1999/08/02 23:06:52	1.17
--- config/sparc/linux64.h	1999/08/03 06:30:54
*************** Boston, MA 02111-1307, USA.  */
*** 26,34 ****
  /* Don't assume anything about the header files. */
  #define NO_IMPLICIT_EXTERN_C
  
- #undef HAVE_ATEXIT
- #define HAVE_ATEXIT
- 
  #include <sparc/sysv4.h>
  
  #undef MD_EXEC_PREFIX
--- 26,31 ----
Index: config/sparc/sunos4.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/sparc/sunos4.h,v
retrieving revision 1.4
diff -c -p -r1.4 sunos4.h
*** config/sparc/sunos4.h	1998/12/16 21:13:39	1.4
--- config/sparc/sunos4.h	1999/08/03 06:30:54
***************
*** 1,5 ****
  /* Definitions of target machine for GNU compiler, for SunOS 4.x
!    Copyright (C) 1994 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Definitions of target machine for GNU compiler, for SunOS 4.x
!    Copyright (C) 1994, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** Boston, MA 02111-1307, USA.  */
*** 47,49 ****
--- 47,54 ----
  	       "ta	0x21\n\t"			\
  	       : /* no outputs */			\
  	       : "r" (ms_flags), "r" (ms_saveret));
+ 
+ /* SunOS has on_exit instead of atexit.  */
+ extern int on_exit (void *, void *);	/* The man page says it returns int. */
+ #define ON_EXIT(FUNC) on_exit ((FUNC), 0)
+ #define NEED_ATEXIT
Index: config/vax/ultrix.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/vax/ultrix.h,v
retrieving revision 1.2
diff -c -p -r1.2 ultrix.h
*** config/vax/ultrix.h	1998/12/16 21:14:23	1.2
--- config/vax/ultrix.h	1999/08/03 06:30:54
***************
*** 1,3 ****
--- 1,23 ----
+ /* Output variables, constants and external declarations, for GNU compiler.
+    Copyright (C) 1999 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
  #undef CPP_PREDEFINES
  #define CPP_PREDEFINES " -Dvax -Dunix -Dultrix -Dbsd4_2 -D__vax -D__unix -D__ultrix -D__bsd4_2 -Asystem(unix) -Asystem(bsd) -Acpu(vax) -Amachine(vax)"
  
***************
*** 7,12 ****
  #define PTRDIFF_TYPE "int"
  #define WCHAR_TYPE "unsigned int"
  #define WCHAR_TYPE_SIZE 32
- 
- /* True for Ultrix 4.3 and later and possibly earlier.  */
- #define HAVE_ATEXIT
--- 27,29 ----
Index: config/vax/vms.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/vax/vms.h,v
retrieving revision 1.4
diff -c -p -r1.4 vms.h
*** config/vax/vms.h	1998/12/16 21:14:29	1.4
--- config/vax/vms.h	1999/08/03 06:30:55
***************
*** 1,5 ****
  /* Output variables, constants and external declarations, for GNU compiler.
!    Copyright (C) 1988, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Output variables, constants and external declarations, for GNU compiler.
!    Copyright (C) 1988, 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** const_section ()					\
*** 298,306 ****
    assemble_name ((FILE), (NAME));					\
    fputc ('\n', (FILE));							\
  }
- 
- /* True for VMS V4.6 and later.  */
- #define HAVE_ATEXIT
  
  /* The following definitions are used in libgcc2.c with the __main
     function.  The _SHR symbol is used when the sharable image library
--- 298,303 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]