From: Bruno Haible Date: Thu, 19 Oct 2006 13:22:00 +0000 (+0000) Subject: Make lock.h usable in C++. X-Git-Tag: 0.16.x-branchpoint~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9ecfa3e1340b589e52fc040749d23284953c939;p=thirdparty%2Fgettext.git Make lock.h usable in C++. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 3449ed1e8..258ae07f8 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,7 @@ +2006-10-18 Bruno Haible + + * lock.h [C++]: Wrap definitions in extern "C". + 2006-10-17 Paul Eggert * localcharset.c: Do not check HAVE_SETLOCALE. diff --git a/gettext-runtime/intl/lock.h b/gettext-runtime/intl/lock.h index be99139dc..04d136922 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 # include +# 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 # include +# 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 # include +# 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 +# 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 /* ========================================================================= */