summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/bison/secure_snprintf.patch
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2017-10-12 20:41:57 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2017-10-12 11:41:57 -0700
commit1b53e82348b94105fa1ee01409a27970831de0f7 (patch)
tree3ca84e58c1a734f7086b92e39640e4b68945ead6 /var/spack/repos/builtin/packages/bison/secure_snprintf.patch
parent0dad5b3ee517692ddb0afb32cb0e031d3ec4d78d (diff)
downloadspack-1b53e82348b94105fa1ee01409a27970831de0f7.tar.gz
spack-1b53e82348b94105fa1ee01409a27970831de0f7.tar.bz2
spack-1b53e82348b94105fa1ee01409a27970831de0f7.tar.xz
spack-1b53e82348b94105fa1ee01409a27970831de0f7.zip
various fixes for macOS high sierra (#5647)
* various fixes for macOS high sierra * add macOS_version() helper function * flake8 fixes * update oce and trilinos * fix bison
Diffstat (limited to 'var/spack/repos/builtin/packages/bison/secure_snprintf.patch')
-rw-r--r--var/spack/repos/builtin/packages/bison/secure_snprintf.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/bison/secure_snprintf.patch b/var/spack/repos/builtin/packages/bison/secure_snprintf.patch
new file mode 100644
index 0000000000..0dff749f2a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bison/secure_snprintf.patch
@@ -0,0 +1,15 @@
+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.
+
+--- lib/vasnprintf.c.orig 2017-06-22 15:19:15.000000000 -0700
++++ lib/vasnprintf.c 2017-06-22 15:20:20.000000000 -0700
+@@ -4869,7 +4869,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
+ #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';