add include guards for stdio bits in cbindgen

This commit is contained in:
auronandace
2026-04-22 09:56:16 +01:00
parent b7989acb58
commit bbb3e08647
+5
View File
@@ -1,6 +1,9 @@
sys_includes = ["stdarg.h", "stddef.h", "stdint.h", "sys/types.h", "features.h"]
include_guard = "_RELIBC_STDIO_H"
trailer = """
#ifndef _RELIBC_BITS_STDIO_H
#define _RELIBC_BITS_STDIO_H
// XXX: this is only here because cbindgen can't handle string constants
#define P_tmpdir "/tmp"
@@ -13,6 +16,8 @@ typedef struct FILE FILE;
#define stdin stdin
#define stdout stdout
#define stderr stderr
#endif // _RELIBC_BITS_STDIO_H
"""
language = "C"
style = "Type"