gbl-ctors.h: Lose HAVE_ATEXIT.

* 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.

From-SVN: r29439
This commit is contained in:
Jason Merrill 1999-09-15 21:41:16 +00:00 committed by Jason Merrill
parent 19832c7774
commit c063dc9813
75 changed files with 122 additions and 355 deletions

View file

@ -1,3 +1,13 @@
Wed Sep 15 14:39:35 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.
Wed Sep 15 10:25:12 1999 Mark Mitchell <mark@codesourcery.com>
* calls.c (precompute_arguments): Fix typo in comment.

View file

@ -1752,10 +1752,6 @@ do { \
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)

View file

@ -1609,12 +1609,6 @@ extern void arc_set_default_type_attributes ();
#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

View file

@ -1,6 +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.
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.
@ -208,14 +208,6 @@ dtors_section () \
#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"
#define SYMBOL__MAIN __gccmain

View file

@ -25,9 +25,6 @@ Boston, MA 02111-1307, USA. */
/* Do not assume anything about header files. */
#define NO_IMPLICIT_EXTERN_C
/* We have libgcc2. */
#define HAVE_ATEXIT
#ifndef SUBTARGET_DEFAULT_APCS26
/* Default is to use APCS-32 mode. */
# define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_SHORT_BYTE)

View file

@ -19,9 +19,6 @@ along with this program; see the file COPYING. If not, write to
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}"

View file

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. ARM RISCiX version.
Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
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).
@ -95,12 +95,6 @@ Boston, MA 02111-1307, USA. */
/* 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
give the same symbol without quotes for an alternative entry point. You

View file

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. ARM RISCiX 1.1x version.
Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
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).
@ -62,12 +62,15 @@ Boston, MA 02111-1307, USA. */
#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
/* 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. */
/*#define HAVE_ATEXIT 1 */
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

View file

@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for Thumb with COFF obj format.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
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.
@ -183,10 +183,6 @@ do { \
#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

View file

@ -299,10 +299,6 @@ dtors_section () \
} \
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"
#define SYMBOL__MAIN __gccmain

View file

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for ARM/Thumb.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
The basis of this contribution was generated by
Richard Earnshaw, Advanced RISC Machines Ltd
@ -1277,8 +1277,6 @@ extern int making_const_table;
#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: */
#define MACHINE_DEPENDENT_REORG(INSN) thumb_reorg ((INSN))

View file

