aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher N. Hesse <raymanfx@gmail.com>2017-09-30 00:56:24 +0200
committerChristopher N. Hesse <raymanfx@gmail.com>2017-10-22 23:03:40 +0200
commitc0c852bd6fe462b148475476d9124fd740eba160 (patch)
tree29a42cad55ab8e2118c16a41e45152fc4685fb27
parent32b7068f2f26e205df7d77cf3b1e2e3cd996ebf2 (diff)
downloadbison-c0c852bd6fe462b148475476d9124fd740eba160.tar.gz
lib: vasnprintf: Fix illegal instruction
With format string strictness, High Sierra also enforces that %n isn't used in dynamic format strings, but we should just disable its use on darwin in general. Change-Id: I48eb1ec4f4667bedba6125b0ca8252cd15b32c67
-rw-r--r--lib/vasnprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index e6fc5233..06a789d7 100644
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -4870,7 +4870,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#endif
*fbp = dp->conversion;
#if USE_SNPRINTF
-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
fbp[3] = '\0';