@@ -2874,7 +2874,7 @@ fn test_emscripten(target: &str) {
2874
2874
// Just pass all these through, no need for a "struct" prefix
2875
2875
"FILE" | "fd_set" | "Dl_info" | "DIR" => ty. to_string ( ) ,
2876
2876
2877
- // LFS64 types have been removed in Emscripten 3.1.44+
2877
+ // LFS64 types have been removed in Emscripten 3.1.44
2878
2878
// https://github.com/emscripten-core/emscripten/pull/19812
2879
2879
"off64_t" => "off_t" . to_string ( ) ,
2880
2880
@@ -2898,7 +2898,7 @@ fn test_emscripten(target: &str) {
2898
2898
s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
2899
2899
s. replace ( "e_nsec" , ".tv_nsec" )
2900
2900
}
2901
- // FIXME: appears that `epoll_event.data` is an union
2901
+ // Rust struct uses raw u64, rather than union
2902
2902
"u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
2903
2903
s => s. to_string ( ) ,
2904
2904
}
@@ -2914,10 +2914,7 @@ fn test_emscripten(target: &str) {
2914
2914
// https://github.com/emscripten-core/emscripten/issues/5033
2915
2915
ty if ty. starts_with ( "epoll" ) => true ,
2916
2916
2917
- // FIXME: The size has been changed due to musl's time64
2918
- "time_t" => true ,
2919
-
2920
- // LFS64 types have been removed in Emscripten 3.1.44+
2917
+ // LFS64 types have been removed in Emscripten 3.1.44
2921
2918
// https://github.com/emscripten-core/emscripten/pull/19812
2922
2919
t => t. ends_with ( "64" ) || t. ends_with ( "64_t" ) ,
2923
2920
}
@@ -2926,30 +2923,19 @@ fn test_emscripten(target: &str) {
2926
2923
cfg. skip_struct ( move |ty| {
2927
2924
match ty {
2928
2925
// This is actually a union, not a struct
2929
- // FIXME: is this necessary?
2930
2926
"sigval" => true ,
2931
2927
2932
- // FIXME: It was removed in
2933
- // emscripten-core/emscripten@953e414
2934
- "pthread_mutexattr_t" => true ,
2935
-
2936
2928
// FIXME: Investigate why the test fails.
2937
2929
// Skip for now to unblock CI.
2938
2930
"pthread_condattr_t" => true ,
2939
-
2940
- // FIXME: The size has been changed when upgraded to musl 1.2.2
2941
- "pthread_mutex_t" => true ,
2931
+ "pthread_mutexattr_t" => true ,
2942
2932
2943
2933
// No epoll support
2944
2934
// https://github.com/emscripten-core/emscripten/issues/5033
2945
2935
ty if ty. starts_with ( "epoll" ) => true ,
2946
2936
ty if ty. starts_with ( "signalfd" ) => true ,
2947
2937
2948
- // FIXME: The size has been changed due to time64
2949
- "utimbuf" | "timeval" | "timespec" | "rusage" | "itimerval" | "sched_param"
2950
- | "stat" | "stat64" | "shmid_ds" | "msqid_ds" => true ,
2951
-
2952
- // LFS64 types have been removed in Emscripten 3.1.44+
2938
+ // LFS64 types have been removed in Emscripten 3.1.44
2953
2939
// https://github.com/emscripten-core/emscripten/pull/19812
2954
2940
ty => ty. ends_with ( "64" ) || ty. ends_with ( "64_t" ) ,
2955
2941
}
@@ -2958,12 +2944,9 @@ fn test_emscripten(target: &str) {
2958
2944
cfg. skip_fn ( move |name| {
2959
2945
match name {
2960
2946
// Emscripten does not support fork/exec/wait or any kind of multi-process support
2961
- // https://github.com/emscripten-core/emscripten/blob/3.1.30 /tools/system_libs.py#L973
2947
+ // https://github.com/emscripten-core/emscripten/blob/3.1.68 /tools/system_libs.py#L1100
2962
2948
"execv" | "execve" | "execvp" | "execvpe" | "fexecve" | "wait4" => true ,
2963
2949
2964
- // FIXME: Remove after emscripten-core/emscripten#18492 is released (> 3.1.30).
2965
- "clearenv" => true ,
2966
-
2967
2950
_ => false ,
2968
2951
}
2969
2952
} ) ;
@@ -2991,8 +2974,8 @@ fn test_emscripten(target: &str) {
2991
2974
"USRQUOTA" | "GRPQUOTA" | "Q_GETFMT" | "Q_GETINFO" | "Q_SETINFO" | "Q_SYNC"
2992
2975
| "Q_QUOTAON" | "Q_QUOTAOFF" | "Q_GETQUOTA" | "Q_SETQUOTA" => true ,
2993
2976
2994
- // FIXME: `SYS_gettid` was removed in
2995
- // emscripten-core/emscripten@6d6474e
2977
+ // `SYS_gettid` was removed in Emscripten v1.39.9
2978
+ // https://github.com/ emscripten-core/emscripten/pull/10439
2996
2979
"SYS_gettid" => true ,
2997
2980
2998
2981
// No personality.h
@@ -3001,19 +2984,11 @@ fn test_emscripten(target: &str) {
3001
2984
| "ADDR_LIMIT_32BIT" | "SHORT_INODE" | "WHOLE_SECONDS" | "STICKY_TIMEOUTS"
3002
2985
| "ADDR_LIMIT_3GB" => true ,
3003
2986
3004
- // FIXME: These values have been changed
3005
- | "POSIX_MADV_DONTNEED" // to 4
3006
- | "RLIMIT_NLIMITS" // to 16
3007
- | "RLIM_NLIMITS" // to 16
3008
- | "IPPROTO_MAX" // to 263
3009
- | "F_GETLK" // to 5
3010
- | "F_SETLK" // to 6
3011
- | "F_SETLKW" // to 7
3012
- | "O_TMPFILE" // to 65
3013
- | "SIG_IGN" // -1
3014
- => true ,
2987
+ // `SIG_IGN` has been changed to -2 since 1 is a valid function address
2988
+ // https://github.com/emscripten-core/emscripten/pull/14883
2989
+ "SIG_IGN" => true ,
3015
2990
3016
- // LFS64 types have been removed in Emscripten 3.1.44+
2991
+ // LFS64 types have been removed in Emscripten 3.1.44
3017
2992
// https://github.com/emscripten-core/emscripten/pull/19812
3018
2993
n if n. starts_with ( "RLIM64" ) => true ,
3019
2994
@@ -3023,23 +2998,18 @@ fn test_emscripten(target: &str) {
3023
2998
3024
2999
cfg. skip_field_type ( move |struct_, field| {
3025
3000
// This is a weird union, don't check the type.
3026
- // FIXME: is this necessary?
3027
3001
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
3028
3002
// sighandler_t type is super weird
3029
- // FIXME: is this necessary?
3030
3003
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
3031
3004
// sigval is actually a union, but we pretend it's a struct
3032
- // FIXME: is this necessary?
3033
3005
( struct_ == "sigevent" && field == "sigev_value" )
3034
3006
} ) ;
3035
3007
3036
3008
cfg. skip_field ( move |struct_, field| {
3037
3009
// this is actually a union on linux, so we can't represent it well and
3038
3010
// just insert some padding.
3039
- // FIXME: is this necessary?
3040
3011
( struct_ == "siginfo_t" && field == "_pad" ) ||
3041
3012
// musl names this __dummy1 but it's still there
3042
- // FIXME: is this necessary?
3043
3013
( struct_ == "glob_t" && field == "gl_flags" ) ||
3044
3014
// FIXME: After musl 1.1.24, it have only one field `sched_priority`,
3045
3015
// while other fields become reserved.
@@ -3051,7 +3021,6 @@ fn test_emscripten(target: &str) {
3051
3021
] . contains ( & field) )
3052
3022
} ) ;
3053
3023
3054
- // FIXME: test linux like
3055
3024
cfg. generate ( "../src/lib.rs" , "main.rs" ) ;
3056
3025
}
3057
3026
0 commit comments