+2002-03-09 Bruno Haible <bruno@clisp.org>
+
+ * configure.in: Don't check for stpncpy; AIX 4.3.3 has an incompatible
+ implementation of it.
+ * acconfig.h (HAVE_STPNCPY): Define on glibc systems only.
+
2002-03-07 Bruno Haible <bruno@clisp.org>
* Makefile.am (MAKEINFO): New variable.
/* Special definitions, processed by autoheader.
- Copyright (C) 1995-1998, 2001 Free Software Foundation.
+ Copyright (C) 1995-1998, 2001-2002 Free Software Foundation.
Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */
/* Default value for alignment of strings in .mo file. */
@BOTTOM@
/* We don't test for the basename function but still want to use the
- version in the libc when compiling for a system using glibc. */
+ version in the libc when compiling for a system using glibc. Likewise
+ for stpncpy. */
#ifdef __GNU_LIBRARY__
# define HAVE_BASENAME 1
+# define HAVE_STPNCPY 1
#endif
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
AC_INIT(src/msgfmt.c)
-AM_INIT_AUTOMAKE(gettext, 0.11)
-RELEASE_DATE=2002-01-31 dnl in "date +%Y-%m-%d" format
+AM_INIT_AUTOMAKE(gettext, 0.11.1)
+RELEASE_DATE=2002-03-07 dnl in "date +%Y-%m-%d" format
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([getcwd mblen memcpy posix_spawn putc_unlocked raise select \
strerror strtoul uname utime utimes])
-AC_REPLACE_FUNCS([memset stpcpy stpncpy strcspn \
+AC_REPLACE_FUNCS([memset stpcpy strcspn \
strcasecmp strncasecmp strpbrk strstr vasprintf])
AM_FUNC_GETLINE
if test $am_cv_func_working_getline != yes; then
+2002-03-09 Bruno Haible <bruno@clisp.org>
+
+ Portability to AIX 4.3.3.
+ * stpncpy.h (gnu_stpncpy): Renamed from stpncpy.
+ (stpncpy): Define as an alias.
+ * stpncpy.c: Compile nothing on glibc systems is set. Otherwise name
+ the function gnu_stpncpy.
+ * Makefile.am (LIBADD_SOURCE): Remove stpncpy.h, stpncpy.c.
+ (libgettextlib_la_SOURCES): Add stpncpy.h, stpncpy.c.
+
2002-03-04 Bruno Haible <bruno@clisp.org>
Portability to AIX 4.3.3.
progname.h progname.c \
safe-read.h safe-read.c \
sh-quote.h sh-quote.c \
+ stpncpy.h stpncpy.c \
strtoul.c \
tmpdir.h tmpdir.c \
ucs4-utf8.h ucs4-utf16.h \
setenv.h setenv.c unsetenv.c \
libstdarg.h \
stpcpy.h stpcpy.c \
- stpncpy.h stpncpy.c \
strcase.h strcasecmp.c strncasecmp.c \
strcspn.c \
strpbrk.h strpbrk.c \
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995-1997, 2002 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
# include <config.h>
#endif
+/* Specification. */
+#include "stpncpy.h"
+
+#ifndef __GNU_LIBRARY__
+
#ifdef _LIBC
# include <string.h>
#else
# include <sys/types.h>
+/* We cannot generally use the name 'stpncpy' since AIX 4 defines an unusable
+ variant of the function but we cannot use it. */
+# undef stpncpy
+# define stpncpy gnu_stpncpy
#endif
#ifndef weak_alias
#ifdef weak_alias
weak_alias (__stpncpy, stpncpy)
#endif
+
+#endif
/* String copying.
- Copyright (C) 1995, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2002 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
# endif
#endif
-#if HAVE_STPNCPY
-
-/* Get stpncpy() declaration. */
#include <string.h>
-#else
-
-#include <stddef.h>
+#ifndef __GNU_LIBRARY__
-extern char *stpncpy PARAMS ((char *__dst, const char *__src, size_t __n));
+/* When not using the GNU libc we use the stpncpy implementation we
+ provide here. */
+extern char *gnu_stpncpy PARAMS ((char *__dst, const char *__src, size_t __n));
+#define stpncpy(Dst, Src, N) gnu_stpncpy (Dst, Src, N)
#endif