diff options
author | Bruno Haible <bruno@clisp.org> | 2006-10-19 13:22:00 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:14:10 +0200 |
commit | c9ecfa3e1340b589e52fc040749d23284953c939 (patch) | |
tree | ff4cb3be0f4dc3fe3685d68cad8993fd460a514e /gettext-runtime/intl/lock.h | |
parent | 19fb4ec9dd91a947c4e3df6b57f0849388ce7fe9 (diff) | |
download | external_gettext-c9ecfa3e1340b589e52fc040749d23284953c939.zip external_gettext-c9ecfa3e1340b589e52fc040749d23284953c939.tar.gz external_gettext-c9ecfa3e1340b589e52fc040749d23284953c939.tar.bz2 |
Make lock.h usable in C++.
Diffstat (limited to 'gettext-runtime/intl/lock.h')
-rw-r--r-- | gettext-runtime/intl/lock.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/gettext-runtime/intl/lock.h b/gettext-runtime/intl/lock.h index be99139..04d1369 100644 --- a/gettext-runtime/intl/lock.h +++ b/gettext-runtime/intl/lock.h @@ -1,5 +1,5 @@ /* Locking in multithreaded situations. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -71,6 +71,10 @@ # include <pthread.h> # include <stdlib.h> +# ifdef __cplusplus +extern "C" { +# endif + # if PTHREAD_IN_USE_DETECTION_HARD /* The pthread_in_use() detection needs to be done at runtime. */ @@ -356,6 +360,10 @@ typedef pthread_once_t gl_once_t; while (0) extern int glthread_once_singlethreaded (pthread_once_t *once_control); +# ifdef __cplusplus +} +# endif + #endif /* ========================================================================= */ @@ -367,6 +375,10 @@ extern int glthread_once_singlethreaded (pthread_once_t *once_control); # include <pth.h> # include <stdlib.h> +# ifdef __cplusplus +extern "C" { +# endif + # if USE_PTH_THREADS_WEAK /* Use weak references to the GNU Pth threads library. */ @@ -469,6 +481,10 @@ typedef pth_once_t gl_once_t; extern void glthread_once_call (void *arg); extern int glthread_once_singlethreaded (pth_once_t *once_control); +# ifdef __cplusplus +} +# endif + #endif /* ========================================================================= */ @@ -481,6 +497,10 @@ extern int glthread_once_singlethreaded (pth_once_t *once_control); # include <synch.h> # include <stdlib.h> +# ifdef __cplusplus +extern "C" { +# endif + # if USE_SOLARIS_THREADS_WEAK /* Use weak references to the old Solaris threads library. */ @@ -601,6 +621,10 @@ typedef struct extern void glthread_once (gl_once_t *once_control, void (*initfunction) (void)); extern int glthread_once_singlethreaded (gl_once_t *once_control); +# ifdef __cplusplus +} +# endif + #endif /* ========================================================================= */ @@ -609,6 +633,10 @@ extern int glthread_once_singlethreaded (gl_once_t *once_control); # include <windows.h> +# ifdef __cplusplus +extern "C" { +# endif + /* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex, Semaphore types, because - we need only to synchronize inside a single process (address space), @@ -742,6 +770,10 @@ typedef struct glthread_once (&NAME, INITFUNCTION) extern void glthread_once (gl_once_t *once_control, void (*initfunction) (void)); +# ifdef __cplusplus +} +# endif + #endif /* ========================================================================= */ |