File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,17 @@ extern "C" {
3030 fn c_tzset ( ) ;
3131}
3232
33+ #[ cfg( target_env = "msvc" ) ]
34+ #[ cfg( not( target_arch = "wasm32" ) ) ]
35+ extern "C" {
36+ #[ link_name = "__daylight" ]
37+ static c_daylight: std:: ffi:: c_int ;
38+ #[ link_name = "__timezone" ]
39+ static c_timezone: std:: ffi:: c_long ;
40+ #[ link_name = "__tzname" ]
41+ static c_tzname: [ * const std:: ffi:: c_char ; 2 ] ;
42+ }
43+
3344#[ pymodule( name = "time" , with( platform) ) ]
3445mod decl {
3546 use crate :: {
@@ -157,22 +168,19 @@ mod decl {
157168 // unsafe { super::_tzset() };
158169 // }
159170
160- #[ cfg( not( target_env = "msvc" ) ) ]
161171 #[ cfg( not( target_arch = "wasm32" ) ) ]
162172 #[ pyattr]
163173 fn timezone ( _vm : & VirtualMachine ) -> std:: ffi:: c_long {
164174 unsafe { super :: c_timezone }
165175 }
166176
167177 #[ cfg( not( target_os = "freebsd" ) ) ]
168- #[ cfg( not( target_env = "msvc" ) ) ]
169178 #[ cfg( not( target_arch = "wasm32" ) ) ]
170179 #[ pyattr]
171180 fn daylight ( _vm : & VirtualMachine ) -> std:: ffi:: c_int {
172181 unsafe { super :: c_daylight }
173182 }
174183
175- #[ cfg( not( target_env = "msvc" ) ) ]
176184 #[ cfg( not( target_arch = "wasm32" ) ) ]
177185 #[ pyattr]
178186 fn tzname ( vm : & VirtualMachine ) -> crate :: builtins:: PyTupleRef {
You can’t perform that action at this time.
0 commit comments