Skip to content

Commit

Permalink
test: remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Nov 11, 2011
1 parent 9322dd1 commit e2a794e
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions test/runner-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit e2a794e

Please sign in to comment.