diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-21 16:54:08 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-21 16:54:08 +0000 |
commit | d17c01f9fe958d9d78739d3bf7111f2c01690d0d (patch) | |
tree | 1d61abad5c2c8666a4e3a45e93ee2367c43c2c60 /stdlib/stdlib.h | |
parent | 27cb6b28b9cf3f133f17c245dc177a148eedca04 (diff) | |
download | glibc-d17c01f9fe958d9d78739d3bf7111f2c01690d0d.zip glibc-d17c01f9fe958d9d78739d3bf7111f2c01690d0d.tar.gz glibc-d17c01f9fe958d9d78739d3bf7111f2c01690d0d.tar.bz2 |
Update.
* stdlib/stdlib.h (drand48_data): Make available only for
__USE_MISC. Rename elements to protect namespace. Change type
and position of a and init element.
* stdlib/drand48-iter.c: Don't handle unsigned short > 16 bit
differently. Adjust for drand48_data change. Don't compute a here,
it comes from drand48_data.
* stdlib/lcong48_r.c: Don't handle unsigned short > 16 bit
differently. Adjust for drand48_data change. Compute a here.
* stdlib/srand48_r.c: Likewise.
* stdlib/drand48.c: Adjust for drand48_data change.
* stdlib/lrand48.c: Likewise.
* stdlib/mrand48.c: Likewise.
* stdlib/seek48.c: Likewise.
* stdlib/drand48_r.c: Likewise.
* stdlib/lrand48_r.c: Likewise.
* stdlib/mrand48_r.c: Likewise.
* stdlib/seed48_r.c: Likewise. Don't handle unsigned short > 16 bit
differently.
* stdlib/erand48_r.c: Don't handle unsigned short > 16 bit differently.
* stdlib/jrand48_r.c: Likewise.
Diffstat (limited to 'stdlib/stdlib.h')
-rw-r--r-- | stdlib/stdlib.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index de12734..17f19ac 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -474,17 +474,19 @@ extern void srand48 (long int __seedval) __THROW; extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __THROW; extern void lcong48 (unsigned short int __param[7]) __THROW; -/* Data structure for communication with thread safe versions. */ +# ifdef __USE_MISC +/* Data structure for communication with thread safe versions. This + type is to be regarded as opaque. It's only exported because users + have to allocate objects of this type. */ struct drand48_data { - unsigned short int x[3]; /* Current state. */ - unsigned short int a[3]; /* Factor in congruential formula. */ - unsigned short int c; /* Additive const. in congruential formula. */ - unsigned short int old_x[3]; /* Old state. */ - int init; /* Flag for initializing. */ + unsigned short int __x[3]; /* Current state. */ + unsigned short int __old_x[3]; /* Old state. */ + unsigned short int __c; /* Additive const. in congruential formula. */ + unsigned short int __init; /* Flag for initializing. */ + unsigned long long int __a; /* Factor in congruential formula. */ }; -# ifdef __USE_MISC /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) __THROW; |