diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-01-18 06:20:20 +0300 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-01-20 03:59:16 +0300 |
commit | 437c5c5085ff30b4a4960b2b53d06728c788361d (patch) | |
tree | e3ed5ad7825b649ce74c03622b6b832c484b908d /newlib/libc/misc | |
parent | 6783cceb0acdf163f8f8843f63c17e08c07b88e9 (diff) |
newlib: internalize HAVE_INITFINI_ARRAY
This define is only used by newlib internally, so stop exporting it
as HAVE_INITFINI_ARRAY since this can conflict with defines packages
use themselves.
We don't really need to add _ to HAVE_INIT_FINI too since it isn't
exported in newlib.h, but might as well be consistent here.
We can't (easily) add this to newlib_cflags like HAVE_INIT_FINI is
because this is based on a compile-time test in the top configure,
not on plain shell code in configure.host. We'd have to replicate
the test in every subdir in order to have it passed down.
Diffstat (limited to 'newlib/libc/misc')
-rw-r--r-- | newlib/libc/misc/fini.c | 6 | ||||
-rw-r--r-- | newlib/libc/misc/init.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/newlib/libc/misc/fini.c b/newlib/libc/misc/fini.c index 56eed6cb3..5f2016070 100644 --- a/newlib/libc/misc/fini.c +++ b/newlib/libc/misc/fini.c @@ -13,11 +13,11 @@ /* Handle ELF .{pre_init,init,fini}_array sections. */ #include <sys/types.h> -#ifdef HAVE_INITFINI_ARRAY +#ifdef _HAVE_INITFINI_ARRAY extern void (*__fini_array_start []) (void) __attribute__((weak)); extern void (*__fini_array_end []) (void) __attribute__((weak)); -#ifdef HAVE_INIT_FINI +#ifdef _HAVE_INIT_FINI extern void _fini (void); #endif @@ -32,7 +32,7 @@ __libc_fini_array (void) for (i = count; i > 0; i--) __fini_array_start[i-1] (); -#ifdef HAVE_INIT_FINI +#ifdef _HAVE_INIT_FINI _fini (); #endif } diff --git a/newlib/libc/misc/init.c b/newlib/libc/misc/init.c index 95f1a7422..3aef7ad06 100644 --- a/newlib/libc/misc/init.c +++ b/newlib/libc/misc/init.c @@ -13,7 +13,7 @@ /* Handle ELF .{pre_init,init,fini}_array sections. */ #include <sys/types.h> -#ifdef HAVE_INITFINI_ARRAY +#ifdef _HAVE_INITFINI_ARRAY /* These magic symbols are provided by the linker. */ extern void (*__preinit_array_start []) (void) __attribute__((weak)); @@ -21,7 +21,7 @@ extern void (*__preinit_array_end []) (void) __attribute__((weak)); extern void (*__init_array_start []) (void) __attribute__((weak)); extern void (*__init_array_end []) (void) __attribute__((weak)); -#ifdef HAVE_INIT_FINI +#ifdef _HAVE_INIT_FINI extern void _init (void); #endif @@ -36,7 +36,7 @@ __libc_init_array (void) for (i = 0; i < count; i++) __preinit_array_start[i] (); -#ifdef HAVE_INIT_FINI +#ifdef _HAVE_INIT_FINI _init (); #endif |