diff options
author | becker33 <becker33@llnl.gov> | 2016-09-02 16:46:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-02 16:46:40 -0700 |
commit | fa310c825d56d738a52b892f3679626f9d57203c (patch) | |
tree | ae466733c1ab170e1b87da5ae360088b8760624b /var | |
parent | 6de191a9267ff4e643a99b930752ce42db45797e (diff) | |
parent | 0bd63ce8befc8b7f0ac6e9158aa0610739549b9b (diff) | |
download | spack-fa310c825d56d738a52b892f3679626f9d57203c.tar.gz spack-fa310c825d56d738a52b892f3679626f9d57203c.tar.bz2 spack-fa310c825d56d738a52b892f3679626f9d57203c.tar.xz spack-fa310c825d56d738a52b892f3679626f9d57203c.zip |
Merge pull request #1704 from eschnett/eschnett/libiconf-gets
Make libiconv work with C11
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/libiconv/gets.patch | 13 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/libiconv/package.py | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libiconv/gets.patch b/var/spack/repos/builtin/packages/libiconv/gets.patch new file mode 100644 index 0000000000..7c4b5562ec --- /dev/null +++ b/var/spack/repos/builtin/packages/libiconv/gets.patch @@ -0,0 +1,13 @@ +--- a/srclib/stdio.in.h ++++ b/srclib/stdio.in.h +@@ -692,10 +692,6 @@ + # undef gets + # endif + _GL_CXXALIASWARN (gets); +-/* It is very rare that the developer ever has full control of stdin, +- so any use of gets warrants an unconditional warning. Assume it is +- always declared, since it is required by C89. */ +-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif + + diff --git a/var/spack/repos/builtin/packages/libiconv/package.py b/var/spack/repos/builtin/packages/libiconv/package.py index f2eeb07b26..982929b80a 100644 --- a/var/spack/repos/builtin/packages/libiconv/package.py +++ b/var/spack/repos/builtin/packages/libiconv/package.py @@ -34,6 +34,10 @@ class Libiconv(Package): version('1.14', 'e34509b1623cec449dfeb73d7ce9c6c6') + # We cannot set up a warning for gets(), since gets() is not part + # of C11 any more and thus might not exist. + patch("gets.patch") + def install(self, spec, prefix): configure('--prefix={0}'.format(prefix), '--enable-extra-encodings') |