@@ -10,8 +10,13 @@ pub type c_long = i32;
10
10
pub type c_ulong = u32 ;
11
11
pub type c_longlong = i64 ;
12
12
pub type c_ulonglong = u64 ;
13
+ pub type intmax_t = i64 ;
14
+ pub type uintmax_t = u64 ;
13
15
pub type size_t = usize ;
14
16
pub type ssize_t = isize ;
17
+ pub type ptrdiff_t = isize ;
18
+ pub type intptr_t = isize ;
19
+ pub type uintptr_t = usize ;
15
20
pub type off_t = i64 ;
16
21
pub type pid_t = i32 ;
17
22
pub type int8_t = i8 ;
@@ -619,11 +624,13 @@ extern {
619
624
pub fn getenv ( s : * const c_char ) -> * mut c_char ;
620
625
pub fn malloc ( amt : size_t ) -> * mut c_void ;
621
626
pub fn malloc_usable_size ( ptr : * mut c_void ) -> size_t ;
627
+ pub fn sbrk ( increment : :: intptr_t ) -> * mut :: c_void ;
622
628
pub fn rand ( ) -> c_int ;
623
629
pub fn read ( fd : c_int , ptr : * mut c_void , size : size_t ) -> ssize_t ;
624
630
pub fn realloc ( ptr : * mut c_void , amt : size_t ) -> * mut c_void ;
625
631
pub fn setenv ( k : * const c_char , v : * const c_char , a : c_int ) -> c_int ;
626
632
pub fn unsetenv ( k : * const c_char ) -> c_int ;
633
+ pub fn clearenv ( ) -> :: c_int ;
627
634
pub fn write ( fd : c_int , ptr : * const c_void , size : size_t ) -> ssize_t ;
628
635
pub static mut environ: * mut * mut c_char ;
629
636
pub fn fopen ( a : * const c_char , b : * const c_char ) -> * mut FILE ;
@@ -724,6 +731,7 @@ extern {
724
731
pub fn fgets ( buf : * mut c_char , n : c_int , stream : * mut FILE )
725
732
-> * mut c_char ;
726
733
pub fn atoi ( s : * const c_char ) -> c_int ;
734
+ pub fn atof ( s : * const c_char ) -> c_double ;
727
735
pub fn strtod ( s : * const c_char , endp : * mut * mut c_char ) -> c_double ;
728
736
pub fn strtol (
729
737
s : * const c_char ,
@@ -822,6 +830,7 @@ extern {
822
830
pub fn readdir ( dirp : * mut :: DIR ) -> * mut :: dirent ;
823
831
pub fn closedir ( dirp : * mut :: DIR ) -> :: c_int ;
824
832
pub fn rewinddir ( dirp : * mut :: DIR ) ;
833
+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
825
834
826
835
pub fn openat (
827
836
dirfd : :: c_int ,
@@ -902,9 +911,11 @@ extern {
902
911
pub fn lstat ( path : * const c_char , buf : * mut stat ) -> :: c_int ;
903
912
904
913
pub fn fsync ( fd : :: c_int ) -> :: c_int ;
914
+ pub fn fdatasync ( fd : :: c_int ) -> :: c_int ;
905
915
906
916
pub fn symlink ( path1 : * const c_char , path2 : * const c_char ) -> :: c_int ;
907
917
918
+ pub fn truncate ( path : * const c_char , length : off_t ) -> :: c_int ;
908
919
pub fn ftruncate ( fd : :: c_int , length : off_t ) -> :: c_int ;
909
920
910
921
pub fn getrusage ( resource : :: c_int , usage : * mut rusage ) -> :: c_int ;
@@ -954,6 +965,11 @@ extern {
954
965
whence : :: c_int ,
955
966
) -> :: c_int ;
956
967
pub fn ftello ( stream : * mut :: FILE ) -> :: off_t ;
968
+ pub fn posix_fallocate (
969
+ fd : :: c_int ,
970
+ offset : :: off_t ,
971
+ len : :: off_t ,
972
+ ) -> :: c_int ;
957
973
958
974
pub fn strcasestr ( cs : * const c_char , ct : * const c_char ) -> * mut c_char ;
959
975
pub fn getline (
@@ -1019,6 +1035,7 @@ extern {
1019
1035
base : :: locale_t ,
1020
1036
) -> :: locale_t ;
1021
1037
pub fn uselocale ( loc : :: locale_t ) -> :: locale_t ;
1038
+ pub fn sched_yield ( ) -> :: c_int ;
1022
1039
1023
1040
pub fn __wasilibc_register_preopened_fd (
1024
1041
fd : c_int ,
@@ -1034,6 +1051,7 @@ extern {
1034
1051
rights_inheriting : __wasi_rights_t ,
1035
1052
relative_path : * mut * const c_char ,
1036
1053
) -> c_int ;
1054
+ pub fn __wasilibc_tell ( fd : c_int ) -> :: off_t ;
1037
1055
1038
1056
pub fn arc4random ( ) -> u32 ;
1039
1057
pub fn arc4random_buf ( a : * mut c_void , b : size_t ) ;
0 commit comments