Merge branch 'stdio-bits' into 'master'
move stdio bits to cbindgen See merge request redox-os/relibc!1145
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
#ifndef _BITS_STDIO_H
|
||||
#define _BITS_STDIO_H
|
||||
|
||||
// XXX: this is only here because cbindgen can't handle string constants
|
||||
#define P_tmpdir "/tmp"
|
||||
|
||||
typedef struct FILE FILE;
|
||||
|
||||
// A typedef doesn't suffice, because libgmp uses this definition to check if
|
||||
// STDIO was loaded.
|
||||
#define FILE FILE
|
||||
// Likewise, stdin, stdout, and stderr are expected to be macros.
|
||||
#define stdin stdin
|
||||
#define stdout stdout
|
||||
#define stderr stderr
|
||||
|
||||
#endif /* _BITS_STDIO_H */
|
||||
@@ -1,6 +1,19 @@
|
||||
sys_includes = ["stdarg.h", "stddef.h", "stdint.h", "sys/types.h", "features.h"]
|
||||
include_guard = "_RELIBC_STDIO_H"
|
||||
trailer = "#include <bits/stdio.h>"
|
||||
trailer = """
|
||||
// XXX: this is only here because cbindgen can't handle string constants
|
||||
#define P_tmpdir "/tmp"
|
||||
|
||||
typedef struct FILE FILE;
|
||||
|
||||
// A typedef doesn't suffice, because libgmp uses this definition to check if
|
||||
// STDIO was loaded.
|
||||
#define FILE FILE
|
||||
// Likewise, stdin, stdout, and stderr are expected to be macros.
|
||||
#define stdin stdin
|
||||
#define stdout stdout
|
||||
#define stderr stderr
|
||||
"""
|
||||
language = "C"
|
||||
style = "Type"
|
||||
no_includes = true
|
||||
|
||||
@@ -41,7 +41,7 @@ pub const L_tmpnam: c_int = 7;
|
||||
// 36^6 (26 letters + 10 digits) is larger than i32::MAX, so just set to that
|
||||
// for now
|
||||
pub const TMP_MAX: int32_t = 2_147_483_647;
|
||||
// XXX: defined manually in bits/stdio.h as well because cbindgen can't handle
|
||||
// XXX: defined manually in cbindgen as well because it can't handle
|
||||
// string constants in any form AFAICT
|
||||
pub const P_tmpdir: &[u8; 5] = b"/tmp\0";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user