1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/openharmony-distributeddatamgr_datamgr_service

 / Детали:

Potential conflict with POSIX semaphore.h

Предстоит сделать
Владелец
Создано  
29.11.2024

llvm-project commit 54fa9ecd3088508b05b0c5b5cb52da8a3c188655 added semaphore.h to libcxx/include/__threading_support. This potentially creates a circular dependency if a libc++ header sees distributeddatamgr_datamgr's semaphore.h (services/distributeddataservice/libs/distributeddb/common/include/semaphore.h).

eg. compile a C++ source file that contains only #include <memory> on a system with clang using recent version (after Feb 18, 2020) of libc++ and distributeddatamgr_datamgr's semaphore.h on the header search list:
cat test.cpp
#include <memory>

clang++ -c test.cpp -stdlib=libc++ -Ifoundation/distributeddatamgr/distributeddatamgr/services/distributeddataservice/libs/distributeddb/common/include/
In file included from test.cpp:1:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/memory:681:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/atomic:571:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/__threading_support:33:
In file included from foundation/distributeddatamgr/distributeddatamgr/services/distributeddataservice/libs/distributeddb/common/include/semaphore.h:21:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/mutex:190:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/__mutex_base:15:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/system_error:149:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/string:506:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/string_view:175:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/__string:57:
In file included from /mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/algorithm:644:
/mnt/80f149c9-ea3e-4b1a-a8ef-79e1121c4b3c/OpenHarmony/prebuilts/llvm-11.0.1/bin/../include/c++/v1/functional:1512:5: error: no template named '__compressed_pair'
__compressed_pair<_Fp, _Ap> _f;

memory:681 includes distributeddatamgr_datamgr's semaphore.h (through __threading_support) which tries to use __compressed_pair (through functional) defined after memory:681 (memory:2161).

Комментарий (0)

GitLife Service Account Задача создана

Вход Перед тем как оставить комментарий

Статус
Ответственный
Контрольная точка
Pull Requests
Связанные запросы на слияние могут быть закрыты после их объединения
Ветки
Дата начала   -   Крайний срок
-
Закрепить/Открепить
Приоритет
Участники(1)
1
https://api.gitlife.ru/oschina-mirror/openharmony-distributeddatamgr_datamgr_service.git
git@api.gitlife.ru:oschina-mirror/openharmony-distributeddatamgr_datamgr_service.git
oschina-mirror
openharmony-distributeddatamgr_datamgr_service
openharmony-distributeddatamgr_datamgr_service