diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-07-17 14:37:13 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-07-17 14:37:13 -0400 |
commit | 98ee239e630b88167b491342d41c717dfaedf86c (patch) | |
tree | d4f1553933030811ae75fee355c5c1e9ff5f0101 | |
parent | fb695d4a371d266b283f0d1657520ad034c00ddc (diff) | |
download | gcc-98ee239e630b88167b491342d41c717dfaedf86c.zip gcc-98ee239e630b88167b491342d41c717dfaedf86c.tar.gz gcc-98ee239e630b88167b491342d41c717dfaedf86c.tar.bz2 |
(HAVE_ATEXIT): Define.
From-SVN: r10143
-rw-r--r-- | gcc/config/vax/vms.h | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/gcc/config/vax/vms.h b/gcc/config/vax/vms.h index f5c2ba8..99b5efe 100644 --- a/gcc/config/vax/vms.h +++ b/gcc/config/vax/vms.h @@ -1,5 +1,5 @@ /* Output variables, constants and external declarations, for GNU compiler. - Copyright (C) 1988, 1994 Free Software Foundation, Inc. + Copyright (C) 1988, 1994, 1995 Free Software Foundation, Inc. This file is part of GNU CC. @@ -317,6 +317,9 @@ 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 libg++ is used - this is picked up automatically by the linker @@ -335,25 +338,22 @@ const_section () \ #define DO_GLOBAL_CTORS_BODY \ do { \ func_ptr *p; \ - extern func_ptr __CTOR_LIST__[1]; \ - extern func_ptr __CTOR_LIST_END__[1]; \ - extern func_ptr __CTOR_LIST_SHR__[1]; \ - extern func_ptr __CTOR_LIST_SHR_END__[1]; \ - if( &__CTOR_LIST_SHR__[0] != &__CTOR_LIST__[1]) \ - for (p = __CTOR_LIST_SHR__ + 1; p < __CTOR_LIST_SHR_END__ ; p++ ) \ - if (*p) (*p) (); \ + extern func_ptr __CTOR_LIST__[1], __CTOR_LIST_END__[1]; \ + extern func_ptr __CTOR_LIST_SHR__[1], __CTOR_LIST_SHR_END__[1]; \ + if (&__CTOR_LIST_SHR__[0] != &__CTOR_LIST__[1]) \ + for (p = __CTOR_LIST_SHR__ + 1; p < __CTOR_LIST_SHR_END__ ; p++ ) \ + if (*p) (*p) (); \ for (p = __CTOR_LIST__ + 1; p < __CTOR_LIST_END__ ; p++ ) \ if (*p) (*p) (); \ - atexit (__do_global_dtors); \ - { \ + do { /* arrange for `return' from main() to pass through exit() */ \ __label__ foo; \ int *callers_caller_fp = (int *) __builtin_frame_address (3); \ register int retval asm ("r0"); \ callers_caller_fp[4] = (int) && foo; \ - return; \ + break; /* out of do-while block */ \ foo: \ exit (retval); \ - } \ + } while (0); \ } while (0) #define __DTOR_LIST__ __gxx_clean_0 @@ -365,15 +365,13 @@ do { \ #define DO_GLOBAL_DTORS_BODY \ do { \ func_ptr *p; \ - extern func_ptr __DTOR_LIST__[1]; \ - extern func_ptr __DTOR_LIST_END__[1]; \ - extern func_ptr __DTOR_LIST_SHR__[1]; \ - extern func_ptr __DTOR_LIST_SHR_END__[1]; \ + extern func_ptr __DTOR_LIST__[1], __DTOR_LIST_END__[1]; \ + extern func_ptr __DTOR_LIST_SHR__[1], __DTOR_LIST_SHR_END__[1]; \ for (p = __DTOR_LIST__ + 1; p < __DTOR_LIST_END__ ; p++ ) \ if (*p) (*p) (); \ - if( &__DTOR_LIST_SHR__[0] != &__DTOR_LIST__[1]) \ - for (p = __DTOR_LIST_SHR__ + 1; p < __DTOR_LIST_SHR_END__ ; p++ ) \ - if (*p) (*p) (); \ + if (&__DTOR_LIST_SHR__[0] != &__DTOR_LIST__[1]) \ + for (p = __DTOR_LIST_SHR__ + 1; p < __DTOR_LIST_SHR_END__ ; p++ ) \ + if (*p) (*p) (); \ } while (0) #endif /* L__main */ |