]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
AIX 4.3.3 has an incompatible stpncpy().
authorBruno Haible <bruno@clisp.org>
Sat, 9 Mar 2002 03:40:18 +0000 (03:40 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:07:48 +0000 (12:07 +0200)
ChangeLog
acconfig.h
configure.in
lib/ChangeLog
lib/Makefile.am
lib/stpncpy.c
lib/stpncpy.h

index 6d822ac79e6204aacd0d2363878d10dce5412bd8..ca5ebffe9a6de319f92b090235096941192375b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
index 2407bc32bd5591cacbdaebaab172fc56021b0c1a..21e44d6db883ca2d7ea654085e76c8e3f44abc7d 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
 
 
index 8d5e246544845c52ceaec693fdfa48a00652dd5e..48a7ff4220abff784cc6e57bca422aced52a7523 100644 (file)
@@ -1,8 +1,8 @@
 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.
@@ -68,7 +68,7 @@ AC_FUNC_ALLOCA
 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
index 371e4f2a48c4717fb99129a24edb9a051f9c0f93..d23a99e051fe58cae92e19aee8e150c868859225 100644 (file)
@@ -1,3 +1,13 @@
+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.
index a566bd891ef4eae63f5862a5ff6199d4e81e7e24..c16c7fd99e8ad975cdf0215133196c085410d84a 100644 (file)
@@ -52,6 +52,7 @@ libgettextlib_la_SOURCES = \
   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 \
@@ -71,7 +72,6 @@ LIBADD_SOURCE = \
   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 \
index c489f76b242fba5f22d994c007fe0e32b5f523ca..cb34e08c6abd2ae9811c113fceea7edf3cbb277c 100644 (file)
@@ -1,4 +1,4 @@
-/* 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
@@ -99,3 +108,5 @@ __stpncpy (dest, src, n)
 #ifdef weak_alias
 weak_alias (__stpncpy, stpncpy)
 #endif
+
+#endif
index 0c4df53d04f81e15ecf0777d889a0e6c57db7551..2b1e680fb0f6233fd43565452191150acb7ab18b 100644 (file)
@@ -1,5 +1,5 @@
 /* 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