From: Bruno Haible Date: Sun, 24 Aug 2003 17:33:25 +0000 (+0000) Subject: Add extern "C" { ... }. X-Git-Tag: v0.13~316 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0b0ba434b6561011ed2606ec9ffe79d379cf342;p=thirdparty%2Fgettext.git Add extern "C" { ... }. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index f3239d4ea..03fc5bbee 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -18,14 +18,21 @@ 2003-08-24 Bruno Haible - * basename.h: Make this file includable in C++ mode: add extern "C". + * backupfile.h: Make this file includable in C++ mode: add extern "C". + * basename.h: Likewise. + * copy-file.h: Likewise. * error-progname.h: Likewise. + * findprog.h: Likewise. + * full-write.h: Likewise. * pathname.h: Likewise. + * pipe.h: Likewise. * progname.h: Likewise. * relocatable.h: Likewise. * stpcpy.h: Likewise. + * stpncpy.h: Likewise, * strcase.h: Likewise. * strstr.h: Likewise. + * wait-process.h: Likewise. * xerror.h: Likewise. * xmalloc.h: Likewise. diff --git a/gettext-tools/lib/backupfile.h b/gettext-tools/lib/backupfile.h index 55ac68271..6d12187f1 100644 --- a/gettext-tools/lib/backupfile.h +++ b/gettext-tools/lib/backupfile.h @@ -1,5 +1,5 @@ /* backupfile.h -- declarations for making Emacs style backup file names - Copyright (C) 1990-1992, 1997-1999, 2001-2002 Free Software Foundation, Inc. + Copyright (C) 1990-1992, 1997-1999, 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 @@ -19,6 +19,11 @@ #ifndef BACKUPFILE_H_ # define BACKUPFILE_H_ +#ifdef __cplusplus +extern "C" { +#endif + + /* When to make backup files. */ enum backup_type { @@ -42,7 +47,7 @@ enum backup_type || (Type) == numbered_existing \ || (Type) == numbered) -extern char const *simple_backup_suffix; +extern DLL_VARIABLE char const *simple_backup_suffix; extern char *find_backup_file_name (char const *file, enum backup_type backup_type); @@ -50,4 +55,9 @@ extern enum backup_type get_version (char const *context, char const *arg); extern enum backup_type xget_version (char const *context, char const *arg); extern void addext (char *filename, char const *ext, char e); + +#ifdef __cplusplus +} +#endif + #endif /* ! BACKUPFILE_H_ */ diff --git a/gettext-tools/lib/copy-file.h b/gettext-tools/lib/copy-file.h index 3efda34b8..bf5e9d8c1 100644 --- a/gettext-tools/lib/copy-file.h +++ b/gettext-tools/lib/copy-file.h @@ -16,9 +16,20 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef __cplusplus +extern "C" { +#endif + + /* Copy a regular file: from src_filename to dest_filename. The destination file is assumed to be a backup file. Modification times, owner, group and access permissions are preserved as far as possible. Exit upon failure. */ extern void copy_file_preserving (const char *src_filename, const char *dest_filename); + + +#ifdef __cplusplus +} +#endif diff --git a/gettext-tools/lib/findprog.h b/gettext-tools/lib/findprog.h index 81a95b6dc..5913429f2 100644 --- a/gettext-tools/lib/findprog.h +++ b/gettext-tools/lib/findprog.h @@ -16,6 +16,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef __cplusplus +extern "C" { +#endif + + /* Look up a program in the PATH. Attempt to determine the pathname that would be called by execlp/execvp of PROGNAME. If successful, return a pathname containing a slash @@ -25,3 +31,8 @@ execl/execv on the returned pathname. The returned string is freshly malloc()ed if it is != PROGNAME. */ extern const char *find_in_path (const char *progname); + + +#ifdef __cplusplus +} +#endif diff --git a/gettext-tools/lib/full-write.h b/gettext-tools/lib/full-write.h index 8cd2e8157..2637903ec 100644 --- a/gettext-tools/lib/full-write.h +++ b/gettext-tools/lib/full-write.h @@ -1,6 +1,6 @@ /* An interface to write() that writes all it is asked to write. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002-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 @@ -18,7 +18,18 @@ #include + +#ifdef __cplusplus +extern "C" { +#endif + + /* Write COUNT bytes at BUF to descriptor FD, retrying if interrupted or if partial writes occur. Return the number of bytes successfully written, setting errno if that is less than COUNT. */ extern size_t full_write (int fd, const void *buf, size_t count); + + +#ifdef __cplusplus +} +#endif diff --git a/gettext-tools/lib/pipe.h b/gettext-tools/lib/pipe.h index de8f79047..e9ee75af8 100644 --- a/gettext-tools/lib/pipe.h +++ b/gettext-tools/lib/pipe.h @@ -28,6 +28,12 @@ #include + +#ifdef __cplusplus +extern "C" { +#endif + + /* All these functions create a subprocess and don't wait for its termination. They return the process id of the subprocess. They also return in fd[] one or two file descriptors for communication with the subprocess. @@ -95,4 +101,10 @@ extern pid_t create_pipe_bidi (const char *progname, # define DEV_NULL "/dev/null" #endif + +#ifdef __cplusplus +} +#endif + + #endif /* _PIPE_H */ diff --git a/gettext-tools/lib/stpncpy.h b/gettext-tools/lib/stpncpy.h index ad3586173..6dc56d8c0 100644 --- a/gettext-tools/lib/stpncpy.h +++ b/gettext-tools/lib/stpncpy.h @@ -20,6 +20,12 @@ #include + +#ifdef __cplusplus +extern "C" { +#endif + + #ifndef __GNU_LIBRARY__ /* Copy no more than N characters of SRC to DST, returning the address of @@ -31,4 +37,10 @@ extern char *gnu_stpncpy (char *dst, const char *src, size_t n); #endif + +#ifdef __cplusplus +} +#endif + + #endif /* _STPNCPY_H */ diff --git a/gettext-tools/lib/wait-process.h b/gettext-tools/lib/wait-process.h index 5b31c766a..7da470eaf 100644 --- a/gettext-tools/lib/wait-process.h +++ b/gettext-tools/lib/wait-process.h @@ -28,10 +28,22 @@ #include + +#ifdef __cplusplus +extern "C" { +#endif + + /* Wait for a subprocess to finish. Return its exit code. If it didn't terminate correctly, exit if exit_on_error is true, otherwise return 127. */ extern int wait_subprocess (pid_t child, const char *progname, bool null_stderr, bool exit_on_error); + +#ifdef __cplusplus +} +#endif + + #endif /* _WAIT_PROCESS_H */