diff --git a/GNUmakefile.msvc b/GNUmakefile.msvc index 327becff..17026991 100644 --- a/GNUmakefile.msvc +++ b/GNUmakefile.msvc @@ -91,7 +91,7 @@ CFLAGS += \ LDFLAGS += \ /dll \ /debug \ - /largeadressaware /nologo \ + /largeaddressaware /nologo \ user32.lib kernel32.lib gdi32.lib comctl32.lib uxtheme.lib msimg32.lib comdlg32.lib d2d1.lib ole32.lib oleaut32.lib oleacc.lib uuid.lib OUT = $(OUTDIR)/$(NAME)$(SUFFIX) diff --git a/windows/datetimepicker.c b/windows/datetimepicker.c index 44f3f3ed..efc4eaa2 100644 --- a/windows/datetimepicker.c +++ b/windows/datetimepicker.c @@ -95,7 +95,7 @@ static void setDateTimeFormat(HWND hwnd) n = _scwprintf(L"%s %s", date, time); datetime = (WCHAR *) uiAlloc((n + 1) * sizeof (WCHAR), "WCHAR[]"); - snwprintf(datetime, n + 1, L"%s %s", date, time); + _snwprintf(datetime, n + 1, L"%s %s", date, time); if (SendMessageW(hwnd, DTM_SETFORMAT, 0, (LPARAM) datetime) == 0) logLastError("error applying format string to date/time picker in setDateTimeFormat()"); diff --git a/windows/init.c b/windows/init.c index e2c95338..16f1cd38 100644 --- a/windows/init.c +++ b/windows/init.c @@ -37,7 +37,7 @@ static const char *initerr(const char *message, const WCHAR *label, DWORD value) wmessage = toUTF16(message); n = _scwprintf(initErrorFormat, initErrorArgs); wstr = (WCHAR *) uiAlloc((n + 1) * sizeof (WCHAR), "WCHAR[]"); - snwprintf(wstr, n + 1, initErrorFormat, initErrorArgs); + _snwprintf(wstr, n + 1, initErrorFormat, initErrorArgs); str = toUTF8(wstr); uiFree(wstr); if (hassysmsg) diff --git a/windows/winapi.h b/windows/winapi.h index a918cabc..e6be40b1 100644 --- a/windows/winapi.h +++ b/windows/winapi.h @@ -17,6 +17,8 @@ #define _WIN32_IE 0x0700 /* according to Microsoft's sdkddkver.h */ #define NTDDI_VERSION 0x06000000 /* according to Microsoft's sdkddkver.h */ #include +// Microsoft's resource compiler will segfault if we feed it headers it was not designed to handle +#ifndef RC_INVOKED #include #include #include @@ -32,3 +34,4 @@ #include #include #include +#endif