]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Allow compilation in C++ mode.
authorBruno Haible <bruno@clisp.org>
Sat, 12 Feb 2005 18:51:03 +0000 (18:51 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:14 +0000 (12:12 +0200)
gettext-tools/lib/ChangeLog
gettext-tools/lib/allocsa.h
gettext-tools/lib/xallocsa.h

index bcb84f17789b04fe3d50c6a8f7a712c890f3b59d..4af5c55f979364eaeeaace25c48a1b2800ebc496 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-12  Bruno Haible  <bruno@clisp.org>
+
+       * allocsa.h: Add extern "C" for C++.
+       * xallocsa.h: Likewise.
+
 2005-02-12  Bruno Haible  <bruno@clisp.org>
 
        * exitfail.h (exit_failure): Add DLL_VARIABLE attribute.
index dcc5e9b135d1285555015ca2167a44efbc368419..e6894acd305f48e8d4127506f8620da383136f41 100644 (file)
 #include <stddef.h>
 #include <stdlib.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* safe_alloca(N) is equivalent to alloca(N) when it is safe to call
    alloca(N); otherwise it returns NULL.  It either returns N bytes of
    memory allocated on the stack, that lasts until the function returns,
@@ -69,6 +75,11 @@ extern void freesa (void *p);
    If this would be useful in your application. please speak up.  */
 
 
+#ifdef __cplusplus
+}
+#endif
+
+
 /* ------------------- Auxiliary, non-public definitions ------------------- */
 
 /* Determine the alignment of a type at compile time.  */
index 9b11142753a281403ab923878fdb1968791b23af..e938a6ea1dcf3603472c22fcd0db2e67019e91cb 100644 (file)
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation with out of memory checking.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
 
 #include "allocsa.h"
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* xallocsa(N) is a checking safe variant of alloca(N).  It allocates N bytes
    of memory allocated on the stack, that must be freed using freesa() before
    the function returns.  Upon failure, it exits with an error message.  */
@@ -39,4 +45,10 @@ extern void * xmallocsa (size_t n);
     xnallocsa (size_t n, size_t s) - behaves like xallocsa (n * s)
    If this would be useful in your application. please speak up.  */
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _XALLOCSA_H */