Updated the library to Rust 2024.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user