From: Rich Felker Date: Sat, 8 Sep 2018 03:02:40 +0000 (-0400) Subject: add and use internal header for *rand48 lcg X-Git-Tag: v1.1.21~142 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f9db9eca40fdc78fae258b8e12eb689fc2d5e0e5;p=oweals%2Fmusl.git add and use internal header for *rand48 lcg --- diff --git a/src/prng/__rand48_step.c b/src/prng/__rand48_step.c index 961d30fc..94703d07 100644 --- a/src/prng/__rand48_step.c +++ b/src/prng/__rand48_step.c @@ -1,4 +1,5 @@ #include +#include "rand48.h" uint64_t __rand48_step(unsigned short *xi, unsigned short *lc) { diff --git a/src/prng/__seed48.c b/src/prng/__seed48.c index 05a4539e..e436b4d3 100644 --- a/src/prng/__seed48.c +++ b/src/prng/__seed48.c @@ -1 +1,3 @@ +#include "rand48.h" + unsigned short __seed48[7] = { 0, 0, 0, 0xe66d, 0xdeec, 0x5, 0xb }; diff --git a/src/prng/drand48.c b/src/prng/drand48.c index d808353c..08283e24 100644 --- a/src/prng/drand48.c +++ b/src/prng/drand48.c @@ -1,8 +1,6 @@ #include #include - -uint64_t __rand48_step(unsigned short *xi, unsigned short *lc); -extern unsigned short __seed48[7]; +#include "rand48.h" double erand48(unsigned short s[3]) { diff --git a/src/prng/lcong48.c b/src/prng/lcong48.c index 32b27d42..030e5148 100644 --- a/src/prng/lcong48.c +++ b/src/prng/lcong48.c @@ -1,7 +1,6 @@ #include #include - -extern unsigned short __seed48[7]; +#include "rand48.h" void lcong48(unsigned short p[7]) { diff --git a/src/prng/lrand48.c b/src/prng/lrand48.c index a3c4e4e2..07e2b784 100644 --- a/src/prng/lrand48.c +++ b/src/prng/lrand48.c @@ -1,8 +1,6 @@ #include #include - -uint64_t __rand48_step(unsigned short *xi, unsigned short *lc); -extern unsigned short __seed48[7]; +#include "rand48.h" long nrand48(unsigned short s[3]) { diff --git a/src/prng/mrand48.c b/src/prng/mrand48.c index 0519d667..f4a56e61 100644 --- a/src/prng/mrand48.c +++ b/src/prng/mrand48.c @@ -1,8 +1,6 @@ #include #include - -uint64_t __rand48_step(unsigned short *xi, unsigned short *lc); -extern unsigned short __seed48[7]; +#include "rand48.h" long jrand48(unsigned short s[3]) { diff --git a/src/prng/rand48.h b/src/prng/rand48.h new file mode 100644 index 00000000..4ed6ae52 --- /dev/null +++ b/src/prng/rand48.h @@ -0,0 +1,4 @@ +#include + +uint64_t __rand48_step(unsigned short *xi, unsigned short *lc); +extern unsigned short __seed48[7]; diff --git a/src/prng/seed48.c b/src/prng/seed48.c index e0699c09..bce7b339 100644 --- a/src/prng/seed48.c +++ b/src/prng/seed48.c @@ -1,7 +1,6 @@ #include #include - -extern unsigned short __seed48[7]; +#include "rand48.h" unsigned short *seed48(unsigned short *s) {