[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/02: Remove 'extern' from 'scm_i_current_thread' defin
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 02/02: Remove 'extern' from 'scm_i_current_thread' definition, except on macOS. |
Date: |
Fri, 20 Jan 2023 10:41:54 -0500 (EST) |
civodul pushed a commit to branch main
in repository guile.
commit 80bf3f48b441f3a4832522db9ddce3fa628a3fea
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jan 20 10:04:48 2023 +0100
Remove 'extern' from 'scm_i_current_thread' definition, except on macOS.
This is a followup to f859e0f58b211eedcb0dce4f2382cfebf37010d7, which
led to warnings on GNU/Linux:
threads.c:358:43: warning: 'scm_i_current_thread' initialized and
declared 'extern'
* libguile/threads.c (scm_i_current_thread): Make 'SCM_INTERNAL'
conditional.
---
libguile/threads.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libguile/threads.c b/libguile/threads.c
index 80f01402d..b1c71fee5 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -355,8 +355,10 @@ scm_i_pthread_key_t scm_i_thread_key;
itself in TLS (rather than a pointer to some malloc'd memory) is not
possible since thread objects may live longer than the actual thread they
represent. */
-/* SCM_INTERNAL fixes https://debbugs.gnu.org/60234 */
-SCM_INTERNAL SCM_THREAD_LOCAL scm_thread *scm_i_current_thread = NULL;
+# ifdef __APPLE__ /* XXX: hack to address <https://bugs.gnu.org/60234> */
+SCM_INTERNAL
+# endif
+SCM_THREAD_LOCAL scm_thread *scm_i_current_thread = NULL;
#endif /* SCM_HAVE_THREAD_STORAGE_CLASS */