| 717 | # define WIN32_LEAN_AND_MEAN |
| 718 | # include <windows.h> |
| 719 | char * executable_path( char const * argv0 ) |
| 720 | { |
| 721 | char buf[ 1024 ]; |
| 722 | DWORD const ret = GetModuleFileNameA( NULL, buf, sizeof( buf ) ); |
| 723 | return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf ); |
| 724 | } |
| 725 | #elif defined(__APPLE__) /* Not tested */ |
| 726 | # include <mach-o/dyld.h> |
| 727 | char *executable_path( char const * argv0 ) |
no outgoing calls
no test coverage detected