verify monetary header includes
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
sys_includes = ["stddef.h", "stdint.h", "features.h"]
|
||||
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/monetary.h.html
|
||||
#
|
||||
# Spec quotations relating to includes:
|
||||
# - "The <monetary.h> header shall define the locale_t type as described in <locale.h>."
|
||||
# - "The <monetary.h> header shall define the size_t type as described in <stddef.h>."
|
||||
# - "The <monetary.h> header shall define the ssize_t type as described in <sys/types.h>."
|
||||
#
|
||||
# sys/types.h brings in stddef.h
|
||||
sys_includes = ["sys/types.h"]
|
||||
include_guard = "_RELIBC_MONETARY_H"
|
||||
after_includes = """
|
||||
#include <bits/locale-t.h> // for locale_t from locale.h
|
||||
"""
|
||||
language = "C"
|
||||
style = "tag"
|
||||
no_includes = true
|
||||
@@ -7,6 +18,3 @@ cpp_compat = true
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use libm::{fabs, pow, round, trunc};
|
||||
/// Returns:
|
||||
/// - The number of characters written (excluding the null terminator), or -1 if
|
||||
/// an error occurs (e.g., invalid input, buffer overflow)
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn strfmon(
|
||||
s: *mut c_char, // Output buffer
|
||||
maxsize: usize, // Maximum size of the buffer
|
||||
|
||||
Reference in New Issue
Block a user