[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
threads-h: Fix compilation errors in C++ mode on Android
From: |
Bruno Haible |
Subject: |
threads-h: Fix compilation errors in C++ mode on Android |
Date: |
Mon, 09 Jan 2023 21:33:48 +0100 |
In a testdir on Android, I see compilation errors like this one:
clang++ -ferror-limit=0 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -I.
-I../../gltests -I.. -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -I.
-I../../gltests -I.. -I../../gltests/.. -I../gllib -I../../gltests/../gllib
-I/data/data/com.termux/files/home/local/include -Wall -Wno-error -g -O2 -c -o
test-threads-c++.o ../../gltests/test-threads-c++.cc
In file included from ../../gltests/test-threads-c++.cc:22:
In file included from ../gllib/threads.h:28:
In file included from /data/data/com.termux/files/usr/include/threads.h:229:
In file included from
/data/data/com.termux/files/usr/include/android/legacy_threads_inlines.h:36:
In file included from
/data/data/com.termux/files/usr/include/bits/threads_inlines.h:31:
../gllib/threads.h:699:19: error: no member named 'thrd_create' in the global
namespace; did you mean 'pthread_create'?
_GL_CXXALIAS_SYS (thrd_create, int, (thrd_t *, thrd_start_t, void *));
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The first patch fixes them. The second patch is merely a portability
improvement.
2023-01-09 Bruno Haible <bruno@clisp.org>
threads-h: Improve portability.
* lib/threads.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE when possible.
* modules/threads-h (Makefile.am): Substitute
INCLUDE_NEXT_AS_FIRST_DIRECTIVE and NEXT_AS_FIRST_DIRECTIVE_THREADS_H.
2023-01-09 Bruno Haible <bruno@clisp.org>
threads-h: Fix compilation errors in C++ mode on Android.
* lib/threads.in.h (_GL_ALREADY_INCLUDING_THREADS_H): New macro.
0001-threads-h-Fix-compilation-errors-in-C-mode-on-Androi.patch
Description: Text Data
0002-threads-h-Improve-portability.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- threads-h: Fix compilation errors in C++ mode on Android,
Bruno Haible <=