@@ -86,7 +86,7 @@ export types, funcs, consts;
8686// you can write more-platform-agnostic code if you stick to just these
8787// symbols.
8888
89- export c_double, c_void, FILE , fpos_t;
89+ export c_float , c_double, c_void, FILE , fpos_t;
9090export DIR , dirent;
9191export c_char, c_schar, c_uchar;
9292export c_short, c_ushort, c_int, c_uint, c_long, c_ulong;
@@ -123,7 +123,6 @@ mod types {
123123 // Standard types that are opaque or common, so are not per-target.
124124 mod common {
125125 mod c95 {
126- type c_double = float ;
127126 enum c_void { }
128127 enum FILE { }
129128 enum fpos_t { }
@@ -154,6 +153,8 @@ mod types {
154153 type c_uint = u32 ;
155154 type c_long = i32 ;
156155 type c_ulong = u32 ;
156+ type c_float = f32 ;
157+ type c_double = f64 ;
157158 type size_t = u32 ;
158159 type ptrdiff_t = i32 ;
159160 type clock_t = i32 ;
@@ -196,6 +197,8 @@ mod types {
196197 type c_uint = u32 ;
197198 type c_long = i64 ;
198199 type c_ulong = u64 ;
200+ type c_float = f32 ;
201+ type c_double = f64 ;
199202 type size_t = u64 ;
200203 type ptrdiff_t = i64 ;
201204 type clock_t = i64 ;
@@ -241,6 +244,8 @@ mod types {
241244 type c_uint = u32 ;
242245 type c_long = i64 ;
243246 type c_ulong = u64 ;
247+ type c_float = f32 ;
248+ type c_double = f64 ;
244249 type size_t = u64 ;
245250 type ptrdiff_t = i64 ;
246251 type clock_t = i32 ;
@@ -286,6 +291,8 @@ mod types {
286291 type c_uint = u32 ;
287292 type c_long = i32 ;
288293 type c_ulong = u32 ;
294+ type c_float = f32 ;
295+ type c_double = f64 ;
289296 type size_t = u32 ;
290297 type ptrdiff_t = i32 ;
291298 type clock_t = i32 ;
@@ -358,6 +365,8 @@ mod types {
358365 type c_uint = u32 ;
359366 type c_long = i32 ;
360367 type c_ulong = u32 ;
368+ type c_float = f32 ;
369+ type c_double = f64 ;
361370 type size_t = u32 ;
362371 type ptrdiff_t = i32 ;
363372 type clock_t = u32 ;
@@ -400,6 +409,8 @@ mod types {
400409 type c_uint = u32 ;
401410 type c_long = i64 ;
402411 type c_ulong = u64 ;
412+ type c_float = f32 ;
413+ type c_double = f64 ;
403414 type size_t = u64 ;
404415 type ptrdiff_t = i64 ;
405416 type clock_t = u64 ;
@@ -841,6 +852,9 @@ mod funcs {
841852
842853 #[ link_name = "_fdopen" ]
843854 fn fdopen ( fd : c_int , mode : * c_char ) -> * FILE ;
855+
856+ #[ link_name = "_fileno" ]
857+ fn fileno ( stream : * FILE ) -> c_int ;
844858 }
845859
846860 #[ nolink]
@@ -942,6 +956,7 @@ mod funcs {
942956 fn popen ( command : * c_char , mode : * c_char ) -> * FILE ;
943957 fn pclose ( stream : * FILE ) -> c_int ;
944958 fn fdopen ( fd : c_int , mode : * c_char ) -> * FILE ;
959+ fn fileno ( stream : * FILE ) -> c_int ;
945960 }
946961
947962 #[ nolink]
0 commit comments