2004-07-16 Bruno Haible <bruno@clisp.org>
+ * backupfile.h: Add extern "C" for C++.
+ * closeout.h: Likewise.
+ * copy-file.h: Likewise.
+ * findprog.h: Likewise.
+ * full-write.h: Likewise.
+ * pathname.h: Likewise.
+ * progname.h: Likewise.
+ * stpcpy.h: Likewise.
+ * stpncpy.h: Likewise.
+ * strcase.h: Likewise.
+ * strstr.h: Likewise.
+ * xalloc.h: Likewise.
+
* mbswidth.h: Add extern "C" for C++.
Reported by Albert Chin-A-Young <china@thewrittenword.com>.
/* backupfile.h -- declarations for making Emacs style backup file names
- Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003 Free
+ Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003, 2004 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
#ifndef BACKUPFILE_H_
# define BACKUPFILE_H_
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
/* When to make backup files. */
enum backup_type
{
enum backup_type xget_version (char const *context, char const *arg);
void addext (char *, char const *, int);
+
+# ifdef __cplusplus
+}
+# endif
+
#endif /* ! BACKUPFILE_H_ */
/* Close standard output.
- Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2000, 2003, 2004 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 CLOSEOUT_H
# define CLOSEOUT_H 1
+# ifdef __cplusplus
+extern "C" {
+# endif
+
void close_stdout_set_file_name (const char *file);
void close_stdout (void);
+# ifdef __cplusplus
+}
+# endif
+
#endif
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
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
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
/* 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
#include <stddef.h>
+
+#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
#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,
extern char *concatenated_pathname (const char *directory,
const char *filename, const char *suffix);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _PATHNAME_H */
/* Program name management.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004 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
set_program_name (argv[0]);
*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* String containing name the program is called with. */
extern const char *program_name;
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _PROGNAME_H */
#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 */
/* String copying.
- Copyright (C) 1995, 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004 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
#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
#if !HAVE_STPNCPY
/* Copy no more than N bytes of SRC to DST, returning a pointer past the
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _STPNCPY_H */
#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.
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 */
/* 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
/* xalloc.h -- malloc with out-of-memory checking
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2003, 2004 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
# include <stddef.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
# ifndef __attribute__
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
# define __attribute__(x)
# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
# endif
+
/* If this pointer is non-zero, run the specified function upon each
allocation failure. It is initialized to zero. */
extern void (*xalloc_fail_func) (void);
# define XREALLOC(p, type, n) xnrealloc (p, n, sizeof (type))
# define XFREE(p) free (p)
+
+# ifdef __cplusplus
+}
+# endif
+
+
#endif /* !XALLOC_H_ */