Skip to content

Commit 1b4a6c8

Browse files
committed
Use libc::c_char instead of i8 due to platforms with unsigned char
1 parent 450554e commit 1b4a6c8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/libstd/sys/unix/backtrace/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ mod printing;
9494
pub mod gnu {
9595
use io;
9696
use fs;
97+
use libc::c_char;
9798

98-
pub fn get_executable_filename() -> io::Result<(Vec<i8>, fs::File)> {
99+
pub fn get_executable_filename() -> io::Result<(Vec<c_char>, fs::File)> {
99100
Err(io::Error::new(io::ErrorKind::Other, "Not implemented"))
100101
}
101102
}

src/libstd/sys/windows/backtrace_gnu.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use io;
1212
use sys::c;
13+
use libc::c_char;
1314
use path::PathBuf;
1415
use fs::{OpenOptions, File};
1516
use sys::ext::fs::OpenOptionsExt;
@@ -53,7 +54,7 @@ fn lock_and_get_executable_filename() -> io::Result<(PathBuf, File)> {
5354
// Get the executable filename for libbacktrace
5455
// This returns the path in the ANSI code page and a File which should remain open
5556
// for as long as the path should remain valid
56-
pub fn get_executable_filename() -> io::Result<(Vec<i8>, File)> {
57+
pub fn get_executable_filename() -> io::Result<(Vec<c_char>, File)> {
5758
let (executable, file) = lock_and_get_executable_filename()?;
5859
let u16_executable = to_u16s(executable.into_os_string())?;
5960
Ok((wide_char_to_multi_byte(c::CP_ACP, c::WC_NO_BEST_FIT_CHARS,

0 commit comments

Comments
 (0)