]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Assume <stddef.h>, <stdlib.h>, <string.h>, <locale.h> exist.
authorBruno Haible <bruno@clisp.org>
Sun, 21 Jan 2001 16:12:24 +0000 (16:12 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jan 2001 16:12:24 +0000 (16:12 +0000)
40 files changed:
intl/ChangeLog
intl/bindtextdom.c
intl/dcigettext.c
intl/dgettext.c
intl/dngettext.c
intl/explodename.c
intl/finddomain.c
intl/gettext.c
intl/gettextP.h
intl/intlh.inst.in
intl/l10nflist.c
intl/libgettext.h
intl/loadmsgcat.c
intl/localealias.c
intl/ngettext.c
intl/textdomain.c
lib/ChangeLog
lib/fstrcmp.c
lib/system.h
lib/vasprintf.c
m4/ChangeLog
m4/gettext.m4
m4/setlocale.m4
src/ChangeLog
src/dir-list.c
src/gettextp.c
src/message.c
src/msgcmp.c
src/msgcomm.c
src/msgfmt.c
src/msgmerge.c
src/msgunfmt.c
src/open-po.c
src/po.c
src/setlocale.c
src/str-list.h
src/xget-lex.c
src/xgettext.c
tests/ChangeLog
tests/plural-1-prg.c

index 5837d2e334d2d2b97ea7bd90535073d49c2fa95d..dad9a5b0dfdb02f3cd5be6785e0f8e58a5106f79 100644 (file)
@@ -1,3 +1,22 @@
+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.
index 1d5c561c0181d389bbf2f905eaae4da86581aa84..795ab485f141fbff1b82d25d7b96df8932ad25cb 100644 (file)
 # 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>
index 545a12fdcada4aa615e8f90a9a1410ab6db6499b..71ebc35c5e04b10563a0c528ba9d1b5e2ee0ab3f 100644 (file)
@@ -53,25 +53,10 @@ extern int errno;
 # 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
@@ -82,9 +67,7 @@ void free ();
 # 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>
index 515bf6c21fc1ece6f25940ec2549b5681dd38337..11ed70aa3aff72dc0e26eb4e4ccfea1cd5432f6e 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -19,9 +19,7 @@
 # include <config.h>
 #endif
 
-#if defined HAVE_LOCALE_H || defined _LIBC
-# include <locale.h>
-#endif
+#include <locale.h>
 
 #ifdef _LIBC
 # include <libintl.h>
index ab293211df6fa601ad6364d8fbfd7498e392af6b..c9623a4d1b2c2547bd3e14e0cad3200851d438ee 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -19,9 +19,7 @@
 # include <config.h>
 #endif
 
-#if defined HAVE_LOCALE_H || defined _LIBC
-# include <locale.h>
-#endif
+#include <locale.h>
 
 #include "gettext.h"
 #include "gettextP.h"
index 6253c48f6bbc9538aca225299922429676320b63..c4ddcc41a20c4d2ca42d87b69c88484adadf5234 100644 (file)
 # 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"
index 967e24697f8a96d1d3c71637f93bbe9b7bf09928..a1fdf94213831c1c7196c3bc6e24fb3ddcd28724 100644 (file)
 
 #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>
index 9f2679331a80e9a75359c350139abe3b5c7e3878..50d594c84b3c2c62935acd0c484a50e764799c3f 100644 (file)
 # 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
index daba98aba56e33c33b3fa2f9fc4147942505f880..27c04e4ca506aa7f7a74cc254f060b5cb5d736b5 100644 (file)
@@ -19,9 +19,7 @@
 #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"
index fe8281fecea682b94586d466a6fea8845d708733..dee49065404ed8bcd52cffb5ba8284d4837646cd 100644 (file)
@@ -18,7 +18,7 @@
 #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.  */
index 2da1ba2e95d8186d4afb3ae2e34dc64e0fce4b1d..0ded3ce4aaf1569bdbc4a93bba31aaae8c132d13 100644 (file)
 # 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"
 
index 644d727a6d55b98642be609e6f4d20155de00c2c..3834a08db87551e2fecbc50746a2d346e88d3a65 100644 (file)
 #define __USE_GNU_GETTEXT 1
 
 #include <sys/types.h>
-
-#if HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <locale.h>
 
 
 #ifdef __cplusplus
index 6462daa2c169327860c875d91563eda3a807522e..34f1e661a39b927063d9241e305ebd1111b4de72 100644 (file)
@@ -49,15 +49,8 @@ char *alloca ();
 # 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>
index cdda88aeb363ea396df836418a39059bdef7b726..e55d0c0968c37874fbae1f4b7c861db6a2d8c54e 100644 (file)
@@ -47,25 +47,9 @@ char *alloca ();
 # 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
index aeb8db7092248cee49ed88ad985ab93d10e3627d..571000745b5a31e44e6fea24eb20c490a028370b 100644 (file)
 # 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"
index 55bb55015a7d655457733c33efeb2c42f59ec5c6..99650d6a3eff76c50c4f3da513071f180250ba01 100644 (file)
 # 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>
index 474adce616c60a0f885b87944532b96ffb1f60f2..8be3a5d5447b1eefc864b881742f9db1a5816989 100644 (file)
@@ -1,3 +1,9 @@
+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.
index b1f597127592900e2b2be70984639e57d512d10b..dd1a1af68978897a7073eb290d6d79cc557a08a5 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
index f938d76148d1988b7406f2eb2b97e3f1594259d3..10c2faf953692e4a2b4c372b10286234c0264532 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -53,13 +53,9 @@ extern int strncasecmp PARAMS ((const char *__s1, const char *__s2,
                                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
index becc34a3c65603ee0af1936b9fbaa49aa0083cad..cd833ec833346ed60be533b330b36b3888d4781d 100644 (file)
@@ -22,13 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #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>
index dcab5ef2abbba4e0bc5fec2309895d4fd2d34900..12a0b88781880a0b8ff1d57c2f1464ddbb245fa9 100644 (file)
@@ -1,3 +1,8 @@
+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.
index b0bf2690d07ca4361873372dcd0b911502840178..bc7b944b65a1d243623c817e279cd9e2b7422393 100644 (file)
@@ -230,17 +230,6 @@ __argz_count __argz_stringify __argz_next])
      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.
index 3b400ca626b267298cdf2bc2735bdde77cc50bc6..ad183107f71f13aab4ca64f99bc730011f217ace 100644 (file)
@@ -1,4 +1,4 @@
-#serial 1
+#serial 2
 
 # Check for setlocale declaration.
 
@@ -8,9 +8,7 @@ AC_MSG_CHECKING([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
index 5272f638b3aeefc5546a62d6c6c8017e117550fb..e761eca0f1fb02a0cdb6e1a5e76fa2fd8e33026e 100644 (file)
@@ -1,3 +1,21 @@
+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.
index 9173bb5391965cccfd574877633008f80d8ae815..f1e5fe49b0b2fae2fb7d298159f42719184af321 100644 (file)
@@ -1,5 +1,5 @@
 /* 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>
 
@@ -22,9 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #endif
 
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 
 #include "system.h"
 #include "dir-list.h"
index 6b6d1079235a060c5da05f7fa2b70301f7efe383..e7475676d54c1202c39aee12715479625b7b9b53 100644 (file)
@@ -1,5 +1,5 @@
 /* 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"
index 5749a6e2177ac50dde096f3f94971a925167f3fb..4d527422bd89343a2cbb9fce70b92ce4e11451e2 100644 (file)
@@ -29,13 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 # 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"
index 059849e04811be44e27e72b0e0588e373b380e86..9be13bbea8e148252305c74e0d89d22c32c584fe 100644 (file)
@@ -1,5 +1,5 @@
 /* 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"
index 95d7c8840ca84431b04a9d56eb5ea32535656766..8dcc4e2cc9268f71203c8e4bb88e49c8e5b475f4 100644 (file)
@@ -1,5 +1,5 @@
 /* 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>
index 97a76b83234add93f27853453eb37f3b4c7c27ca..46ace8e7b9bd765b9f1533a574818b69e357c80d 100644 (file)
 #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"
 
index 4f38857f9c362ad60e0b8d5ca2fce683b5164048..1732c186b43874ed6359a496513e6a3e35e24246 100644 (file)
@@ -1,5 +1,5 @@
 /* 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"
index 48f41a5ae29bbbe756e845b6a8641f4bc3b4272b..6842a08a14c9cc922a99e4cf0b0f4a8dca7c5fae 100644 (file)
 #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"
 
index 1954b02030970c8feada216ed1092281af00cd71..0bf4379bc9a015378ea58d18d4eea9c1325cb211 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -23,16 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #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"
index a74fda97ab4d3c98a8ce533998fe67f9ed7dea3b..0e1ab8653bfdf37dca2d5a461dcec7041e4b2fd1 100644 (file)
--- a/src/po.c
+++ b/src/po.c
@@ -1,5 +1,5 @@
 /* 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>
 
@@ -24,10 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include <ctype.h>
 #include <stdio.h>
-
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 
 #include "po.h"
 #include "po-hash.h"
index eed05a12dfb0df106607f36b34d362cde110cb7b..71d2637ce1f485b0ea5bcad80ddb1c59ce69626c 100644 (file)
 # 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 *
@@ -103,10 +90,8 @@ setlocale (category, locale)
      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;
@@ -115,6 +100,7 @@ setlocale (category, locale)
   };
   static struct list *facets = NULL;
   struct list *facetp;
+  char *retval;
 
   if (locale != NULL)
     {
@@ -162,17 +148,6 @@ setlocale (category, locale)
        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')
     {
index cecee48957c75a4ef16919d962422aa28e7bb341..def4f52f5ce42d4246b6246b55e22ef282c2844f 100644 (file)
@@ -1,5 +1,5 @@
 /* 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>
 
@@ -21,12 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #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.  */
index b86fbd041239dd3c00ea3bc72f2b4a5123bf477b..6aa5ae3985da19bcdd6f02faa32186ac6f8ef160 100644 (file)
 #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"
index 0ccabd44acbc6744b3f0d4c9953930f4f5892223..e4da03f10e775b9d49ec9a26d30d160f72678327 100644 (file)
 #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>
index 74660c7fe6eb07255be075c1e7f3ccb1230734d3..9740a3a4a555fde0dbecb72ad7c3f6c0c40431e2 100644 (file)
@@ -1,3 +1,7 @@
+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.
index daaa580b72f0a0995116a9cfd076732f4901b19d..033eaa988ad690617a9344db4671013543744c8c 100644 (file)
@@ -6,12 +6,7 @@
 
 #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