summaryrefslogtreecommitdiffstats
path: root/win/nmakehlp.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-05-16 10:19:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-05-16 10:19:41 (GMT)
commit8f8a3bc1c00622bd15dd1a9d1dd06a906ed64f4e (patch)
tree563d48381329088a399fe9bd6d00b348dc948c3f /win/nmakehlp.c
parentdb43c8cbed9e1d40d644e2ecb9112606d4a528bd (diff)
downloadtcl-8f8a3bc1c00622bd15dd1a9d1dd06a906ed64f4e.zip
tcl-8f8a3bc1c00622bd15dd1a9d1dd06a906ed64f4e.tar.gz
tcl-8f8a3bc1c00622bd15dd1a9d1dd06a906ed64f4e.tar.bz2
Only use _snprintf on older MSVC compilers. ZeroMemory -> memset
Diffstat (limited to 'win/nmakehlp.c')
-rw-r--r--win/nmakehlp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index 0ebaf63..4d95662 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -4,8 +4,8 @@
*
* This is used to fix limitations within nmake and the environment.
*
- * Copyright (c) 2002 by David Gravereaux.
- * Copyright (c) 2006 by Pat Thoyts
+ * Copyright (c) 2002 David Gravereaux.
+ * Copyright (c) 2006 Pat Thoyts
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -31,7 +31,7 @@
#endif
/* ISO hack for dumb VC++ */
-#ifdef _MSC_VER
+#if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
@@ -207,13 +207,13 @@ CheckForCompilerFeature(
hProcess = GetCurrentProcess();
- ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
- ZeroMemory(&si, sizeof(STARTUPINFO));
+ memset(&pi, 0, sizeof(PROCESS_INFORMATION));
+ memset(&si, 0, sizeof(STARTUPINFO));
si.cb = sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdInput = INVALID_HANDLE_VALUE;
- ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
+ memset(&sa, 0, sizeof(SECURITY_ATTRIBUTES));
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = FALSE;
@@ -343,13 +343,13 @@ CheckForLinkerFeature(
hProcess = GetCurrentProcess();
- ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
- ZeroMemory(&si, sizeof(STARTUPINFO));
+ memset(&pi, 0, sizeof(PROCESS_INFORMATION));
+ memset(&si, 0, sizeof(STARTUPINFO));
si.cb = sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdInput = INVALID_HANDLE_VALUE;
- ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES));
+ memset(&sa, 0, sizeof(SECURITY_ATTRIBUTES));
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = NULL;
sa.bInheritHandle = TRUE;