From f09ed6f8e3d7dbb4fabea21233e0fd9b1fea959b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 20 Dec 2022 10:20:06 -0800 Subject: [PROPOSED] =?UTF-8?q?Port=20=E2=80=98restrict=E2=80=99=20to=20Vis?= =?UTF-8?q?ual=20Studio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Manuela Friedrich in: https://mm.icann.org/pipermail/tz/2022-December/032455.html * private.h (restrict) [_MSC_VER]: Default to empty. It seems that Microsoft Visual Studio never supported C99, and supports C11 or later only on request. Of the C99 features that tzcode uses, only ‘restrict’ seems to be missing from default Visual Studio. --- private.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/private.h b/private.h index 5043cb8..7fbbb64 100644 --- a/private.h +++ b/private.h @@ -543,7 +543,8 @@ typedef unsigned long uintmax_t; # endif #endif -#if PORT_TO_C89 && __STDC_VERSION__ < 199901 && !defined restrict +#if (__STDC_VERSION__ < 199901 && !defined restrict \ + && (PORT_TO_C89 || defined _MSC_VER)) # define restrict /* empty */ #endif -- 2.38.1