Skip to content

Commit 4493a07

Browse files
committed
Auto merge of #2995 - carbotaniuman:rand48, r=JohnTitor
Add rand48 functions
2 parents cea201b + a68d3ed commit 4493a07

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

libc-test/semver/linux.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2891,6 +2891,7 @@ dirfd
28912891
dl_iterate_phdr
28922892
dl_phdr_info
28932893
dqblk
2894+
drand48
28942895
dup3
28952896
duplocale
28962897
endgrent
@@ -2904,6 +2905,7 @@ epoll_ctl
29042905
epoll_event
29052906
epoll_pwait
29062907
epoll_wait
2908+
erand48
29072909
eventfd
29082910
execvpe
29092911
faccessat
@@ -3012,15 +3014,18 @@ ip_mreq_source
30123014
ipc_perm
30133015
itimerspec
30143016
j1939_filter
3017+
jrand48
30153018
key_t
30163019
killpg
30173020
labs
3021+
lcong48
30183022
lgetxattr
30193023
listxattr
30203024
llistxattr
30213025
lockf
30223026
loff_t
30233027
login_tty
3028+
lrand48
30243029
lremovexattr
30253030
lseek64
30263031
lsetxattr
@@ -3055,6 +3060,7 @@ mq_timedreceive
30553060
mq_timedsend
30563061
mq_unlink
30573062
mqd_t
3063+
mrand48
30583064
mremap
30593065
msgctl
30603066
msgget
@@ -3074,6 +3080,7 @@ nl_langinfo_l
30743080
nlattr
30753081
nlmsgerr
30763082
nlmsghdr
3083+
nrand48
30773084
off64_t
30783085
open64
30793086
open_how
@@ -3192,6 +3199,7 @@ sched_setaffinity
31923199
sched_setparam
31933200
sched_setscheduler
31943201
seccomp_data
3202+
seed48
31953203
seekdir
31963204
sem_close
31973205
sem_destroy
@@ -3252,6 +3260,7 @@ sockaddr_vm
32523260
splice
32533261
spwd
32543262
srand
3263+
srand48
32553264
stack_t
32563265
stat64
32573266
statfs

src/unix/linux_like/linux/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3798,6 +3798,16 @@ extern "C" {
37983798
pub fn rand() -> ::c_int;
37993799
pub fn srand(seed: ::c_uint);
38003800

3801+
pub fn drand48() -> ::c_double;
3802+
pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double;
3803+
pub fn lrand48() -> ::c_long;
3804+
pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long;
3805+
pub fn mrand48() -> ::c_long;
3806+
pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long;
3807+
pub fn srand48(seed: ::c_long);
3808+
pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
3809+
pub fn lcong48(p: *mut ::c_ushort);
3810+
38013811
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
38023812

38033813
pub fn setpwent();

0 commit comments

Comments
 (0)