remove more C headers
parent
dc2c62807a
commit
7de95a642e
|
@ -14,9 +14,13 @@ fn C.isdigit(s byteptr) bool
|
|||
|
||||
|
||||
|
||||
// <execinfo.h>
|
||||
fn backtrace(a voidptr, b int) int
|
||||
fn backtrace_symbols_fd(voidptr, int, int)
|
||||
|
||||
// <libproc.h>
|
||||
fn proc_pidpath(int, voidptr, int) int
|
||||
|
||||
|
||||
|
||||
// Windows
|
||||
|
|
|
@ -19,21 +19,6 @@ CommonCHeaders = '
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <libproc.h> // proc_pidpath
|
||||
//#include <execinfo.h> // backtrace and backtrace_symbols_fd
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
//#if !defined(__BIONIC__) && !defined(__GNUC_PREREQ)
|
||||
//#include <execinfo.h> // backtrace and backtrace_symbols_fd
|
||||
//#endif
|
||||
|
||||
#pragma weak backtrace
|
||||
#pragma weak backtrace_symbols_fd
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h> // os__wait uses wait on nix
|
||||
|
|
|
@ -12,8 +12,8 @@ import strings
|
|||
|
||||
/*
|
||||
struct dirent {
|
||||
d_ino int
|
||||
d_off int
|
||||
d_ino int
|
||||
d_off int
|
||||
d_reclen u16
|
||||
d_type byte
|
||||
d_name [256]byte
|
||||
|
@ -700,7 +700,7 @@ pub fn executable() string {
|
|||
$if mac {
|
||||
mut result := malloc(MAX_PATH)
|
||||
pid := C.getpid()
|
||||
ret := C.proc_pidpath (pid, result, MAX_PATH)
|
||||
ret := proc_pidpath (pid, result, MAX_PATH)
|
||||
if ret <= 0 {
|
||||
println('os.executable() failed')
|
||||
return '.'
|
||||
|
|
Loading…
Reference in New Issue