Move some conditionals from the .c file to the .m4 file.
authorBruno Haible <bruno@clisp.org>
Mon, 17 Jan 2005 13:15:19 +0000 (13:15 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 17 Jan 2005 13:15:19 +0000 (13:15 +0000)
lib/ChangeLog
lib/stpncpy.c
m4/ChangeLog
m4/stpncpy.m4

index 37d21ba26fd927d8ff162fd0c30b19b496df3625..b5800b9741c4d98f45c0a02a5ea2ca9a7ef4ddfa 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-06  Bruno Haible  <bruno@clisp.org>
+
+       * stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming, redundant
+       because stpncpy.m4 takes care of it.
+
 2004-01-24  Bruno Haible  <bruno@clisp.org>
 
        * progreloc.c (xstrdup): Define as strdup if no xmalloc should be used.
index 3f7473f946c80ca22541df32a836f86ea74dfda0..87e4382b54a369284460035a991491414a4b7374 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995-1997, 2002-2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995-1997, 2002-2003, 2005 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.
 /* Specification.  */
 #include "stpncpy.h"
 
-#if !HAVE_STPNCPY
-
-#ifndef _LIBC
-/* 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
 # define __stpncpy stpncpy
 #endif
@@ -102,5 +93,3 @@ __stpncpy (char *dest, const char *src, size_t n)
 #ifdef weak_alias
 weak_alias (__stpncpy, stpncpy)
 #endif
-
-#endif
index 52091b52a4a98e6a2a3e80da39d217e5215ea680..e75901164dc62a1f5ac9d076fc48bab05a693d2d 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-06  Bruno Haible  <bruno@clisp.org>
+
+       * stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
+
 2005-01-04  Jim Meyering  <jim@meyering.net>
 
        Changes imported from coreutils.
index aebfe739b9b8df5ed7195c5e4fce52cba6e651f8..74b807cb043c06501f51e0e3fae8b97e64c78a29 100644 (file)
@@ -1,5 +1,5 @@
-# stpncpy.m4 serial 1
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+# stpncpy.m4 serial 2
+dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -51,6 +51,8 @@ int main () {
     AC_DEFINE(HAVE_STPNCPY, 1,
       [Define if you have the stpncpy() function and it works.])
   else
+    AC_DEFINE([stpncpy], [gnu_stpncpy],
+      [Define to a replacement function name for stpncpy().])
     AC_LIBOBJ([stpncpy])
     gl_PREREQ_STPNCPY
   fi