From 45507493d857878cfeeed11d404a5645dd57c25c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 17 Jan 2005 13:15:19 +0000 Subject: [PATCH] Move some conditionals from the .c file to the .m4 file. --- lib/ChangeLog | 5 +++++ lib/stpncpy.c | 13 +------------ m4/ChangeLog | 4 ++++ m4/stpncpy.m4 | 6 ++++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 37d21ba26f..b5800b9741 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 Bruno Haible + + * stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming, redundant + because stpncpy.m4 takes care of it. + 2004-01-24 Bruno Haible * progreloc.c (xstrdup): Define as strdup if no xmalloc should be used. diff --git a/lib/stpncpy.c b/lib/stpncpy.c index 3f7473f946..87e4382b54 100644 --- a/lib/stpncpy.c +++ b/lib/stpncpy.c @@ -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. @@ -27,15 +27,6 @@ /* 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 diff --git a/m4/ChangeLog b/m4/ChangeLog index 52091b52a4..e75901164d 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2005-01-06 Bruno Haible + + * stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here. + 2005-01-04 Jim Meyering Changes imported from coreutils. diff --git a/m4/stpncpy.m4 b/m4/stpncpy.m4 index aebfe739b9..74b807cb04 100644 --- a/m4/stpncpy.m4 +++ b/m4/stpncpy.m4 @@ -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 -- 2.30.2