* [committed] libstdc++: Fix definition of _GLIBCXX_NO_SLEEP config macro
@ 2021-12-10 14:07 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-12-10 14:07 UTC (permalink / raw)
To: libstdc++, gcc-patches
Tested powerpc64le-linux --enable-threads={posix,single}, pushed to trunk.
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 | 2 +-
libstdc++-v3/config.h.in | 6 +++---
libstdc++-v3/configure | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 6d9a8875e31..635168d7e25 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -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)
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 420021fcb1a..10675fe2530 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -714,9 +714,6 @@
*/
#undef LT_OBJDIR
-/* Defined if no way to sleep is available. */
-#undef NO_SLEEP
-
/* Name of package */
#undef PACKAGE
@@ -838,6 +835,9 @@
/* 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
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 61a14a2cb3b..b1a0157d0b9 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -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
--
2.31.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-10 14:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 14:07 [committed] libstdc++: Fix definition of _GLIBCXX_NO_SLEEP config macro Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).