Welcome! Log In Create A New Profile

Advanced

[nginx] Win32: MSVC 2013 compatibility.

Maxim Dounin
February 13, 2014 07:56AM
details: http://hg.nginx.org/nginx/rev/bfe536716dbf
branches:
changeset: 5577:bfe536716dbf
user: Maxim Dounin <mdounin@mdounin.ru>
date: Thu Feb 13 16:54:00 2014 +0400
description:
Win32: MSVC 2013 compatibility.

Warnings about GetVersionEx() deprecation silenced. Precompiled object
linked in.

diffstat:

auto/cc/msvc | 1 +
src/os/win32/ngx_win32_init.c | 8 ++++++++
2 files changed, 9 insertions(+), 0 deletions(-)

diffs (36 lines):

diff --git a/auto/cc/msvc b/auto/cc/msvc
--- a/auto/cc/msvc
+++ b/auto/cc/msvc
@@ -106,6 +106,7 @@ fi

# precompiled headers
CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
+CORE_LINK="$NGX_OBJS/ngx_pch.obj"
NGX_PCH="$NGX_OBJS/ngx_config.pch"
NGX_BUILD_PCH="-Ycngx_config.h -Fp$NGX_OBJS/ngx_config.pch"
NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch"
diff --git a/src/os/win32/ngx_win32_init.c b/src/os/win32/ngx_win32_init.c
--- a/src/os/win32/ngx_win32_init.c
+++ b/src/os/win32/ngx_win32_init.c
@@ -71,6 +71,10 @@ ngx_os_init(ngx_log_t *log)
ngx_memzero(&osvi, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);

+#ifdef _MSC_VER
+#pragma warning(disable:4996)
+#endif
+
osviex = GetVersionEx((OSVERSIONINFO *) &osvi);

if (osviex == 0) {
@@ -82,6 +86,10 @@ ngx_os_init(ngx_log_t *log)
}
}

+#ifdef _MSC_VER
+#pragma warning(default:4996)
+#endif
+
/*
* Windows 3.1 Win32s 0xxxxx
*

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Win32: MSVC 2013 compatibility.

Maxim Dounin 959 February 13, 2014 07:56AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 174
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready