]> granicus.if.org Git - libatomic_ops/commit
Fix public headers inclusion from clients C++ code
authorIvan Maidanski <ivmai@mail.ru>
Thu, 8 Feb 2018 21:42:25 +0000 (00:42 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 8 Feb 2018 21:52:40 +0000 (00:52 +0300)
commited206ef27a104f9d29af8afd5209d05766afaa85
treecbd850a2f7de206b3770db9c00c4436cda2de33a
parent3e37c2083e4e841e86f014ad5ae0467c7e1c1d51
Fix public headers inclusion from clients C++ code

Put declarations of exported variables and non-inline functions into
extern "C" blocks.

* src/atomic_ops/sysdeps/emul_cas.h [__cplusplus]
(AO_fetch_compare_and_swap_emulation,
AO_compare_double_and_swap_double_emulation, AO_store_full_emulation):
Wrap the prototypes (but not included headers).
* src/atomic_ops/sysdeps/gcc/x86.h [AO_WEAK_DOUBLE_CAS_EMULATION
&& __cplusplus] (AO_compare_double_and_swap_double_emulation): Likewise.
* src/atomic_ops/sysdeps/generic_pthread.h [__cplusplus] (AO_pt_lock):
Likewise.
* src/atomic_ops/sysdeps/sunc/sparc.h [__cplusplus]
(AO_test_and_set_full): Likewise.
* src/atomic_ops_malloc.h [__cplusplus] (AO_free, AO_malloc,
AO_malloc_enable_mmap): Likewise.
* src/atomic_ops_stack.h [__cplusplus]
(AO_stack_push_explicit_aux_release,
AO_stack_pop_explicit_aux_acquire, AO_stack_init,
AO_stack_push_release, AO_stack_pop_acquire): Likewise.
* tests/test_atomic.c [AO_TEST_EMULATION && __cplusplus]
(AO_store_full_emulation, AO_fetch_compare_and_swap_emulation,
AO_compare_double_and_swap_double_emulation): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER<1400
&& __cplusplus]: Adjust comment for the end of extern "C" block.
src/atomic_ops/sysdeps/emul_cas.h
src/atomic_ops/sysdeps/gcc/x86.h
src/atomic_ops/sysdeps/generic_pthread.h
src/atomic_ops/sysdeps/msftc/common32_defs.h
src/atomic_ops/sysdeps/sunc/sparc.h
src/atomic_ops_malloc.h
src/atomic_ops_stack.h
tests/test_atomic.c