libstdc++: Fix definition of _GLIBCXX_NO_SLEEP config macro
authorJonathan Wakely <jwakely@redhat.com>
Fri, 10 Dec 2021 11:39:26 +0000 (11:39 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 10 Dec 2021 14:05:46 +0000 (14:05 +0000)
If no OS function to sleep (e.g. nanosleep, usleep, Win32 Sleep etc.) is
available then configure defines the macro NO_SLEEP. But this will not
get prefixed with "_GLIBCXX_" because include/Makefile.am only does that
for macros beginning with "HAVE_". The configure script should define
_GLIBCXX_NO_SLEEP instead (which is what the code actually checks for).

libstdc++-v3/ChangeLog:

* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add _GLIBCXX_
prefix to NO_SLEEP macro.
* config.h.in: Regenerate.
* configure: Regenerate.

libstdc++-v3/acinclude.m4
libstdc++-v3/config.h.in
libstdc++-v3/configure

index 6d9a887..635168d 100644 (file)
@@ -1562,7 +1562,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
   fi
 
   if test x"$ac_no_sleep" = x"yes"; then
-    AC_DEFINE(NO_SLEEP,1, [Defined if no way to sleep is available.])
+    AC_DEFINE(_GLIBCXX_NO_SLEEP,1, [Defined if no way to sleep is available.])
   fi
 
   AC_SUBST(GLIBCXX_LIBS)
index 420021f..10675fe 100644 (file)
    */
 #undef LT_OBJDIR
 
-/* Defined if no way to sleep is available. */
-#undef NO_SLEEP
-
 /* Name of package */
 #undef PACKAGE
 
 /* Define if C99 llrint and llround functions are missing from <math.h>. */
 #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS
 
+/* Defined if no way to sleep is available. */
+#undef _GLIBCXX_NO_SLEEP
+
 /* Define if ptrdiff_t is int. */
 #undef _GLIBCXX_PTRDIFF_T_IS_INT
 
index 61a14a2..b1a0157 100755 (executable)
@@ -21006,7 +21006,7 @@ $as_echo "$ac_has_win32_sleep" >&6; }
 
   if test x"$ac_no_sleep" = x"yes"; then
 
-$as_echo "#define NO_SLEEP 1" >>confdefs.h
+$as_echo "#define _GLIBCXX_NO_SLEEP 1" >>confdefs.h
 
   fi