Skip to content
Snippets Groups Projects
Commit 01bda6a8 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Work around GetVersionEx deprecation warning/error

For some reason this deprecation warning is being treated as an error (and only with newer Windows platform SDKs). Just disable this warning for the GetVersionEx line.
See https://stackoverflow.com/questions/22303824/warning-c4996-getversionexw-was-declared-deprecated for details.
parent 717592bc
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
/* General cross-platform development wrappers */
/* $Id: genwrap.c,v 1.118 2020/08/10 04:11:44 rswindell Exp $ */
// vi: tabstop=4
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
......@@ -35,7 +32,7 @@
****************************************************************************/
#include <string.h> /* strlen() */
#include <stdarg.h> /* vsnprintf() */
#include <stdarg.h> /* vsnprintf() */
#include <stdlib.h> /* RAND_MAX */
#include <fcntl.h> /* O_NOCTTY */
#include <time.h> /* clock() */
......@@ -622,6 +619,7 @@ char* os_version(char *str)
OSVERSIONINFO winver;
winver.dwOSVersionInfoSize=sizeof(winver);
#pragma warning(suppress : 4996)
GetVersionEx(&winver);
switch(winver.dwPlatformId) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment