more cross platform

This commit is contained in:
dignifiedquire
2019-04-26 23:07:18 +03:00
parent d06117dcdf
commit d58323a656
5 changed files with 51 additions and 33 deletions

View File

@@ -24,9 +24,17 @@ pub struct dc_key_t {
#[no_mangle]
#[inline]
#[cfg(target_os = "macos")]
pub unsafe extern "C" fn toupper(mut _c: libc::c_int) -> libc::c_int {
return __toupper(_c);
}
#[no_mangle]
#[inline]
#[cfg(not(target_os = "macos"))]
pub unsafe extern "C" fn toupper(mut _c: libc::c_int) -> libc::c_int {
return _toupper(_c);
}
#[no_mangle]
pub unsafe extern "C" fn dc_key_new() -> *mut dc_key_t {
let mut key: *mut dc_key_t = 0 as *mut dc_key_t;