@ -214,10 +214,6 @@ do { \
#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

View file

@ -1,5 +1,5 @@
/* Definitions for non-Linux based ARM systems using ELF
Copyright (C) 1998 Free Software Foundation, Inc.
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Contributed by Catherine Moore <clm@cygnus.com>
This file is part of GNU CC.
@ -24,14 +24,6 @@ Boston, MA 02111-1307, USA. */
#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
#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32)

View file

@ -8,7 +8,7 @@
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)
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,
@ -1894,9 +1894,6 @@ do { \
(*--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

View file

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Clipper/Clix version.
Copyright (C) 1988, 1993, 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1988, 1993, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -33,9 +33,6 @@ Boston, MA 02111-1307, USA. */
#define TARGET_MEM_FUNCTIONS
#undef HAVE_ATEXIT
#define HAVE_ATEXIT
#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
do { \
unsigned char *s; \

View file

@ -20,9 +20,6 @@ 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 ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s"

View file

@ -12,10 +12,6 @@
#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

View file

@ -28,10 +28,6 @@
#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) \

View file

@ -127,8 +127,6 @@ Boston, MA 02111-1307, USA. */
#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

View file

@ -167,10 +167,6 @@ dtor_section () \
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
/* 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

View file

@ -57,8 +57,6 @@ Boston, MA 02111-1307, USA. */
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
#define HAVE_ATEXIT
/* Override the default comment-starter of "/". */
#undef ASM_COMMENT_START

View file

@ -57,9 +57,6 @@ Boston, MA 02111-1307, USA. */
#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 " \

View file

@ -1,5 +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.
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.

View file

@ -850,10 +850,6 @@ while (0)
#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 */

View file

@ -71,10 +71,6 @@ Boston, MA 02111-1307, USA. */
"%{!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"

View file

@ -940,7 +940,6 @@ compiler at the end of the day. Onward we go ...
#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
@ -952,7 +951,6 @@ compiler at the end of the day. Onward we go ...
# 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

View file

@ -66,10 +66,6 @@ Boston, MA 02111-1307, USA. */
"%{!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. */

View file

@ -40,3 +40,6 @@
/* 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

View file

@ -4,5 +4,4 @@
/* Use atexit for static destructors, instead of defining
our own exit function. */
#define HAVE_ATEXIT
#undef NEED_ATEXIT

View file

@ -41,7 +41,6 @@ Boston, MA 02111-1307, USA. */
#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

View file

@ -2,7 +2,7 @@
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.
Copyright (C) 1995-1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -97,7 +97,6 @@ Boston, MA 02111-1307, USA. */
so take that from libgcc2.c */
#define NEED_ATEXIT 1
#define HAVE_ATEXIT 1
#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_ctor, in_dtor

View file

@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */
/* atexit is not present prior to Concentrix 2.2. Uncomment the following
if you're on 2.1 or older. */
/* #undef HAVE_ATEXIT */
/* #define NEED_ATEXIT */
#define I860_STRICT_ABI_PROLOGUES

View file

@ -1,5 +1,5 @@
/* Target definitions for GNU compiler for Intel 80860 running OSF/1AD
Copyright (C) 1991, 1996 Free Software Foundation, Inc.
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
@ -23,9 +23,6 @@ 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 \
{ {"xp", 1, "Generate code which uses the FPU"}, \

View file

@ -102,6 +102,3 @@ for windows/multi thread */
#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

View file

@ -1,5 +1,5 @@
/* Definitions for Linux-based GNU systems.
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
Copyright (C) 1995, 1997, 1999 Free Software Foundation, Inc.
Contributed by H.J. Lu (hjl@nynexst.com)
This file is part of GNU CC.
@ -22,9 +22,6 @@ Boston, MA 02111-1307, USA. */
/* 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. */

View file

@ -23,9 +23,6 @@ Boston, MA 02111-1307, USA. */
/* 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. */

View file

@ -1,5 +1,5 @@
/* Target independent definitions for LynxOS, using Lynx's old as and ld.
Copyright (C) 1993 Free Software Foundation, Inc.
Copyright (C) 1993, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -98,10 +98,6 @@ Boston, MA 02111-1307, USA. */
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. */

View file

@ -1,5 +1,5 @@
/* Target independent definitions for LynxOS.
Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -122,11 +122,6 @@ do { \
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. */

View file

@ -1,6 +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.
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.
@ -99,7 +99,7 @@ output_file_directive ((FILE), main_input_filename)
/* The 3b1 does not have `atexit'. */
#undef HAVE_ATEXIT
#define NEED_ATEXIT
/* Override parts of m68k.h to fit the SGS-3b1 assembler. */

View file

@ -67,7 +67,7 @@ crt2.o%s "
#define NO_SYS_SIGLIST
/* We provide atexit(), A/UX does not have it */
#define HAVE_ATEXIT
#define NEED_ATEXIT
/* Generate calls to memcpy, memcmp and memset, as opposed to bcopy, bcmp,
and bzero */

View file

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Apollo 680X0 version.
Copyright (C) 1989, 1992, 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1989, 1992, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -116,12 +116,9 @@ Boston, MA 02111-1307, USA. */
#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
/* 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. */

View file

@ -1,6 +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.
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.
@ -66,7 +66,6 @@ Boston, MA 02111-1307, USA. */
# 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

View file

@ -1,5 +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.
Copyright (C) 1987, 88, 93, 94, 95, 96, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -56,10 +56,6 @@ Boston, MA 02111-1307, USA. */
/* 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"
/* See m68k.h. 7 means 68020 with 68881. */

View file

@ -800,7 +800,6 @@ do {(CUM).offset = 0;\
so take that from libgcc2.c */
#define NEED_ATEXIT 1
#define HAVE_ATEXIT 1
#define EXIT_BODY \
do \

View file

@ -70,10 +70,6 @@ Boston, MA 02111-1307, USA. */
/* 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 */ \

View file

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Iris version 4.
Copyright (C) 1991, 1993 Free Software Foundation, Inc.
Copyright (C) 1991, 1993, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -18,10 +18,6 @@ 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
#define STARTFILE_SPEC \

View file

@ -1,5 +1,5 @@
/* Definitions for MIPS running Linux-based GNU systems with ELF format.
Copyright (C) 1998 Free Software Foundation, Inc.
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -21,8 +21,6 @@ Boston, MA 02111-1307, USA. */
/* 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
#define TARGET_DEFAULT (MASK_ABICALLS|MASK_GAS)

View file

@ -1,5 +1,5 @@
/* Definitions for DECstation running BSD as target machine for GNU compiler.
Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1993, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -52,10 +52,6 @@ Boston, MA 02111-1307, USA. */
"%{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. */
#define TARGET_MEM_FUNCTIONS

View file

@ -1,6 +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.
Copyright (C) 1991, 1992, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -113,10 +113,6 @@ Boston, MA 02111-1307, USA. */
/* 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

View file

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. SNI SINIX version.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
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.
@ -54,10 +54,6 @@ Boston, MA 02111-1307, USA. */
#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

View file

@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler.
MIPS RISC-OS System V.4 version.
Copyright (C) 1992, 1998 Free Software Foundation, Inc.
Copyright (C) 1992, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -53,9 +53,5 @@ Boston, MA 02111-1307, USA. */
#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

View file

@ -1,6 +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.
Copyright (C) 1992, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -66,10 +66,6 @@ Boston, MA 02111-1307, USA. */
#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

View file

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler; DECstation (Ultrix) version.
Copyright (C) 1991, 1997, 1998 Free Software Foundation, Inc.
Copyright (C) 1991, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -45,10 +45,6 @@ Boston, MA 02111-1307, USA. */
#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

View file

@ -66,10 +66,6 @@
(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

View file

@ -1,6 +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.
Copyright (C) 1989, 90-93, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -81,10 +81,6 @@ Boston, MA 02111-1307, USA. */
#define NEXT_OBJC_RUNTIME
/* We have atexit. */
#define HAVE_ATEXIT
/* Enable recent gcc to compile under the old gcc in Next release 1.0. */
#define __inline inline

View file

@ -1,7 +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.
Copyright (C) 1990, 1999 Free Software Foundation, Inc.
Derived from SEQUENT NS32000, written originally
by Bruce Culbertson <culberts@hplabs.hp.com>,
@ -35,7 +35,3 @@ Boston, MA 02111-1307, USA. */
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

View file

@ -139,9 +139,6 @@ Boston, MA 02111-1307, USA. */
/* 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

View file

@ -8,7 +8,7 @@ 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 1, or (at your option)
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,
@ -1736,10 +1736,6 @@ while (0)
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
of a switch statement. If the code is computed here,

View file

@ -1,7 +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.
Copyright (C) 1996, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -175,9 +175,3 @@ dtors_section () \
/* For pSOS we use DBX debugging info. */
#define DBX_DEBUGGING_INFO
/* Prevent generation of an exit function. */
#define HAVE_ATEXIT

View file

@ -27,9 +27,6 @@ Boston, MA 02111-1307, USA.
/* 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

View file

@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
for IBM RS/6000 running MACH.
Copyright (C) 1992 Free Software Foundation, Inc.
Copyright (C) 1992, 1999 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@nyu.edu)
This file is part of GNU CC.
@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */
-bnoso -berrmsg -btextro -bhalt:4 -bnodelcsect"
/* MACH doesn't have atexit. */
#undef 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. */

View file

@ -2269,10 +2269,6 @@ do { \
#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,

View file

@ -1,5 +1,5 @@
/* Configuration for GNU C-compiler for BeOS host.
Copyright (C) 1997 Free Software Foundation, Inc.
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).
@ -78,9 +78,6 @@ extern void *alloca ();
#ifndef HAVE_PUTENV
#define HAVE_PUTENV
#endif
#ifndef HAVE_ATEXIT
#define HAVE_ATEXIT
#endif
#ifndef HAVE_RENAME
#define HAVE_RENAME
#endif

View file

@ -2251,8 +2251,5 @@ do { \
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)

View file

@ -1,5 +1,5 @@
/* Definitions for SPARC running Linux-based GNU systems with a.out.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
Contributed by Eddie C. Dost (ecd@skynet.be)
This file is part of GNU CC.
@ -25,9 +25,6 @@ Boston, MA 02111-1307, USA. */
/* 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. */

View file

@ -1,5 +1,5 @@
/* Definitions for SPARC running Linux-based GNU systems with ELF.
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
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.
@ -24,9 +24,6 @@ Boston, MA 02111-1307, USA. */
/* 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. */

View file

@ -26,9 +26,6 @@ Boston, MA 02111-1307, USA. */
/* 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

View file

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for SunOS 4.x
Copyright (C) 1994 Free Software Foundation, Inc.
Copyright (C) 1994, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -47,3 +47,8 @@ Boston, MA 02111-1307, USA. */
"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

View file

@ -42,9 +42,6 @@ Boston, MA 02111-1307, USA.
/* 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

View file

@ -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,6 +27,3 @@
#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

View file

@ -1,5 +1,5 @@
/* Output variables, constants and external declarations, for GNU compiler.
Copyright (C) 1988, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1988, 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -298,9 +298,6 @@ const_section () \
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
for the C++ library is used - this is picked up automatically by the linker

View file

@ -1,5 +1,5 @@
/* Configuration for GCC for Intel i386 running Linux-based GNU systems.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
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.
@ -19,9 +19,6 @@ 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

View file

@ -2,7 +2,7 @@
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.
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.
@ -31,22 +31,8 @@ Boston, MA 02111-1307, USA. */
*/
#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. */

View file

@ -53,10 +53,6 @@ Boston, MA 02111-1307, USA. */
#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. */
@ -1709,11 +1705,9 @@ __bb_init_func (struct bb *blocks)
if (blocks->zero_word)
return;
#ifdef ON_EXIT
/* Initialize destructor. */
if (!bb_head)
ON_EXIT (__bb_exit_func, 0);
#endif
atexit (__bb_exit_func);
/* Set up linked list. */
blocks->zero_word = 1;
@ -2084,10 +2078,8 @@ __bb_init_prg ()
enum bb_func_mode m;
int i;
#ifdef ON_EXIT
/* Initialize destructor. */
ON_EXIT (__bb_exit_func, 0);
#endif
atexit (__bb_exit_func);
if (!(file = fopen ("bb.in", "r")))
return;
@ -2176,11 +2168,8 @@ __bb_init_prg ()
bb_stack = (unsigned long *) malloc (bb_stacksize * sizeof (*bb_stack));
}
#ifdef ON_EXIT
/* Initialize destructor. */
ON_EXIT (__bb_exit_trace_func, 0);
#endif
/* Initialize destructor. */
atexit (__bb_exit_trace_func);
}
/* Called upon entering a basic block. */
@ -2869,17 +2858,6 @@ __do_global_dtors ()
#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 ()
{
@ -2890,7 +2868,7 @@ __do_global_ctors ()
}
#endif
DO_GLOBAL_CTORS_BODY;
ON_EXIT (__do_global_dtors, 0);
atexit (__do_global_dtors, 0);
}
#endif /* no HAS_INIT_SECTION */
@ -2952,22 +2930,17 @@ func_ptr __DTOR_LIST__[2];
#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
#ifndef HAVE_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)
int
atexit (func_ptr func)
{
if (++last_atexit_chain_slot == atexit_chain_length)
{
@ -2989,22 +2962,13 @@ int atexit (func_ptr func)
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; )
@ -3015,19 +2979,6 @@ exit (int status)
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
@ -3036,17 +2987,17 @@ exit (int status)
_exit (status);
}
#else /* ON_EXIT defined */
int _exit_dummy_decl = 0; /* prevent compiler & linker warnings */
#else /* HAVE_ON_EXIT */
# ifndef HAVE_ATEXIT
/* Provide a fake for atexit() using ON_EXIT. */
int atexit (func_ptr func)
/* Simple; we just need a wrapper for ON_EXIT. */
int
atexit (func_ptr func)
{
return ON_EXIT (func, NULL);
return ON_EXIT (func);
}
# endif /* HAVE_ATEXIT */
#endif /* ON_EXIT defined */
#endif /* HAVE_ON_EXIT */
#endif /* NEED_ATEXIT */
#endif /* L_exit */

View file

@ -7660,12 +7660,21 @@ The definition should be a C statement (sans semicolon) to generate the
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 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