Skip to content

Commit

Permalink
Auto merge of #2995 - carbotaniuman:rand48, r=JohnTitor
Browse files Browse the repository at this point in the history
Add rand48 functions
  • Loading branch information
bors committed Nov 20, 2022
2 parents cea201b + a68d3ed commit 4493a07
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -2891,6 +2891,7 @@ dirfd
dl_iterate_phdr
dl_phdr_info
dqblk
drand48
dup3
duplocale
endgrent
Expand All @@ -2904,6 +2905,7 @@ epoll_ctl
epoll_event
epoll_pwait
epoll_wait
erand48
eventfd
execvpe
faccessat
Expand Down Expand Up @@ -3012,15 +3014,18 @@ ip_mreq_source
ipc_perm
itimerspec
j1939_filter
jrand48
key_t
killpg
labs
lcong48
lgetxattr
listxattr
llistxattr
lockf
loff_t
login_tty
lrand48
lremovexattr
lseek64
lsetxattr
Expand Down Expand Up @@ -3055,6 +3060,7 @@ mq_timedreceive
mq_timedsend
mq_unlink
mqd_t
mrand48
mremap
msgctl
msgget
Expand All @@ -3074,6 +3080,7 @@ nl_langinfo_l
nlattr
nlmsgerr
nlmsghdr
nrand48
off64_t
open64
open_how
Expand Down Expand Up @@ -3192,6 +3199,7 @@ sched_setaffinity
sched_setparam
sched_setscheduler
seccomp_data
seed48
seekdir
sem_close
sem_destroy
Expand Down Expand Up @@ -3252,6 +3260,7 @@ sockaddr_vm
splice
spwd
srand
srand48
stack_t
stat64
statfs
Expand Down
10 changes: 10 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -3798,6 +3798,16 @@ extern "C" {
pub fn rand() -> ::c_int;
pub fn srand(seed: ::c_uint);

pub fn drand48() -> ::c_double;
pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double;
pub fn lrand48() -> ::c_long;
pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long;
pub fn mrand48() -> ::c_long;
pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long;
pub fn srand48(seed: ::c_long);
pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
pub fn lcong48(p: *mut ::c_ushort);

pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;

pub fn setpwent();
Expand Down

0 comments on commit 4493a07

Please sign in to comment.