From 382c6e2df802710f74ae2e929587f7ef381646e7 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Sun, 10 Oct 2004 21:54:41 +0000 Subject: [PATCH] functexcept.h: Add guards. 2004-10-10 Benjamin Kosnik * include/bits/functexcept.h: Add guards. * acinclude.m4 (GLIBCXX_ENABLE_THREADS): Tweak test. * configure: Regenerate. From-SVN: r88857 --- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/acinclude.m4 | 11 +++++++++-- libstdc++-v3/configure | 10 ++++++++-- libstdc++-v3/include/bits/functexcept.h | 6 +++++- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 38b332cd19d5..22991298a5a7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2004-10-10 Benjamin Kosnik + + * include/bits/functexcept.h: Add guards. + + * acinclude.m4 (GLIBCXX_ENABLE_THREADS): Tweak test. + * configure: Regenerate. + 2004-10-10 Paolo Carlini * config/locale/gnu/monetary_members.cc (_S_construct_pattern): diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index f45845a7249a..ff775e5b1997 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1726,13 +1726,20 @@ AC_DEFUN([GLIBCXX_ENABLE_THREADS], [ target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'` AC_MSG_RESULT([$target_thread_file]) - enable_thread=no if test $target_thread_file != single; then AC_DEFINE(HAVE_GTHR_DEFAULT) - enable_thread=yes fi glibcxx_thread_h=gthr-$target_thread_file.h + + dnl Check for __GTHREADS define. + gthread_file=${toplevel_srcdir}/gcc/${glibcxx_thread_h} + if grep __GTHREADS $gthread_file >/dev/null 2>&1 ; then + enable_thread=yes + else + enable_thread=no + fi + AC_SUBST(glibcxx_thread_h) ]) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 530efa0c646e..caf27b1b0499 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -7753,17 +7753,23 @@ echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $target_thread_file" >&5 echo "${ECHO_T}$target_thread_file" >&6 - enable_thread=no if test $target_thread_file != single; then cat >>confdefs.h <<\_ACEOF #define HAVE_GTHR_DEFAULT 1 _ACEOF - enable_thread=yes fi glibcxx_thread_h=gthr-$target_thread_file.h + gthread_file=${toplevel_srcdir}/gcc/${glibcxx_thread_h} + if grep __GTHREADS $gthread_file >/dev/null 2>&1 ; then + enable_thread=yes + else + enable_thread=no + fi + + # Check whether --enable-concept-checks or --disable-concept-checks was given. diff --git a/libstdc++-v3/include/bits/functexcept.h b/libstdc++-v3/include/bits/functexcept.h index 8b1d16c8e59a..9e8054ce68a4 100644 --- a/libstdc++-v3/include/bits/functexcept.h +++ b/libstdc++-v3/include/bits/functexcept.h @@ -1,6 +1,6 @@ // Function-Based Exception Support -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2004 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -31,6 +31,9 @@ // ISO C++ 14882: 19.1 Exception classes // +#ifndef _FUNCTEXCEPT_H +#define _FUNCTEXCEPT_H 1 + #include namespace std @@ -83,3 +86,4 @@ namespace std __throw_ios_failure(const char* __s); } // namespace std +#endif -- 2.47.2