File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -158,12 +158,15 @@ cfg_if! {
158
158
pub type uintptr_t = usize ;
159
159
pub type ssize_t = isize ;
160
160
161
+ #[ cfg( not( target_env = "sgx" ) ) ]
161
162
pub enum FILE { }
163
+ #[ cfg( not( target_env = "sgx" ) ) ]
162
164
pub enum fpos_t { } // TODO: fill this out with a struct
163
165
164
166
pub const INT_MIN : c_int = -2147483648 ;
165
167
pub const INT_MAX : c_int = 2147483647 ;
166
168
169
+ #[ cfg( not( target_env = "sgx" ) ) ]
167
170
extern {
168
171
pub fn isalnum( c: c_int) -> c_int;
169
172
pub fn isalpha( c: c_int) -> c_int;
@@ -284,7 +287,7 @@ cfg_if! {
284
287
285
288
// These are all inline functions on android, so they end up just being entirely
286
289
// missing on that platform.
287
- #[ cfg( not( target_os = "android" ) ) ]
290
+ #[ cfg( not( any ( target_os = "android" , target_env = "sgx" ) ) ) ]
288
291
extern {
289
292
pub fn abs( i: c_int) -> c_int;
290
293
pub fn atof( s: * const c_char) -> c_double;
@@ -314,6 +317,9 @@ cfg_if! {
314
317
} else if #[ cfg( unix) ] {
315
318
mod unix;
316
319
pub use unix:: * ;
320
+ } else if #[ cfg( target_env = "sgx" ) ] {
321
+ mod sgx;
322
+ pub use sgx:: * ;
317
323
} else {
318
324
// Unknown target_family
319
325
}
Original file line number Diff line number Diff line change
1
+ pub type c_char = i8 ;
2
+ pub type c_long = i64 ;
3
+ pub type c_ulong = u64 ;
You can’t perform that action at this time.
0 commit comments