]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make lock.h usable in C++.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Oct 2006 13:22:00 +0000 (13:22 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:10 +0000 (12:14 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/lock.h

index 3449ed1e8afe2287ec92e0f2174c0bc6918de2c1..258ae07f81a0dd4560e114f7459a02184c328975 100644 (file)
@@ -1,3 +1,7 @@
+2006-10-18  Bruno Haible  <bruno@clisp.org>
+
+       * lock.h [C++]: Wrap definitions in extern "C".
+
 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        * localcharset.c: Do not check HAVE_SETLOCALE.
index be99139dce7a9e787d5c05564cbe0e38fa950928..04d1369223096bee056c534e980347b1eed7e5e7 100644 (file)
@@ -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
 # 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
 
 /* ========================================================================= */