+2003-10-14 Bruno Haible <bruno@clisp.org>
+
+ * hash.h: Make it includable in C++ mode.
+
2003-10-21 Bruno Haible <bruno@clisp.org>
* canonicalize.c (lstat): Define as an alias to 'stat' on systems
-/* Copyright (C) 1995, 2000-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 2000-2003 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
- Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _HASH_H
-# define _HASH_H
+#define _HASH_H
-# include <obstack.h>
+#include <obstack.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
typedef struct hash_table
{
extern unsigned long int next_prime (unsigned long int seed);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* not _HASH_H */
+2003-10-14 Bruno Haible <bruno@clisp.org>
+
+ Fix compilation errors in C++ mode.
+ * msgfilter.c (process_string): Cast the xrealloc expression.
+ * xgettext.c (language_to_extractor, extension_to_language): Move the
+ typedef after the struct definition.
+
2003-10-13 Bruno Haible <bruno@clisp.org>
Support CR/LF line terminators in C sources even on Unix.
if (length == allocated)
{
allocated = allocated + (allocated >> 1);
- result = xrealloc (result, allocated);
+ result = (char *) xrealloc (result, allocated);
}
{
ssize_t nread = read (fd[0], result + length, allocated - length);
static extractor_ty
language_to_extractor (const char *name)
{
- typedef struct table_ty table_ty;
struct table_ty
{
const char *name;
struct formatstring_parser *formatstring_parser1;
struct formatstring_parser *formatstring_parser2;
};
+ typedef struct table_ty table_ty;
static table_ty table[] =
{
static const char *
extension_to_language (const char *extension)
{
- typedef struct table_ty table_ty;
struct table_ty
{
const char *extension;
const char *language;
};
+ typedef struct table_ty table_ty;
static table_ty table[] =
{