From: Bruno Haible Date: Sat, 15 Aug 2009 17:34:14 +0000 (+0200) Subject: Stop using gnulib module 'strdup'. X-Git-Tag: v0.18~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1b075aa2e96bf983123fea8e8ac10127d10e86c;p=thirdparty%2Fgettext.git Stop using gnulib module 'strdup'. --- diff --git a/ChangeLog b/ChangeLog index 72c03a663..78ebd4587 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-15 Bruno Haible + + Stop using gnulib module 'strdup'. + * Makefile.am (distcheck-hook): Don't compare strdup.c. + 2009-08-14 Bruno Haible * autogen.sh: Invoke gnulib-tool also for gettext-runtime/libasprintf. diff --git a/Makefile.am b/Makefile.am index 9ca7eca46..03ef081a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -99,7 +99,6 @@ distcheck-hook: cmp -s gettext-tools/examples/hello-java-awt/m4/TestAWT.class gettext-tools/examples/hello-java-swing/m4/TestAWT.class test "`sed 1,15d gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d gettext-runtime/libasprintf/alloca.in.h | md5sum`" cmp -s gettext-tools/libgrep/memchr.c gettext-tools/gnulib-lib/memchr.c - cmp -s gettext-tools/libgrep/strdup.c gettext-tools/gnulib-lib/strdup.c # DJGPP port. diff --git a/gettext-tools/libgrep/ChangeLog b/gettext-tools/libgrep/ChangeLog index d2b1555ae..897d75f45 100644 --- a/gettext-tools/libgrep/ChangeLog +++ b/gettext-tools/libgrep/ChangeLog @@ -1,3 +1,9 @@ +2009-08-15 Bruno Haible + + Stop using gnulib module 'strdup'. + * strdup.c: Remove file. + * Makefile.am (LIBADD_SOURCE): Remove strdup.c. + 2008-04-28 Eric Blake * memchr.c (__memchr): Hand-inline the TYPE_MAXIMUM check. diff --git a/gettext-tools/libgrep/Makefile.am b/gettext-tools/libgrep/Makefile.am index 3e0fab944..8edc93d0e 100644 --- a/gettext-tools/libgrep/Makefile.am +++ b/gettext-tools/libgrep/Makefile.am @@ -1,5 +1,5 @@ ## Makefile for libgrep directory in GNU gettext package. -## Copyright (C) 2005-2007 Free Software Foundation, Inc. +## Copyright (C) 2005-2007, 2009 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 @@ -35,8 +35,7 @@ libgrep_a_SOURCES = \ LIBADD_SOURCE = \ memchr.c \ - regex.h regex.c \ - strdup.c + regex.h regex.c # How to build libgrep.a. libgrep_a_LIBADD = @LIBGREPOBJS@ diff --git a/gettext-tools/libgrep/strdup.c b/gettext-tools/libgrep/strdup.c deleted file mode 100644 index bebe5c8fb..000000000 --- a/gettext-tools/libgrep/strdup.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006, 2007 Free - Software Foundation, Inc. - - This file is part of the GNU C Library. - - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _LIBC -# include -#endif - -/* Get specification. */ -#include - -#include - -#undef __strdup -#ifdef _LIBC -# undef strdup -#endif - -#ifndef weak_alias -# define __strdup strdup -#endif - -/* Duplicate S, returning an identical malloc'd string. */ -char * -__strdup (const char *s) -{ - size_t len = strlen (s) + 1; - void *new = malloc (len); - - if (new == NULL) - return NULL; - - return (char *) memcpy (new, s, len); -} -#ifdef libc_hidden_def -libc_hidden_def (__strdup) -#endif -#ifdef weak_alias -weak_alias (__strdup, strdup) -#endif diff --git a/gettext-tools/m4/ChangeLog b/gettext-tools/m4/ChangeLog index 285314171..dfbf8f567 100644 --- a/gettext-tools/m4/ChangeLog +++ b/gettext-tools/m4/ChangeLog @@ -1,3 +1,8 @@ +2009-08-15 Bruno Haible + + Stop using gnulib module 'strdup'. + * libgrep.m4 (gt_LIBGREP): Don't invoke gl_FUNC_STRDUP. + 2009-08-03 Bruno Haible * setlocale.m4 (gt_SETLOCALE): Fix displayed message with diff --git a/gettext-tools/m4/libgrep.m4 b/gettext-tools/m4/libgrep.m4 index d1c046109..690dd6add 100644 --- a/gettext-tools/m4/libgrep.m4 +++ b/gettext-tools/m4/libgrep.m4 @@ -1,5 +1,5 @@ -# libgrep.m4 serial 3 (gettext-0.18) -dnl Copyright (C) 2005-2006, 2008 Free Software Foundation, Inc. +# libgrep.m4 serial 4 (gettext-0.18) +dnl Copyright (C) 2005-2006, 2008-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,6 @@ AC_DEFUN([gt_LIBGREP], m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gt_LIBGREP_REPLACE_FUNCS])) gl_HARD_LOCALE gl_FUNC_MEMCHR - gl_FUNC_STRDUP gl_INCLUDED_REGEX([libgrep/regex.c]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index 9a5c62ba5..e31d8cfac 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,3 +1,8 @@ +2009-08-15 Bruno Haible + + Stop using gnulib module 'strdup'. + * modules/gettext-tools-misc (Files): Remove m4/strdup.m4. + 2009-08-10 Bruno Haible Avoid gcc warning on Cygwin. diff --git a/gnulib-local/modules/gettext-tools-misc b/gnulib-local/modules/gettext-tools-misc index 6ce3f0bfc..965f4988b 100644 --- a/gnulib-local/modules/gettext-tools-misc +++ b/gnulib-local/modules/gettext-tools-misc @@ -4,7 +4,6 @@ Files: m4/hard-locale.m4 m4/mbrtowc.m4 m4/memchr.m4 -m4/strdup.m4 m4/locale-fr.m4 m4/locale-ja.m4