summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE/ace/OS_NS_sys_utsname.cpp3
-rw-r--r--ACE/ace/Object_Manager_Base.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/ACE/ace/OS_NS_sys_utsname.cpp b/ACE/ace/OS_NS_sys_utsname.cpp
index 10d531792d0..f2e6db46560 100644
--- a/ACE/ace/OS_NS_sys_utsname.cpp
+++ b/ACE/ace/OS_NS_sys_utsname.cpp
@@ -24,11 +24,12 @@ ACE_OS::uname (ACE_utsname *name)
# if defined (ACE_HAS_WIN32_GETVERSION)
/* Since MS found it necessary to deprecate these. */
+# pragma warning(push)
# pragma warning(disable:4996)
ACE_TEXT_OSVERSIONINFO vinfo;
vinfo.dwOSVersionInfoSize = sizeof(ACE_TEXT_OSVERSIONINFO);
ACE_TEXT_GetVersionEx (&vinfo);
-# pragma warning(enable:4996)
+# pragma warning(pop)
# endif
SYSTEM_INFO sinfo;
diff --git a/ACE/ace/Object_Manager_Base.cpp b/ACE/ace/Object_Manager_Base.cpp
index da0fde21b4d..dfb1c1fa927 100644
--- a/ACE/ace/Object_Manager_Base.cpp
+++ b/ACE/ace/Object_Manager_Base.cpp
@@ -258,11 +258,12 @@ ACE_OS_Object_Manager::init (void)
# if defined (ACE_WIN32) && defined (ACE_HAS_WIN32_GETVERSION)
/* Since MS found it necessary to deprecate these. */
+# pragma warning(push)
# pragma warning(disable:4996)
ACE_OS::win32_versioninfo_.dwOSVersionInfoSize =
sizeof (ACE_TEXT_OSVERSIONINFO);
ACE_TEXT_GetVersionEx (&ACE_OS::win32_versioninfo_);
-# pragma warning(enable:4996)
+# pragma warning(pop)
# endif /* ACE_WIN32 */
return 0;
} else {