+2001-01-07 Bruno Haible <haible@clisp.cons.org>
+
+ Assume <stddef.h>, <stdlib.h>, <string.h>, <locale.h> exist.
+ * intlh.inst.in: Likewise.
+ * libgettext.h: Likewise.
+ * gettextP.h: Likewise.
+ * bindtextdom.c: Likewise.
+ * dcigettext.c: Likewise.
+ * dgettext.c: Likewise.
+ * dngettext.c: Likewise.
+ * explodename.c: Likewise.
+ * finddomain.c: Likewise.
+ * gettext.c: Likewise.
+ * l10nflist.c: Likewise.
+ * loadmsgcat.c: Likewise.
+ * localealias.c: Likewise.
+ * ngettext.c: Likewise.
+ * textdomain.c: Likewise.
+
2001-01-06 Bruno Haible <haible@clisp.cons.org>
Remove catgets fallback code.
# include <config.h>
#endif
-#if defined HAVE_STDDEF_H || defined _LIBC
-# include <stddef.h>
-#endif
-#if defined HAVE_STDLIB_H || defined _LIBC
-# include <stdlib.h>
-#else
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef _LIBC
# include <libintl.h>
# define __set_errno(val) errno = (val)
#endif
-#if defined HAVE_STDDEF_H || defined _LIBC
-# include <stddef.h>
-#endif
-#if defined HAVE_STDLIB_H || defined _LIBC
-# include <stdlib.h>
-#else
-char *getenv ();
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
+#include <stddef.h>
+#include <stdlib.h>
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <string.h>
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# include <unistd.h>
#endif
-#if defined HAVE_LOCALE_H || defined _LIBC
-# include <locale.h>
-#endif
+#include <locale.h>
#if defined HAVE_SYS_PARAM_H || defined _LIBC
# include <sys/param.h>
/* Implementation of the dgettext(3) function.
- Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 2000, 2001 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 <config.h>
#endif
-#if defined HAVE_LOCALE_H || defined _LIBC
-# include <locale.h>
-#endif
+#include <locale.h>
#ifdef _LIBC
# include <libintl.h>
/* Implementation of the dngettext(3) function.
- Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 2000, 2001 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 <config.h>
#endif
-#if defined HAVE_LOCALE_H || defined _LIBC
-# include <locale.h>
-#endif
+#include <locale.h>
#include "gettext.h"
#include "gettextP.h"
# include <config.h>
#endif
-#if defined HAVE_STDLIB_H || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
#include "loadinfo.h"
#include <stdio.h>
#include <sys/types.h>
-
-#if defined HAVE_STDLIB_H || defined _LIBC
-# include <stdlib.h>
-#else
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
+#include <stdlib.h>
+#include <string.h>
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
# define __need_NULL
# include <stddef.h>
#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h> /* Just for NULL. */
-# else
-# ifdef HAVE_STRING_H
-# include <string.h>
-# else
-# define NULL ((void *) 0)
-# endif
-# endif
+# include <stdlib.h> /* Just for NULL. */
#endif
#ifdef _LIBC
#ifndef _GETTEXTP_H
#define _GETTEXTP_H
-#if defined HAVE_STDDEF_H || defined _LIBC
-# include <stddef.h> /* Get size_t. */
-#endif
+#include <stddef.h> /* Get size_t. */
#ifdef _LIBC
# include "../iconv/gconv_int.h"
#ifndef _LIBINTL_H
#define _LIBINTL_H 1
-@INCLUDE_LOCALE_H@
+#include <locale.h>
/* We define an additional symbol to signal that we use the GNU
implementation of gettext. */
# include <config.h>
#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
+#include <string.h>
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
#endif
#include <ctype.h>
#include <sys/types.h>
-
-#if defined HAVE_STDLIB_H || defined _LIBC
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
#include "loadinfo.h"
#define __USE_GNU_GETTEXT 1
#include <sys/types.h>
-
-#if HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <locale.h>
#ifdef __cplusplus
# endif
#endif
-#if defined HAVE_STDLIB_H || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
# endif
#endif
-#if defined HAVE_STDLIB_H || defined _LIBC
-# include <stdlib.h>
-#else
-char *getenv ();
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
+#include <stdlib.h>
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
+#include <string.h>
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# define __need_NULL
# include <stddef.h>
#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h> /* Just for NULL. */
-# else
-# ifdef HAVE_STRING_H
-# include <string.h>
-# else
-# define NULL ((void *) 0)
-# endif
-# endif
+# include <stdlib.h> /* Just for NULL. */
#endif
#include "gettext.h"
# include <config.h>
#endif
-#if defined HAVE_STDLIB_H || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
+#include <stdlib.h>
+#include <string.h>
#ifdef _LIBC
# include <libintl.h>
+2001-01-07 Bruno Haible <haible@clisp.cons.org>
+
+ * system.h: Assume <stdlib.h>, <string.h> exist.
+ * fstrcmp.c: Likewise.
+ * vasprintf.c: Likewise.
+
2001-01-05 Bruno Haible <haible@clisp.cons.org>
* basename.c: Include <stdio.h>, needed by assert on SunOS4.
/* Functions to make fuzzy comparisons between strings
- Copyright (C) 1988, 1989, 1992, 1993, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1988-1989, 1992-1993, 1995, 2001 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 "config.h"
#endif
-#ifdef HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-
+#include <string.h>
#include <stdio.h>
#ifdef HAVE_LIMITS_H
/* Header for GNU gettext libiberty
- Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 2000, 2001 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
size_t __n));
extern char *strstr PARAMS ((const char *__str, const char *__sub));
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-#else
-# include <strings.h>
+#include <string.h>
+#if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
#endif
#if !HAVE_MEMCPY
# ifndef memcpy
#include <stdio.h>
#include <string.h>
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-extern unsigned long strtoul ();
-extern char *malloc ();
-#endif
+#include <stdlib.h>
#if __STDC__
# include <stdarg.h>
+2001-01-07 Bruno Haible <haible@clisp.cons.org>
+
+ * gettext.m4 (AM_GNU_GETTEXT): Assume <locale.h> exists.
+ * setlocale.m4 (gt_SETLOCALE): Likewise.
+
2001-01-06 Bruno Haible <haible@clisp.cons.org>
Remove catgets fallback code.
fi
fi
- dnl The reference to <locale.h> in the installed <libintl.h> file
- dnl must be resolved because we cannot expect the users of this
- dnl to define HAVE_LOCALE_H.
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
- AC_SUBST(INCLUDE_LOCALE_H)
-
dnl In the intl/Makefile.in we have a special dependency which makes
dnl only sense for gettext. We comment this out for non-gettext
dnl packages.
-#serial 1
+#serial 2
# Check for setlocale declaration.
AC_CACHE_VAL(gt_cv_proto_setlocale, [
AC_TRY_COMPILE([
#include <stdlib.h>
-#ifdef HAVE_LOCALE_H
#include <locale.h>
-#endif
#if defined(__STDC__) || defined(__cplusplus)
char* setlocale (int category, char* locale);
#else
+2001-01-07 Bruno Haible <haible@clisp.cons.org>
+
+ Assume <stddef.h>, <stdlib.h>, <string.h>, <locale.h> exist.
+ * dir-list.c: Likewise.
+ * gettextp.c: Likewise.
+ * message.c: Likewise.
+ * msgcmp.c: Likewise.
+ * msgcomm.c: Likewise.
+ * msgfmt.c: Likewise.
+ * msgmerge.c: Likewise.
+ * msgunfmt.c: Likewise.
+ * open-po.c: Likewise.
+ * po.c: Likewise.
+ * setlocale.c: Likewise.
+ * str-list.h: Likewise.
+ * xget-lex.c: Likewise.
+ * xgettext.c: Likewise.
+
2001-01-06 Bruno Haible <haible@clisp.cons.org>
* Makefile.am (datadir): Assume DATADIRNAME = share.
/* GNU gettext - internationalization aids
- Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
#include "config.h"
#endif
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
#include "system.h"
#include "dir-list.h"
/* gettext - retrieve text string from message catalog and print it.
- Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, May 1995.
This program is free software; you can redistribute it and/or modify
#include <getopt.h>
#include <stdio.h>
-
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *getenv ();
-#endif
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <stdlib.h>
+#include <locale.h>
#include "error.h"
#include "system.h"
# include <limits.h>
#endif
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <locale.h>
+#include <stdlib.h>
#include "fstrcmp.h"
#include "message.h"
/* GNU gettext - internationalization aids
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
This program is free software; you can redistribute it and/or modify
#include <getopt.h>
#include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <stdlib.h>
+#include <locale.h>
#include "dir-list.h"
#include "error.h"
/* GNU gettext - internationalization aids
- Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2000, 2001 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
#include <getopt.h>
#include <stdio.h>
#include <sys/types.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <locale.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#include <stdio.h>
#include <sys/param.h>
#include <sys/types.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <stdlib.h>
+#include <locale.h>
#include "hash.h"
/* GNU gettext - internationalization aids
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
This program is free software; you can redistribute it and/or modify
#include <getopt.h>
#include <limits.h>
#include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-
-#if HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
+#include <locale.h>
#include "dir-list.h"
#include "error.h"
#include <stdio.h>
#include <sys/param.h>
#include <sys/types.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <stdlib.h>
+#include <locale.h>
#include "hash.h"
/* open-po - search for .po file along search path list and open for reading
- Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
This program is free software; you can redistribute it and/or modify
#include <errno.h>
#include <stdio.h>
#include <sys/types.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
#include "open-po.h"
#include "dir-list.h"
/* GNU gettext - internationalization aids
- Copyright (C) 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 1998, 2000, 2001 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
#include <ctype.h>
#include <stdio.h>
-
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
#include "po.h"
#include "po-hash.h"
# include <config.h>
#endif
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# endif
-extern char *getenv ();
-#endif
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
-
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <stdlib.h>
+#include <locale.h>
+#include <string.h>
/* Return string representation of locale CATEGORY. */
static const char *
int category;
SETLOCALE_CONST char *locale;
{
- char *retval;
static char C_string[] = "C";
static char *current_locale = C_string;
-#ifdef HAVE_LOCALE_H
struct list
{
int category;
};
static struct list *facets = NULL;
struct list *facetp;
+ char *retval;
if (locale != NULL)
{
retval = facetp->current_locale;
break;
}
-#else
- if (locale != NULL)
- {
- if (current_locale != C_string)
- free (current_locale);
- current_locale = (char *) malloc (strlen (locale) + 1);
- strcpy (current_locale, locale);
- }
-
- retval = current_locale;
-#endif
if (retval[0] == '\0')
{
/* GNU gettext - internationalization aids
- Copyright (C) 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
#define SRC_STR_LIST_H 1
/* Get size_t and NULL. */
-#ifdef HAVE_STDDEF_H
-# include <stddef.h>
-#else
-# include <sys/types.h>
-# include <stdio.h>
-#endif
+#include <stddef.h>
/* Type describing list of immutable strings,
implemented using a dynamic array. */
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
#include "dir-list.h"
#include "error.h"
#include <stdio.h>
#include <time.h>
#include <sys/types.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <stdlib.h>
+#include <locale.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
+2001-01-07 Bruno Haible <haible@clisp.cons.org>
+
+ * plural-1-prg.c: Assume <locale.h> exists.
+
2001-01-06 Bruno Haible <haible@clisp.cons.org>
Translations are now disabled in C locale.
#include <stdlib.h>
#include <stdio.h>
-
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#else
-extern char *setlocale ();
-#endif
+#include <locale.h>
/* Make sure we use the included libintl, not the system's one. */
#if 0