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])
])
dnl
+dnl Check whether required C++ overloads are present in <stdio.h>.
+dnl
+AC_DEFUN([GLIBCXX_CHECK_STDIO_PROTO], [
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ AC_MSG_CHECKING([for gets declaration])
+ AC_CACHE_VAL(glibcxx_cv_gets, [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+ [#include <stdio.h>
+ namespace test
+ {
+ using ::gets;
+ }
+ ])],
+ [glibcxx_cv_gets=yes],
+ [glibcxx_cv_gets=no]
+ )])
+
+ if test $glibcxx_cv_gets = yes; then
+ AC_DEFINE(HAVE_GETS, 1, [Define if gets is available in <stdio.h>.])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_gets)
+
+ AC_LANG_RESTORE
+])
+
+dnl
dnl Check whether macros, etc are present for <system_error>
dnl
AC_DEFUN([GLIBCXX_CHECK_SYSTEM_ERROR], [
CXXFLAGS="$old_CXXFLAGS"
AC_LANG_RESTORE
- # Set atomicity_dir to builtins if all of above tests pass.
+ # Set atomicity_dir to builtins if all but the long long test above passes.
if test $glibcxx_cv_atomic_bool = yes \
&& test $glibcxx_cv_atomic_short = yes \
- && test $glibcxx_cv_atomic_int = yes \
- && test $glibcxx_cv_atomic_long_long = yes ; then
+ && test $glibcxx_cv_atomic_int = yes; then
AC_DEFINE(_GLIBCXX_ATOMIC_BUILTINS, 1,
[Define if the compiler supports C++11 atomics.])
atomicity_dir=cpu/generic/atomicity_builtins