File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,13 @@ fn try_gen_api(dst: &Path, pointer_size: usize) -> bool {
27
27
}
28
28
29
29
fn main ( ) {
30
- // get size of C pointer
31
- let target_pointer_width = match env:: var ( "CARGO_CFG_TARGET_POINTER_WIDTH" ) {
32
- Ok ( ref val) if val == "32" => 4 ,
33
- Ok ( ref val) if val == "64" => 8 ,
34
- Ok ( ref val) => panic ! ( "Unsupported target pointer width: {}" , val) ,
35
- Err ( err) => panic ! (
30
+ // get size of C long
31
+ let long_width = match ( env:: var ( "CARGO_CFG_TARGET_POINTER_WIDTH" ) , env:: var ( "CARGO_CFG_TARGET_OS" ) ) {
32
+ ( _, Ok ( ref os) ) if os == "windows" => 4 ,
33
+ ( Ok ( ref val) , _) if val == "32" => 4 ,
34
+ ( Ok ( ref val) , _) if val == "64" => 8 ,
35
+ ( Ok ( ref val) , _) => panic ! ( "Unsupported target pointer width: {}" , val) ,
36
+ ( Err ( err) , _) => panic ! (
36
37
"An error occurred while determining the pointer width to compile `rustler_sys` for:\n \n {:?}\n \n Please report a bug." ,
37
38
err
38
39
) ,
You can’t perform that action at this time.
0 commit comments