diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-10 23:12:10 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-10 23:12:10 +0000 |
commit | 5b2ebdb82a1ca67d0a0bd4d74a9ced6d953438aa (patch) | |
tree | f5c574cfe37cda929e504c694d080f546dd59764 /libstdc++-v3 | |
parent | ce1a5edb40c333df6a92d135351a34f085b329ac (diff) | |
download | gcc-5b2ebdb82a1ca67d0a0bd4d74a9ced6d953438aa.tar.gz |
2012-10-10 Jack Howarth <howarth@bromo.med.uc.edu>
Jonathan Wakely <jwakely.gcc@gmail.com>
* config/os/bsd/darwin/os_defines.h: Define _GLIBCXX_USE_NANOSLEEP
and _GLIBCXX_USE_SCHED_YIELD.
* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192335 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 5 | ||||
-rw-r--r-- | libstdc++-v3/config/os/bsd/darwin/os_defines.h | 5 |
3 files changed, 17 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index da8a0847e81..d99010fa137 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2012-10-10 Jack Howarth <howarth@bromo.med.uc.edu> + Jonathan Wakely <jwakely.gcc@gmail.com> + + * config/os/bsd/darwin/os_defines.h: Define _GLIBCXX_USE_NANOSLEEP + and _GLIBCXX_USE_SCHED_YIELD. + * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add comment. + 2012-10-10 Mark Kettenis <kettenis@openbsd.org> * configure.host (*-*-openbsd*) Set cpu_include_dir. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 960bae3ec0d..c4cde86b7f3 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1158,6 +1158,11 @@ dnl --enable-libstdcxx-time=no dnl --disable-libstdcxx-time dnl disables the checks completely dnl +dnl N.B. Darwin provides nanosleep but doesn't support the whole POSIX +dnl Timers option, so doesn't define _POSIX_TIMERS. Because the test +dnl below fails Darwin unconditionally defines _GLIBCXX_USE_NANOSLEEP in +dnl os_defines.h and also defines _GLIBCXX_USE_SCHED_YIELD. +dnl AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [ AC_MSG_CHECKING([for clock_gettime, nanosleep and sched_yield]) diff --git a/libstdc++-v3/config/os/bsd/darwin/os_defines.h b/libstdc++-v3/config/os/bsd/darwin/os_defines.h index 421478d82d4..be4aa149e21 100644 --- a/libstdc++-v3/config/os/bsd/darwin/os_defines.h +++ b/libstdc++-v3/config/os/bsd/darwin/os_defines.h @@ -42,4 +42,9 @@ // Static initializer macro is buggy in darwin, see libstdc++/51906 #define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC +// Configure checks for nanosleep fail on Darwin, but nanosleep and +// sched_yield are always available, so use them. +#define _GLIBCXX_USE_NANOSLEEP 1 +#define _GLIBCXX_USE_SCHED_YIELD 1 + #endif |