Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140779138
D6644.id18769.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D6644.id18769.diff
View Options
Index: head/include/stdlib.h
===================================================================
--- head/include/stdlib.h
+++ head/include/stdlib.h
@@ -204,7 +204,7 @@
/* 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 @@
#endif
char *setstate(/* const */ char *);
void srand48(long);
-void srandom(unsigned long);
+void srandom(unsigned int);
int unlockpt(int);
#endif /* __XSI_VISIBLE */
Index: head/lib/libc/stdlib/random.3
===================================================================
--- head/lib/libc/stdlib/random.3
+++ head/lib/libc/stdlib/random.3
@@ -28,7 +28,7 @@
.\" @(#)random.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd April 2, 2013
+.Dd July 26, 2016
.Dt RANDOM 3
.Os
.Sh NAME
@@ -45,11 +45,11 @@
.Ft long
.Fn random void
.Ft void
-.Fn srandom "unsigned long seed"
+.Fn srandom "unsigned int seed"
.Ft void
.Fn srandomdev void
.Ft char *
-.Fn initstate "unsigned long seed" "char *state" "long n"
+.Fn initstate "unsigned int seed" "char *state" "size_t n"
.Ft char *
.Fn setstate "char *state"
.Sh DESCRIPTION
Index: head/lib/libc/stdlib/random.c
===================================================================
--- head/lib/libc/stdlib/random.c
+++ head/lib/libc/stdlib/random.c
@@ -236,7 +236,7 @@
* for default usage relies on values produced by this routine.
*/
void
-srandom(unsigned long x)
+srandom(unsigned int x)
{
int i, lim;
@@ -311,7 +311,7 @@
* complain about mis-alignment, but you should disregard these messages.
*/
char *
-initstate(unsigned long seed, char *arg_state, long n)
+initstate(unsigned int seed, char *arg_state, size_t n)
{
char *ostate = (char *)(&state[-1]);
uint32_t *int_arg_state = (uint32_t *)arg_state;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 28, 11:03 PM (18 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27344890
Default Alt Text
D6644.id18769.diff (2 KB)
Attached To
Mode
D6644: Fix typing of srandom() and initstate().
Attached
Detach File
Event Timeline
Log In to Comment