From 80ba65e830589b2b4e77112445ab03a3ce1de773 Mon Sep 17 00:00:00 2001 From: Iouri Kharon Date: Wed, 7 Aug 2019 17:59:29 -0700 Subject: [PATCH] msvc.h: Allow building with MSVC versions older than 1700 Bug report 3392570. Signed-off-by: H. Peter Anvin (Intel) --- config/msvc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/msvc.h b/config/msvc.h index 631652ef..55c4e3d0 100644 --- a/config/msvc.h +++ b/config/msvc.h @@ -93,7 +93,7 @@ /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 #if _MSC_VER < 1900 -# define snprintf _snprinf +# define snprintf _snprintf #endif /* Define to 1 if you have the `_chsize' function. */ @@ -187,6 +187,10 @@ /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ +#if _MSC_VER >= 1700 #define restrict __restrict +#else +#define restrict +#endif #endif /* NASM_CONFIG_MSVC_H */