disambiguate include guards and export C strings

This commit is contained in:
auronandace
2026-04-29 10:36:13 +01:00
parent a7961e69d7
commit 323061f51c
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_utsname.h.html
#
# There are no spec quotations relating to includes
include_guard = "_SYS_UTSNAME_H"
include_guard = "_RELIBC_SYS_UTSNAME_H"
language = "C"
style = "Tag"
no_includes = true
+7 -1
View File
@@ -1,7 +1,13 @@
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/tar.h.html
#
# There are no spec quotations relating to includes
include_guard = "_TAR_H"
include_guard = "_RELIBC_TAR_H"
# cbindgen cannot export Rust &str
after_includes = """
#define TMAGIC "ustar"
#define TVERSION "00"
"""
language = "C"
style = "Tag"
no_includes = true
+2
View File
@@ -54,8 +54,10 @@ pub const FIFOTYPE: u8 = b'6'; // FIFO special
pub const CONTTYPE: u8 = b'7'; // Contiguous file
/// tar format magic and version
/// cbindgen:ignore
pub const TMAGIC: &str = "ustar"; // Magic string : ustar and a null
pub const TMAGLEN: usize = 6; // Length of the magic string
/// cbindgen:ignore
pub const TVERSION: &str = "00"; // Version string
pub const TVERSLEN: usize = 2; // Length of the version string