diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2018-02-28 21:39:04 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-02-28 21:39:04 +0300 |
commit | dafe71bca00384b4647700635f8321885b3cf100 (patch) | |
tree | 598338f3e248e5fe11ea4e694da2359b790504e7 /os_dep.c | |
parent | c6ea1f66fe335c303f9ce73319d24247bc504304 (diff) | |
download | bdwgc-dafe71bca00384b4647700635f8321885b3cf100.tar.gz |
Replace conditional extern 'C' blocks begin/end with EXTERN_C_BEGIN/END
(code refactoring)
Issue #206 (bdwgc).
Note: EXTERN_C_BEGIN and EXTERN_C_END are not available in the GC
public headers.
* include/private/darwin_stop_world.h: Replace the conditional
extern "C" block begin/end with EXTERN_C_BEGIN and EXTERN_C_END,
respectively.
* include/private/dbg_mlc.h: Likewise.
* include/private/gc_hdrs.h: Likewise.
* include/private/gc_locks.h: Likewise.
* include/private/gc_pmark.h: Likewise.
* include/private/gc_priv.h: Likewise.
* include/private/gcconfig.h: Likewise.
* include/private/pthread_stop_world.h: Likewise.
* include/private/pthread_support.h: Likewise.
* include/private/specific.h: Likewise.
* include/private/thread_local_alloc.h: Likewise.
* os_dep.c [MPROTECT_VDB && DARWIN]: Likewise.
* tests/test.c [GC_AMIGA_FASTALLOC && AMIGA]: Likewise.
* include/private/gcconfig.h (EXTERN_C_BEGIN, EXTERN_C_END): Define
macro.
Diffstat (limited to 'os_dep.c')
-rw-r--r-- | os_dep.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -3914,9 +3914,7 @@ GC_INNER void GC_remove_protection(struct hblk *h, word nblocks, #include <mach/task.h> #include <pthread.h> -#ifdef __cplusplus - extern "C" { -#endif +EXTERN_C_BEGIN /* Some of the following prototypes are missing in any header, although */ /* they are documented. Some are in mach/exc.h file. */ @@ -3961,9 +3959,7 @@ catch_exception_raise_state_identity(mach_port_name_t exception_port, int flavor, thread_state_t old_state, int old_stateCnt, thread_state_t new_state, int new_stateCnt); -#ifdef __cplusplus - } /* extern "C" */ -#endif +EXTERN_C_END /* These should never be called, but just in case... */ GC_API_OSCALL kern_return_t |