diff options
author | Ed Schouten <ed@FreeBSD.org> | 2016-07-26 20:11:29 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2016-07-26 20:11:29 +0000 |
commit | 8de6c267117c2eb423b1a940601d8e4d525c5f4d (patch) | |
tree | 9fb8e0db1cc1b9b7808e6bff91a4cac6ebc5c2a2 /include/stdlib.h | |
parent | 7ee4fff4e727dabec12103be0e1c712e355be3af (diff) | |
download | src-test2-8de6c267117c2eb423b1a940601d8e4d525c5f4d.tar.gz src-test2-8de6c267117c2eb423b1a940601d8e4d525c5f4d.zip |
Fix typing of srandom() and initstate().
POSIX requires that these functions have an unsigned int for their first
argument; not an unsigned long.
My reasoning is that we can safely change these functions without
breaking the ABI. As far as I know, our supported architectures either
use registers for passing function arguments that are at least as big as
long (e.g., amd64), or int and long are of the same size (e.g., i386).
Reviewed by: ache
Differential Revision: https://reviews.freebsd.org/D6644
Notes
Notes:
svn path=/head/; revision=303342
Diffstat (limited to 'include/stdlib.h')
-rw-r--r-- | include/stdlib.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index e0c20f766d2b..cc6941b02014 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -204,7 +204,7 @@ double erand48(unsigned short[3]); /* char *fcvt(double, int, int * __restrict, int * __restrict); */ /* char *gcvt(double, int, int * __restrict, int * __restrict); */ int grantpt(int); -char *initstate(unsigned long /* XSI requires u_int */, char *, long); +char *initstate(unsigned int, char *, size_t); long jrand48(unsigned short[3]); char *l64a(long); void lcong48(unsigned short[7]); @@ -227,7 +227,7 @@ int setkey(const char *); #endif char *setstate(/* const */ char *); void srand48(long); -void srandom(unsigned long); +void srandom(unsigned int); int unlockpt(int); #endif /* __XSI_VISIBLE */ |