summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/atexit.c4
-rw-r--r--libc/stdlib/getenv.c1
-rw-r--r--libc/stdlib/malloc-standard/mallinfo.c1
-rw-r--r--libc/stdlib/setenv.c1
-rw-r--r--libc/stdlib/stdlib.c12
-rw-r--r--libc/stdlib/strtod.c10
6 files changed, 27 insertions, 2 deletions
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c
index c27872f02..4289c72b5 100644
--- a/libc/stdlib/atexit.c
+++ b/libc/stdlib/atexit.c
@@ -66,7 +66,7 @@ typedef enum {
} ef_type; /* exit function types */
/* this is in the L_exit object */
-extern void (*__exit_cleanup) (int);
+extern void (*__exit_cleanup) (int) attribute_hidden;
/* these are in the L___do_exit object */
extern int __exit_slots attribute_hidden;
@@ -309,7 +309,7 @@ void __exit_handler(int status)
#ifdef L_exit
extern void weak_function _stdio_term(void) attribute_hidden;
-void (*__exit_cleanup) (int) = 0;
+attribute_hidden void (*__exit_cleanup) (int) = 0;
#ifdef __UCLIBC_HAS_THREADS__
pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
#endif
diff --git a/libc/stdlib/getenv.c b/libc/stdlib/getenv.c
index c7940f398..4f4c4f1f8 100644
--- a/libc/stdlib/getenv.c
+++ b/libc/stdlib/getenv.c
@@ -11,6 +11,7 @@
libc_hidden_proto(getenv)
libc_hidden_proto(memcmp)
libc_hidden_proto(strlen)
+libc_hidden_proto(__environ)
/* IEEE Std 1003.1-2001 says getenv need not be thread safe, so
* don't bother locking access to __environ */
diff --git a/libc/stdlib/malloc-standard/mallinfo.c b/libc/stdlib/malloc-standard/mallinfo.c
index 4f274ed32..89c9a6e7e 100644
--- a/libc/stdlib/malloc-standard/mallinfo.c
+++ b/libc/stdlib/malloc-standard/mallinfo.c
@@ -17,6 +17,7 @@
#include "malloc.h"
libc_hidden_proto(fprintf)
+libc_hidden_proto(stderr)
/* ------------------------------ mallinfo ------------------------------ */
libc_hidden_proto(mallinfo)
diff --git a/libc/stdlib/setenv.c b/libc/stdlib/setenv.c
index 347718237..3b02cec43 100644
--- a/libc/stdlib/setenv.c
+++ b/libc/stdlib/setenv.c
@@ -32,6 +32,7 @@ libc_hidden_proto(strlen)
libc_hidden_proto(strncmp)
libc_hidden_proto(strndup)
libc_hidden_proto(unsetenv)
+libc_hidden_proto(__environ)
#ifdef __UCLIBC_HAS_THREADS__
# include <pthread.h>
diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c
index 2ff404621..10e5054cc 100644
--- a/libc/stdlib/stdlib.c
+++ b/libc/stdlib/stdlib.c
@@ -86,6 +86,9 @@ libc_hidden_proto(iswspace)
#ifdef __UCLIBC_HAS_XLOCALE__
#include <xlocale.h>
#endif /* __UCLIBC_HAS_XLOCALE__ */
+#ifdef __UCLIBC_HAS_LOCALE__
+libc_hidden_proto(__global_locale)
+#endif
/* TODO: clean up the following... */
@@ -476,6 +479,12 @@ unsigned long attribute_hidden _stdlib_strto_l(register const Wchar * __restrict
/* This is the main work fuction which handles both strtol (sflag = 1) and
* strtoul (sflag = 0). */
+#ifdef __UCLIBC_HAS_XLOCALE__
+libc_hidden_proto(__ctype_b_loc)
+#else
+libc_hidden_proto(__ctype_b)
+#endif
+
unsigned long attribute_hidden __XL_NPP(_stdlib_strto_l)(register const Wchar * __restrict str,
Wchar ** __restrict endptr, int base,
int sflag __LOCALE_PARAM )
@@ -618,6 +627,9 @@ unsigned long long attribute_hidden _stdlib_strto_ll(register const Wchar * __re
#else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
+#ifndef __UCLIBC_HAS_XLOCALE__
+libc_hidden_proto(__ctype_b)
+#endif
/* This is the main work fuction which handles both strtoll (sflag = 1) and
* strtoull (sflag = 0). */
diff --git a/libc/stdlib/strtod.c b/libc/stdlib/strtod.c
index 3fd63ac6f..b0dfad62a 100644
--- a/libc/stdlib/strtod.c
+++ b/libc/stdlib/strtod.c
@@ -176,6 +176,16 @@ extern void __fp_range_check(__fpmax_t y, __fpmax_t x) attribute_hidden;
/**********************************************************************/
#if defined(L___strtofpmax) || defined(L___strtofpmax_l) || defined(L___wcstofpmax) || defined(L___wcstofpmax_l)
+#ifdef __UCLIBC_HAS_XLOCALE__
+libc_hidden_proto(__ctype_b_loc)
+#else
+#ifdef __UCLIBC_HAS_LOCALE__
+libc_hidden_proto(__global_locale)
+#endif
+libc_hidden_proto(__ctype_b)
+libc_hidden_proto(__ctype_tolower)
+#endif
+
#if defined(L___wcstofpmax) || defined(L___wcstofpmax_l)
#define __strtofpmax __wcstofpmax