Updated the library to Rust 2024.

This commit is contained in:
2025-07-29 23:49:03 -04:00
parent 19c15f8aff
commit 9f9d02155a
7 changed files with 10 additions and 11 deletions

View File

@ -182,7 +182,7 @@ fn set_errno(errnum: i32)
// The function to get the errno memory location.
extern
unsafe extern "C"
{
fn __errno_location() -> *mut CInt;
}

View File

@ -3,7 +3,7 @@ use binding::{CFloat, CDouble, CInt};
// Taken from: https://en.wikipedia.org/wiki/C_mathematical_functions
#[link(name="m")]
extern
unsafe extern "C"
{
// Basic functions.
pub fn fabs(arg: CDouble) -> CDouble;

View File

@ -8,7 +8,7 @@ pub enum FILE
extern
unsafe extern "C"
{
pub fn fileno(stream: *mut FILE) -> CInt;
pub fn fopen(filename: *const CChar, mode: *const CChar) -> *mut FILE;

View File

@ -2,7 +2,7 @@ use binding::CVoid;
#[link(name="c")]
extern
unsafe extern "C"
{
pub fn calloc(nobj: usize, size: usize) -> *mut CVoid;
pub fn malloc(size: usize) -> *mut CVoid;

View File

@ -5,7 +5,7 @@ use crate::stddef::{size_t, wchar_t};
#[cfg(not(feature="no_mem_manip"))]
#[link(name="c")]
extern
unsafe extern "C"
{
/// Copies the values of n bytes from the location pointed to by
/// src directly to the memory block pointed to by dest.
@ -56,7 +56,7 @@ extern
}
#[link(name="c")]
extern
unsafe extern "C"
{
pub fn strcpy(dst: *mut CChar, src: *const CChar) -> *mut CChar;
pub fn strncpy(dst: *mut CChar, src: *const CChar,

View File

@ -46,7 +46,7 @@ pub struct LocalTime
#[link(name="c")]
extern
unsafe extern "C"
{
/// Uses the value pointed by time to fill a LocalTime structure with
/// the values that represent the corresponding time, expressed