]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Add extern "C" { ... }.
authorBruno Haible <bruno@clisp.org>
Sun, 24 Aug 2003 13:58:15 +0000 (13:58 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:53 +0000 (12:10 +0200)
28 files changed:
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/relocatable.h
gettext-tools/lib/ChangeLog
gettext-tools/lib/basename.h
gettext-tools/lib/error-progname.h
gettext-tools/lib/pathname.h
gettext-tools/lib/progname.h
gettext-tools/lib/relocatable.h
gettext-tools/lib/stpcpy.h
gettext-tools/lib/strcase.h
gettext-tools/lib/strstr.h
gettext-tools/lib/xerror.h
gettext-tools/lib/xmalloc.h
gettext-tools/src/ChangeLog
gettext-tools/src/dir-list.h
gettext-tools/src/file-list.h
gettext-tools/src/format.h
gettext-tools/src/message.h
gettext-tools/src/msgl-ascii.h
gettext-tools/src/msgl-iconv.h
gettext-tools/src/open-po.h
gettext-tools/src/po-charset.h
gettext-tools/src/po-time.h
gettext-tools/src/read-po-abstract.h
gettext-tools/src/str-list.h
gettext-tools/src/write-po.h
gettext-tools/src/xgettext.c
gettext-tools/src/xgettext.h

index 02d79b66f440be6fdf82761744f4ea54ecedb844..6059ae6998fd505f02ca35950637550af209c6e4 100644 (file)
@@ -1,3 +1,7 @@
+2003-08-24  Bruno Haible  <bruno@clisp.org>
+
+       * relocatable.h: Make this file includable in C++ mode: add extern "C".
+
 2003-08-23  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.in (LTV_CURRENT, LTV_REVISION, LTV_AGE): Bump to 6:0:4.
index d141200a64235d6820be3406436f839632e775c8..48c5b71e215e9e7c8cca769e12c7bf61d05a309c 100644 (file)
 #ifndef _RELOCATABLE_H
 #define _RELOCATABLE_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* This can be enabled through the configure --enable-relocatable option.  */
 #if ENABLE_RELOCATABLE
 
@@ -64,4 +69,9 @@ extern const char * compute_curr_prefix (const char *orig_installprefix,
 
 #endif
 
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RELOCATABLE_H */
index 529016007838dfdaa4add51adeac326a2dd42c23..1b095f50fa9f5663ae4818cac204de352484629e 100644 (file)
@@ -1,3 +1,16 @@
+2003-08-24  Bruno Haible  <bruno@clisp.org>
+
+       * basename.h: Make this file includable in C++ mode: add extern "C".
+       * error-progname.h: Likewise.
+       * pathname.h: Likewise.
+       * progname.h: Likewise.
+       * relocatable.h: Likewise.
+       * stpcpy.h: Likewise.
+       * strcase.h: Likewise.
+       * strstr.h: Likewise.
+       * xerror.h: Likewise.
+       * xmalloc.h: Likewise.
+
 2003-08-23  Bruno Haible  <bruno@clisp.org>
 
        * getline.h: Update from gnulib.
index 03059582b6d860f98eed4bfea173df9b022d8650..7f0812f130a665fcacad1bd1f0d35a755d85fb4f 100644 (file)
@@ -1,5 +1,5 @@
 /* Pathname hacking.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 /* This is where basename() is declared.  */
 #include <string.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 #if !(__GLIBC__ >= 2)
 /* When not using the GNU libc we use the basename implementation we
    provide here.  */
@@ -29,4 +35,10 @@ extern char *gnu_basename (const char *);
 #define basename(Arg) gnu_basename (Arg)
 #endif
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _BASENAME_H */
index ed5342f8eb29c17aadd0852f37363a190245af01..f13d55de93e736f7263dafeecbbe08011acc2368 100644 (file)
      error_print_progname = maybe_print_progname;
  */
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Indicates whether errors and warnings get prefixed with program_name.
    Default is true.
    A reason to omit the prefix is for better interoperability with Emacs'
@@ -38,4 +44,10 @@ extern bool error_with_progname;
    is true.  */
 extern void maybe_print_progname (void);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _ERROR_PROGNAME_H */
index 7b817a4f724251fa54596ff7102d63cb89626a76..bac881798a9b520ece206f14deccffe67b9ea6a3 100644 (file)
@@ -1,5 +1,5 @@
 /* Pathname support.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #ifndef _PATHNAME_H
 #define _PATHNAME_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Pathname support.
    ISSLASH(C)           tests whether C is a directory separator character.
    IS_ABSOLUTE_PATH(P)  tests whether P is an absolute path.  If it is not,
@@ -47,4 +52,8 @@
 extern char *concatenated_pathname (const char *directory,
                                    const char *filename, const char *suffix);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _PATHNAME_H */
index 89f0127c78b5751fec3d1c9f413d7cc5b30b5ed4..85169c356ffbedb31b8bd8dc07e6bf9b57e1ab03 100644 (file)
      set_program_name (argv[0]);
  */
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* String containing name the program is called with.  */
 extern const char *program_name;
 
@@ -47,4 +53,10 @@ extern char *get_full_program_name (void);
 
 #endif
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _PROGNAME_H */
index d141200a64235d6820be3406436f839632e775c8..48c5b71e215e9e7c8cca769e12c7bf61d05a309c 100644 (file)
 #ifndef _RELOCATABLE_H
 #define _RELOCATABLE_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* This can be enabled through the configure --enable-relocatable option.  */
 #if ENABLE_RELOCATABLE
 
@@ -64,4 +69,9 @@ extern const char * compute_curr_prefix (const char *orig_installprefix,
 
 #endif
 
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RELOCATABLE_H */
index b579c5c9dee3408b11ff66e46dd89c6b2c9cc85d..5e737cfd573f14be1ecdb71d846071a530ae80ef 100644 (file)
 
 #else
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Copy SRC to DST, returning the address of the terminating '\0' in DST.  */
 extern char *stpcpy (char *dst, const char *src);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 
 #endif /* _STPCPY_H */
index f17e64832ff1bd22565ab3c135253dee2752358c..9461392f8d6ade6c8cc4903ab5255cde5e4b0dc0 100644 (file)
 
 #include <stddef.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Compare strings S1 and S2, ignoring case, returning less than, equal to or
    greater than zero if S1 is lexicographically less than, equal to or greater
    than S2.
@@ -32,4 +38,10 @@ extern int strcasecmp (const char *s1, const char *s2);
    Note: This function can not work correctly in multibyte locales.  */
 extern int strncasecmp (const char *s1, const char *s2, size_t n);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _STRCASE_H */
index e424b8340f824bad18f6059d8dbf7507c0a7269d..f244b9644548755d25897bec314d18d1c81c50ea 100644 (file)
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #else
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Find the first occurrence of NEEDLE in HAYSTACK.  */
 extern char *strstr (const char *haystack, const char *needle);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 543ac96d0dd4a28ac64f7bf3ca9d79107e2667e8..6e93b7954d90c116802a833b079b589c0f1a5e35 100644 (file)
@@ -1,5 +1,5 @@
 /* Multiline error-reporting functions.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 /* Get fallback definition of __attribute__.  */
 #include "error.h"
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Format a message and return the freshly allocated resulting string.  */
 extern char *xasprintf (const char *format, ...)
      __attribute__ ((__format__ (__printf__, 1, 2)));
@@ -38,4 +44,10 @@ extern void multiline_warning (char *prefix, char *message);
    PREFIX is NULL.  Free the PREFIX and MESSAGE when done.  */
 extern void multiline_error (char *prefix, char *message);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _XERROR_H */
index aa85e1f5ff5e74d9e9b778d07709257b50ab3f98..2d2a58116302c5a171566ae9278c65c52e311abe 100644 (file)
 #include <stddef.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Defined in xmalloc.c.  */
 
 /* Allocate SIZE bytes of memory dynamically, with error checking.  */
@@ -51,4 +56,9 @@ extern void xalloc_die (void)
 extern char *xstrdup (const char *string);
 
 
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _XMALLOC_H */
index 3e1fcdc9e9fe2e254dc31da8b266e570c0b87830..58ac8f23dc7fc3a3175e99ca72f520a757a1c310 100644 (file)
@@ -1,3 +1,20 @@
+2003-08-24  Bruno Haible  <bruno@clisp.org>
+
+       * dir-list.h: Make this file includable in C++ mode: add extern "C".
+       * file-list.h: Likewise.
+       * format.h: Likewise.
+       * message.h: Likewise.
+       * msgl-ascii.h: Likewise.
+       * msgl-iconv.h: Likewise.
+       * open-po.h: Likewise.
+       * po-charset.h: Likewise.
+       * po-time.h: Likewise.
+       * read-po-abstract.h: Likewise.
+       * str-list.h: Likewise.
+       * write-po.h: Likewise.
+       * xgettext.h: Likewise.
+       * xgettext.c: Add extern "C" around all "x-*.h" includes.
+
 2003-08-22  Bruno Haible  <bruno@clisp.org>
 
        * format-awk.c: Include error-progname.h instead of progname.h.
index dc8ad21c612287e1a1e6d301e23eb9d336c9116e..5e6b6ea473ecc43eb1d2d0964b0ea30dd1cb94f1 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1996, 1998, 2000-2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1998, 2000-2003 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
    It is an ordered list, without duplicates.  The default value of the
    list consists of the single directory ".".  */
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Append a directory to the end of the list of directories.  */
 extern void dir_list_append (const char *directory);
 
@@ -37,4 +43,10 @@ extern void *dir_list_save_reset (void);
 /* Restore a previously saved list of directories.  */
 extern void dir_list_restore (void *saved_value);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _DIR_LIST_H */
index 9d34d0f4a87747017b31575eb0abf1ec0f473a5c..76952dfb0f0aabfec6fc10084ddf5d49217a0599 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading file lists.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 
 #include "str-list.h"
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Read list of filenames from a file.
    One filename per line.  Lines starting with # and whitespace lines are
    ignored.  Trailing whitespace is removed.  */
 extern string_list_ty *read_names_from_file (const char *file_name);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _FILE_LIST_H */
index b62ec2ccf417d80f82938fa07343d1e0d98b05a2..ad01e5bfa1bc8f0c3f713588c8616167d7b8aea6 100644 (file)
 #include "pos.h"       /* Get lex_pos_ty.  */
 #include "message.h"   /* Get NFORMATS.  */
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* This structure describes a format string parser for a language.  */
 struct formatstring_parser
 {
@@ -85,4 +91,10 @@ struct interval
 };
 extern void get_c99_format_directives (const char *string, struct interval **intervalsp, size_t *lengthp);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _FORMAT_H */
index 482198744cd2ca3702d3ebb012bb630f4d2e594b..4968b5ec1073421fb728f9e0ecac93dbcc691cf4 100644 (file)
 
 #include <stdbool.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* According to Sun's Uniforum proposal the default message domain is
    named 'messages'.  */
 #define MESSAGE_DOMAIN_DEFAULT "messages"
@@ -259,4 +265,9 @@ extern message_ty *
        msgdomain_list_search_fuzzy (msgdomain_list_ty *mdlp, const char *msgid);
 
 
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* message.h */
index c4e9bd2d4dccc4529271942803be57ecb6556273..bff312964ad9a7e762a5124872b8a7a8c7f2462b 100644 (file)
@@ -1,5 +1,5 @@
 /* Message list test for ASCII character set.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 
 #include <stdbool.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 extern bool
        is_ascii_string (const char *string);
 extern bool
@@ -32,4 +38,10 @@ extern bool
 extern bool
        is_ascii_message_list (message_list_ty *mlp);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _MSGL_ASCII_H */
index 0428452f945e2dc9bc862836b9b9d90ed58f0c53..44acb71bdc404749403f63edb2676b098bc2aa02 100644 (file)
@@ -1,5 +1,5 @@
 /* Message list character set conversion.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 
 #include "message.h"
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 #if HAVE_ICONV
 /* Converts the STRING through the conversion descriptor CD.  */
 extern char *convert_string (iconv_t cd, const char *string);
@@ -46,4 +52,10 @@ extern msgdomain_list_ty *
                             const char *to_code,
                             const char *from_filename);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _MSGL_ICONV_H */
index 734f8f687ce580f1bbd62babbaeaaaa47a568543..cc561f26f51e77acbff797a9b379f885d38cc59e 100644 (file)
 #include <stdbool.h>
 #include <stdio.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Open the input file with the name INPUT_NAME.  The ending .po is added
    if necessary.  If INPUT_NAME is not an absolute file name and the file is
    not found, the list of directories in "dir-list.h" is searched.  The
 extern FILE *open_po_file (const char *input_name, char **real_file_name_p,
                           bool exit_on_error);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _OPEN_PO_H */
index 9b03a0dfca3b75c67df2f6a7dff80174dca3d86a..887a5b4fe8b48a6964bb216312a6dd4d4dda0603 100644 (file)
@@ -1,5 +1,5 @@
 /* Charset handling while reading PO files.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #include <iconv.h>
 #endif
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Canonicalize an encoding name.
    The results of this function are statically allocated and can be
    compared using ==.  */
@@ -71,4 +77,10 @@ extern void po_lex_charset_set (const char *header_entry,
 /* Finish up with the PO file's encoding.  */
 extern void po_lex_charset_close (void);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _PO_CHARSET_H */
index 941309a12e4bfd136893c12888eeb8c6e013ad1a..869172f832a06a48da281038103c6b8e842446fd 100644 (file)
@@ -1,5 +1,5 @@
 /* PO/POT file timestamps.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 
 #include <time.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Return a freshly allocated string containing the given time in the
    format YYYY-MM-DD HH:MM+TZOFF.  */
 extern char *po_strftime (const time_t *tp);
 
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _PO_TIME_H */
index 4140fc87349660c6aa4c60ee62c09ca34b50b88d..85b960f974a1d5e937a76c10578755a051c989ee 100644 (file)
 
 #include <stdbool.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Note: the _t suffix is reserved by ANSI C, so the _ty suffix is
    used to indicate a type name.  */
 
@@ -161,4 +167,10 @@ extern void po_parse_comment_special (const char *s, bool *fuzzyp,
                                      enum is_format formatp[NFORMATS],
                                      enum is_wrap *wrapp);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _READ_PO_ABSTRACT_H */
index 086b931a392f6db0864a8ed39d1bf08da37c22b8..f316c9729182e3d6e1c92a96711cb2609cdb9fce 100644 (file)
 /* Get bool.  */
 #include <stdbool.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* Type describing list of immutable strings,
    implemented using a dynamic array.  */
 typedef struct string_list_ty string_list_ty;
@@ -72,4 +78,10 @@ extern char *string_list_join (const string_list_ty *slp);
 /* Return 1 if s is contained in the list of strings, 0 otherwise.  */
 extern bool string_list_member (const string_list_ty *slp, const char *s);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _STR_LIST_H */
index a1a81ef4b1fb73afd69e6100d627e1117bf33092..5cbe3199a04b2c662b13e0b19b1f8ff82971a0d3 100644 (file)
 #include <stdbool.h>
 #include <stdio.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* These functions output parts of a message, as comments.  */
 extern void
        message_print_comment (const message_ty *mp, FILE *fp);
@@ -64,4 +70,10 @@ extern void
 extern void
        msgdomain_list_sort_by_filepos (msgdomain_list_ty *mdlp);
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _WRITE_PO_H */
index 559d8ad7d24ec4ca7364b38d78888199cc739c7d..0bb9adb2ce21168581f3057391411166432d24c0 100644 (file)
 #define _(str) gettext (str)
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "x-c.h"
 #include "x-po.h"
 #include "x-python.h"
 #include "x-rst.h"
 #include "x-glade.h"
 
+#ifdef __cplusplus
+}
+#endif
+
 
 /* If nonzero add all comments immediately preceding one of the keywords. */
 static bool add_all_comments = false;
index 8086054d52356e4355e534684238b9b5270bfaef..b209405309eafd75ab94d08912fdd858c5593b7b 100644 (file)
 /* Declare 'line_comment' and 'input_syntax'.  */
 #include "read-po.h"
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* If true, omit the header entry.
    If false, keep the header entry present in the input.  */
 extern int xgettext_omit_header;
@@ -91,4 +97,9 @@ extern void remember_a_message_plural (message_ty *mp,
                                       char *string, lex_pos_ty *pos);
 
 
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* _XGETTEXT_H */