From cb594c1c2e48ba2eec2c4ce4195909918ae6187e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 9 Apr 2020 09:44:59 +0200 Subject: [PATCH] winver: Build with msvcrt. Signed-off-by: Alexandre Julliard --- programs/winver/Makefile.in | 3 ++- programs/winver/winver.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/programs/winver/Makefile.in b/programs/winver/Makefile.in index 425f9c5dda2..0caef713865 100644 --- a/programs/winver/Makefile.in +++ b/programs/winver/Makefile.in @@ -1,7 +1,8 @@ MODULE = winver.exe -APPMODE = -mwindows IMPORTS = shell32 +EXTRADLLFLAGS = -mwindows -mno-cygwin + C_SRCS = winver.c RC_SRCS = version.rc diff --git a/programs/winver/winver.c b/programs/winver/winver.c index 96ee25748ab..019eb5248b2 100644 --- a/programs/winver/winver.c +++ b/programs/winver/winver.c @@ -18,11 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include "windows.h" #include "shellapi.h" int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { - return !ShellAboutA(NULL, PACKAGE_NAME, PACKAGE_STRING, 0); + char name[128] = "Wine "; + const char * (CDECL *wine_get_version)(void); + + wine_get_version = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "wine_get_version" ); + if (wine_get_version) strcat( name, wine_get_version() ); + return !ShellAboutA( NULL, name, NULL, 0 ); } -- 2.11.4.GIT