pineapple-src/externals/libressl/crypto/compat/getprogname_windows.c

14 lines
238 B
C
Raw Normal View History

2020-12-28 16:15:37 +01:00
#include <stdlib.h>
#include <windows.h>
const char *
getprogname(void)
{
static char progname[MAX_PATH + 1];
DWORD length = GetModuleFileName(NULL, progname, sizeof (progname) - 1);
if (length < 0)
return "?";
return progname;
}