summaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-23 21:17:15 +0000
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-23 21:17:15 +0000
commite1150b06d0409baf4b71121be0cafeab180f2858 (patch)
tree653ae282650fbf9b6ae0cf8824160ca78993a7b0 /libstdc++-v3/configure
parent2623625f033ac40b5b72064a2031ba8fb078d3bd (diff)
downloadgcc-e1150b06d0409baf4b71121be0cafeab180f2858.tar.gz
2014-01-23 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
Steve Ellcey <sellcey@mips.com> * acinclude.m4 (GLIBCXX_CHECK_TMPNAM): New check for tmpnam function. * configure.ac: Use GLIBCXX_CHECK_TMPNAM. * (configure, config.h.in): Regenerate. * include/c_global/cstdio: Guard ::tmpnam with _GLIBCXX_USE_TMPNAM git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207009 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure75
1 files changed, 75 insertions, 0 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 448bee3fc0b..d2799511774 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -20120,6 +20120,81 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# Check for tmpnam which is obsolescent in POSIX.1-2008
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tmpnam" >&5
+$as_echo_n "checking for tmpnam... " >&6; }
+ if test "${glibcxx_cv_TMPNAM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x$gcc_no_link = xyes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+char *tmp = tmpnam(NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_TMPNAM=yes
+else
+ glibcxx_cv_TMPNAM=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+char *tmp = tmpnam(NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ glibcxx_cv_TMPNAM=yes
+else
+ glibcxx_cv_TMPNAM=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+fi
+
+ if test $glibcxx_cv_TMPNAM = yes; then
+
+$as_echo "#define _GLIBCXX_USE_TMPNAM 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_TMPNAM" >&5
+$as_echo "$glibcxx_cv_TMPNAM" >&6; }
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
if test "x$ac_cv_header_locale_h" = x""yes; then :