aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely.gcc@gmail.com>2012-11-23 22:11:23 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2012-11-23 22:11:23 +0000
commitaa66b299c8e766fb453279b55efcdd64d4ef360c (patch)
treebd11ed625b040c97f7b7dc87865300f4d68dbf00 /libstdc++-v3/configure
parent9cb5411c1729695a586eaf1d47a42540560387e2 (diff)
downloadgcc-aa66b299c8e766fb453279b55efcdd64d4ef360c.zip
gcc-aa66b299c8e766fb453279b55efcdd64d4ef360c.tar.gz
gcc-aa66b299c8e766fb453279b55efcdd64d4ef360c.tar.bz2
re PR libstdc++/52680 (std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP)
PR libstdc++/52680 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Check for usleep and sleep if nanosleep is not available. Bump libtool revision. * config.h.in: Regenerate. * configure: Likewise. * config/abi/pre/gnu.ver (GLIBCXX_3.4.18): Add __sleep_for. * include/std/thread (this_thread::__sleep_for): Add. (this_thread::yield, this_thread::sleep_until, this_thread::sleep_for): Declare unconditionally. * src/c++11/thread.cc (this_thread::__sleep_for): Define. * testsuite/lib/libstdc++.exp (check_v3_target_nanosleep): Rename to check_v3_target_sleep. * testsuite/lib/dg-options.exp (dg-require-nanosleep): Rename to dg-require-sleep. * testsuite/30_threads/condition_variable_any/53830.cc: Update. * testsuite/30_threads/this_thread/2.cc: Likewise. * testsuite/30_threads/this_thread/3.cc: Likewise. * testsuite/30_threads/this_thread/4.cc: Likewise. * testsuite/30_threads/async/54297.cc: Likewise. From-SVN: r193769
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure56
1 files changed, 55 insertions, 1 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 5a98ee7..1e7c293 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -19844,6 +19844,60 @@ $as_echo "#define _GLIBCXX_USE_CLOCK_REALTIME 1" >>confdefs.h
$as_echo "#define _GLIBCXX_USE_NANOSLEEP 1" >>confdefs.h
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sleep" >&5
+$as_echo_n "checking for sleep... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main ()
+{
+sleep(1)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_has_sleep=yes
+else
+ ac_has_sleep=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test x"$ac_has_sleep" = x"yes"; then
+
+$as_echo "#define HAVE_SLEEP 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_sleep" >&5
+$as_echo "$ac_has_sleep" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usleep" >&5
+$as_echo_n "checking for usleep... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main ()
+{
+sleep(1);
+ usleep(100);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_has_usleep=yes
+else
+ ac_has_usleep=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test x"$ac_has_usleep" = x"yes"; then
+
+$as_echo "#define HAVE_USLEEP 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_usleep" >&5
+$as_echo "$ac_has_usleep" >&6; }
fi
@@ -70449,7 +70503,7 @@ $as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
fi
# For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:17:0
+libtool_VERSION=6:18:0
# Everything parsed; figure out what files and settings to use.
case $enable_symvers in