test: remove dead code
This commit is contained in:
parent
9322dd1724
commit
e2a794e346
@ -37,35 +37,13 @@
|
||||
#include <sys/select.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <mach-o/dyld.h> /* _NSGetExecutablePath */
|
||||
|
||||
static void get_executable_path() {
|
||||
uint32_t bufsize = sizeof(executable_path);
|
||||
_NSGetExecutablePath(executable_path, &bufsize);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
static void get_executable_path() {
|
||||
if (!executable_path[0]) {
|
||||
readlink("/proc/self/exe", executable_path, PATHMAX - 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Do platform-specific initialization. */
|
||||
void platform_init(int argc, char **argv) {
|
||||
/* Disable stdio output buffering. */
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
setvbuf(stderr, NULL, _IONBF, 0);
|
||||
#ifdef get_executable_path
|
||||
get_executable_path();
|
||||
#else
|
||||
strcpy(executable_path, argv[0]);
|
||||
#endif
|
||||
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user