From 7aea441c8a240bd5a0717ec09ae8efc4878cd377 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 14:48:45 +0100 Subject: move prototype for __drand48_iterate and __libc_drand48_data to stdlib.h Move them to a common header guarded by _LIBC Signed-off-by: Peter S. Mazinger --- libc/stdlib/drand48-iter.c | 4 ---- libc/stdlib/drand48.c | 4 ---- libc/stdlib/erand48.c | 4 ---- libc/stdlib/erand48_r.c | 3 --- libc/stdlib/jrand48.c | 4 ---- libc/stdlib/jrand48_r.c | 3 --- libc/stdlib/lrand48.c | 4 ---- libc/stdlib/mrand48.c | 4 ---- libc/stdlib/nrand48.c | 4 ---- libc/stdlib/nrand48_r.c | 3 --- libc/stdlib/seed48.c | 4 ---- libc/stdlib/srand48.c | 4 ---- 12 files changed, 45 deletions(-) (limited to 'libc') diff --git a/libc/stdlib/drand48-iter.c b/libc/stdlib/drand48-iter.c index 221cbe08f..e0c1ce430 100644 --- a/libc/stdlib/drand48-iter.c +++ b/libc/stdlib/drand48-iter.c @@ -23,13 +23,9 @@ #include #include -/* Global state for non-reentrant functions. */ -struct drand48_data __libc_drand48_data attribute_hidden; - #ifdef __UCLIBC_MJN3_ONLY__ #warning turn int __drand48_iterate into void #endif /* __UCLIBC_MJN3_ONLY__ */ -int __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) attribute_hidden; int __drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer) { uint64_t X; diff --git a/libc/stdlib/drand48.c b/libc/stdlib/drand48.c index 8c9017b11..c53dcfbfc 100644 --- a/libc/stdlib/drand48.c +++ b/libc/stdlib/drand48.c @@ -19,10 +19,6 @@ #include - -/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ -extern struct drand48_data __libc_drand48_data attribute_hidden; - double drand48 (void) { double result; diff --git a/libc/stdlib/erand48.c b/libc/stdlib/erand48.c index ee28d9635..f3603cde0 100644 --- a/libc/stdlib/erand48.c +++ b/libc/stdlib/erand48.c @@ -19,10 +19,6 @@ #include - -/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ -extern struct drand48_data __libc_drand48_data attribute_hidden; - double erand48 (unsigned short int xsubi[3]) { double result; diff --git a/libc/stdlib/erand48_r.c b/libc/stdlib/erand48_r.c index e36e73eb2..bd40a3488 100644 --- a/libc/stdlib/erand48_r.c +++ b/libc/stdlib/erand48_r.c @@ -21,9 +21,6 @@ #include #include -extern int __drand48_iterate(unsigned short xsubi[3], - struct drand48_data *buffer) attribute_hidden; - int erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, double *result) { union ieee754_double temp; diff --git a/libc/stdlib/jrand48.c b/libc/stdlib/jrand48.c index 163c5408e..8a06ced56 100644 --- a/libc/stdlib/jrand48.c +++ b/libc/stdlib/jrand48.c @@ -19,10 +19,6 @@ #include - -/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ -extern struct drand48_data __libc_drand48_data attribute_hidden; - long int jrand48 (unsigned short int xsubi[3]) { long int result; diff --git a/libc/stdlib/jrand48_r.c b/libc/stdlib/jrand48_r.c index 24f7075f5..5652d1016 100644 --- a/libc/stdlib/jrand48_r.c +++ b/libc/stdlib/jrand48_r.c @@ -19,9 +19,6 @@ #include -extern int __drand48_iterate(unsigned short xsubi[3], - struct drand48_data *buffer) attribute_hidden; - int jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long int *result) { /* Compute next state. */ diff --git a/libc/stdlib/lrand48.c b/libc/stdlib/lrand48.c index a0b15caff..915638b80 100644 --- a/libc/stdlib/lrand48.c +++ b/libc/stdlib/lrand48.c @@ -19,10 +19,6 @@ #include - -/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ -extern struct drand48_data __libc_drand48_data attribute_hidden; - long int lrand48 (void) { long int result; diff --git a/libc/stdlib/mrand48.c b/libc/stdlib/mrand48.c index b209acd57..6f7cf734c 100644 --- a/libc/stdlib/mrand48.c +++ b/libc/stdlib/mrand48.c @@ -19,10 +19,6 @@ #include - -/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ -extern struct drand48_data __libc_drand48_data attribute_hidden; - long int mrand48 (void) { long int result; diff --git a/libc/stdlib/nrand48.c b/libc/stdlib/nrand48.c index 97c197caa..5183484fa 100644 --- a/libc/stdlib/nrand48.c +++ b/libc/stdlib/nrand48.c @@ -19,10 +19,6 @@ #include - -/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ -extern struct drand48_data __libc_drand48_data attribute_hidden; - long int nrand48 (unsigned short int xsubi[3]) { long int result; diff --git a/libc/stdlib/nrand48_r.c b/libc/stdlib/nrand48_r.c index 0710e90ef..b8ed0eb31 100644 --- a/libc/stdlib/nrand48_r.c +++ b/libc/stdlib/nrand48_r.c @@ -19,9 +19,6 @@ #include -extern int __drand48_iterate(unsigned short xsubi[3], - struct drand48_data *buffer) attribute_hidden; - int nrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long int *result) { /* Compute next state. */ diff --git a/libc/stdlib/seed48.c b/libc/stdlib/seed48.c index 9ff8a480a..a62dc2e64 100644 --- a/libc/stdlib/seed48.c +++ b/libc/stdlib/seed48.c @@ -19,10 +19,6 @@ #include - -/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ -extern struct drand48_data __libc_drand48_data attribute_hidden; - unsigned short int * seed48 (unsigned short int seed16v[3]) { diff --git a/libc/stdlib/srand48.c b/libc/stdlib/srand48.c index 817d068c3..f55374371 100644 --- a/libc/stdlib/srand48.c +++ b/libc/stdlib/srand48.c @@ -19,10 +19,6 @@ #include - -/* Global state for non-reentrant functions. Defined in drand48-iter.c. */ -extern struct drand48_data __libc_drand48_data attribute_hidden; - void srand48 (long seedval) { srand48_r (seedval, &__libc_drand48_data); -- cgit v1.2.3