| 610 | # define WIN32_LEAN_AND_MEAN |
| 611 | # include <windows.h> |
| 612 | char * executable_path( char const * argv0 ) |
| 613 | { |
| 614 | char buf[ 1024 ]; |
| 615 | DWORD const ret = GetModuleFileName( NULL, buf, sizeof( buf ) ); |
| 616 | return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf ); |
| 617 | } |
| 618 | #elif defined(__APPLE__) /* Not tested */ |
| 619 | # include <mach-o/dyld.h> |
| 620 | char *executable_path( char const * argv0 ) |
no test coverage detected