summaryrefslogtreecommitdiffstats
path: root/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/abort.c2
-rw-r--r--libc/stdlib/drand48.c2
-rw-r--r--libc/stdlib/drand48_r.c2
-rw-r--r--libc/stdlib/erand48.c1
-rw-r--r--libc/stdlib/erand48_r.c7
-rw-r--r--libc/stdlib/getenv.c3
-rw-r--r--libc/stdlib/jrand48.c2
-rw-r--r--libc/stdlib/jrand48_r.c6
-rw-r--r--libc/stdlib/lrand48.c2
-rw-r--r--libc/stdlib/lrand48_r.c5
-rw-r--r--libc/stdlib/malloc/malloc_debug.c2
-rw-r--r--libc/stdlib/mrand48.c2
-rw-r--r--libc/stdlib/mrand48_r.c2
-rw-r--r--libc/stdlib/nrand48.c2
-rw-r--r--libc/stdlib/nrand48_r.c6
-rw-r--r--libc/stdlib/srand48.c2
-rw-r--r--libc/stdlib/srand48_r.c5
-rw-r--r--libc/stdlib/system.c2
-rw-r--r--libc/stdlib/unix_grantpt.c1
-rw-r--r--libc/stdlib/valloc.c2
20 files changed, 38 insertions, 20 deletions
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c
index 07e4a208c..fb042544f 100644
--- a/libc/stdlib/abort.c
+++ b/libc/stdlib/abort.c
@@ -18,6 +18,8 @@ Cambridge, MA 02139, USA. */
/* Hacked up for uClibc by Erik Andersen */
+#define sigaction __sigaction_internal
+
#define _GNU_SOURCE
#include <features.h>
#include <signal.h>
diff --git a/libc/stdlib/drand48.c b/libc/stdlib/drand48.c
index d18ff3f08..fc66816c1 100644
--- a/libc/stdlib/drand48.c
+++ b/libc/stdlib/drand48.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define erand48_r __erand48_r
+
#include <stdlib.h>
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
diff --git a/libc/stdlib/drand48_r.c b/libc/stdlib/drand48_r.c
index b6c055c1f..14235e6e0 100644
--- a/libc/stdlib/drand48_r.c
+++ b/libc/stdlib/drand48_r.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define erand48_r __erand48_r
+
#include <errno.h>
#include <math.h>
#include <stdlib.h>
diff --git a/libc/stdlib/erand48.c b/libc/stdlib/erand48.c
index 6d4c72683..96a8ad115 100644
--- a/libc/stdlib/erand48.c
+++ b/libc/stdlib/erand48.c
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define erand48_r __erand48_r
#include <stdlib.h>
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
diff --git a/libc/stdlib/erand48_r.c b/libc/stdlib/erand48_r.c
index 159eb83a6..0a69266a7 100644
--- a/libc/stdlib/erand48_r.c
+++ b/libc/stdlib/erand48_r.c
@@ -24,11 +24,7 @@
extern int __drand48_iterate(unsigned short xsubi[3],
struct drand48_data *buffer) attribute_hidden;
-
-int erand48_r (xsubi, buffer, result)
- unsigned short int xsubi[3];
- struct drand48_data *buffer;
- double *result;
+int attribute_hidden __erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, double *result)
{
union ieee754_double temp;
@@ -49,3 +45,4 @@ int erand48_r (xsubi, buffer, result)
return 0;
}
+strong_alias(__erand48_r,erand48_r)
diff --git a/libc/stdlib/getenv.c b/libc/stdlib/getenv.c
index 9dfc0d132..6cbdc3e65 100644
--- a/libc/stdlib/getenv.c
+++ b/libc/stdlib/getenv.c
@@ -22,7 +22,7 @@
/* IEEE Std 1003.1-2001 says getenv need not be thread safe, so
* don't bother locking access to __environ */
-char *getenv(const char *var)
+char attribute_hidden *__getenv(const char *var)
{
int len;
char **ep;
@@ -39,3 +39,4 @@ char *getenv(const char *var)
return NULL;
}
+strong_alias(__getenv,getenv)
diff --git a/libc/stdlib/jrand48.c b/libc/stdlib/jrand48.c
index 1106f1f9f..44b32487f 100644
--- a/libc/stdlib/jrand48.c
+++ b/libc/stdlib/jrand48.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define jrand48_r __jrand48_r
+
#include <stdlib.h>
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
diff --git a/libc/stdlib/jrand48_r.c b/libc/stdlib/jrand48_r.c
index d8c37cdbc..a21bda080 100644
--- a/libc/stdlib/jrand48_r.c
+++ b/libc/stdlib/jrand48_r.c
@@ -22,10 +22,7 @@
extern int __drand48_iterate(unsigned short xsubi[3],
struct drand48_data *buffer) attribute_hidden;
-int jrand48_r (xsubi, buffer, result)
- unsigned short int xsubi[3];
- struct drand48_data *buffer;
- long int *result;
+int attribute_hidden __jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long int *result)
{
/* Compute next state. */
if (__drand48_iterate (xsubi, buffer) < 0)
@@ -36,3 +33,4 @@ int jrand48_r (xsubi, buffer, result)
return 0;
}
+strong_alias(__jrand48_r,jrand48_r)
diff --git a/libc/stdlib/lrand48.c b/libc/stdlib/lrand48.c
index c6396c047..88301d70f 100644
--- a/libc/stdlib/lrand48.c
+++ b/libc/stdlib/lrand48.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define nrand48_r __nrand48_r
+
#include <stdlib.h>
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
diff --git a/libc/stdlib/lrand48_r.c b/libc/stdlib/lrand48_r.c
index c2851efd7..0ff1ef25e 100644
--- a/libc/stdlib/lrand48_r.c
+++ b/libc/stdlib/lrand48_r.c
@@ -17,9 +17,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define nrand48_r __nrand48_r
+
#include <stdlib.h>
-int lrand48_r (struct drand48_data *buffer, long int *result)
+int attribute_hidden __lrand48_r (struct drand48_data *buffer, long int *result)
{
/* Be generous for the arguments, detect some errors. */
if (buffer == NULL)
@@ -27,3 +29,4 @@ int lrand48_r (struct drand48_data *buffer, long int *result)
return nrand48_r (buffer->__x, buffer, result);
}
+strong_alias(__lrand48_r,lrand48_r)
diff --git a/libc/stdlib/malloc/malloc_debug.c b/libc/stdlib/malloc/malloc_debug.c
index d231fa7b6..b93b1eac6 100644
--- a/libc/stdlib/malloc/malloc_debug.c
+++ b/libc/stdlib/malloc/malloc_debug.c
@@ -55,7 +55,7 @@ __malloc_debug_printf (int indent, const char *fmt, ...)
void
__malloc_debug_init (void)
{
- char *ev = getenv ("MALLOC_DEBUG");
+ char *ev = __getenv ("MALLOC_DEBUG");
if (ev)
{
int val = atoi (ev);
diff --git a/libc/stdlib/mrand48.c b/libc/stdlib/mrand48.c
index a732603e5..e9d5353ad 100644
--- a/libc/stdlib/mrand48.c
+++ b/libc/stdlib/mrand48.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define jrand48_r __jrand48_r
+
#include <stdlib.h>
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
diff --git a/libc/stdlib/mrand48_r.c b/libc/stdlib/mrand48_r.c
index 74351a059..f79e5f887 100644
--- a/libc/stdlib/mrand48_r.c
+++ b/libc/stdlib/mrand48_r.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define jrand48_r __jrand48_r
+
#include <stdlib.h>
int mrand48_r (struct drand48_data *buffer, long int *result)
diff --git a/libc/stdlib/nrand48.c b/libc/stdlib/nrand48.c
index 585bfe7fd..6cdf4ebad 100644
--- a/libc/stdlib/nrand48.c
+++ b/libc/stdlib/nrand48.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define nrand48_r __nrand48_r
+
#include <stdlib.h>
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
diff --git a/libc/stdlib/nrand48_r.c b/libc/stdlib/nrand48_r.c
index 89f098e75..f72c07030 100644
--- a/libc/stdlib/nrand48_r.c
+++ b/libc/stdlib/nrand48_r.c
@@ -22,10 +22,7 @@
extern int __drand48_iterate(unsigned short xsubi[3],
struct drand48_data *buffer) attribute_hidden;
-int nrand48_r (xsubi, buffer, result)
- unsigned short int xsubi[3];
- struct drand48_data *buffer;
- long int *result;
+int attribute_hidden __nrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long int *result)
{
/* Compute next state. */
if (__drand48_iterate (xsubi, buffer) < 0)
@@ -39,3 +36,4 @@ int nrand48_r (xsubi, buffer, result)
return 0;
}
+strong_alias(__nrand48_r,nrand48_r)
diff --git a/libc/stdlib/srand48.c b/libc/stdlib/srand48.c
index a172d07a1..1dcdc14a7 100644
--- a/libc/stdlib/srand48.c
+++ b/libc/stdlib/srand48.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define srand48_r __srand48_r
+
#include <stdlib.h>
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
diff --git a/libc/stdlib/srand48_r.c b/libc/stdlib/srand48_r.c
index c0fa38e90..d2f959c79 100644
--- a/libc/stdlib/srand48_r.c
+++ b/libc/stdlib/srand48_r.c
@@ -20,9 +20,7 @@
#include <stdlib.h>
#include <limits.h>
-int srand48_r (seedval, buffer)
- long int seedval;
- struct drand48_data *buffer;
+int attribute_hidden __srand48_r (long int seedval, struct drand48_data *buffer)
{
/* The standards say we only have 32 bits. */
if (sizeof (long int) > 4)
@@ -38,3 +36,4 @@ int srand48_r (seedval, buffer)
return 0;
}
+strong_alias(__srand48_r,srand48_r)
diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index b365ef82e..7dba803ac 100644
--- a/libc/stdlib/system.c
+++ b/libc/stdlib/system.c
@@ -1,3 +1,5 @@
+#define wait4 __wait4
+
#include <stdio.h>
#include <stddef.h>
#include <signal.h>
diff --git a/libc/stdlib/unix_grantpt.c b/libc/stdlib/unix_grantpt.c
index 5d21ec9f8..9bd374978 100644
--- a/libc/stdlib/unix_grantpt.c
+++ b/libc/stdlib/unix_grantpt.c
@@ -20,6 +20,7 @@
#define memchr __memchr
#define getgid __getgid
#define setrlimit __setrlimit
+#define waitpid __waitpid
#include <assert.h>
#include <errno.h>
diff --git a/libc/stdlib/valloc.c b/libc/stdlib/valloc.c
index c1d6d29a5..d4f21d121 100644
--- a/libc/stdlib/valloc.c
+++ b/libc/stdlib/valloc.c
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA.
The author may be reached (Email) at the address mike@@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-#define getpagesize __libc_getpagesize
+#define getpagesize __getpagesize_internal
#include <stdlib.h>
#include <unistd.h>