]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Stop using gnulib module 'strdup'.
authorBruno Haible <bruno@clisp.org>
Sat, 15 Aug 2009 17:34:14 +0000 (19:34 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2009 00:31:13 +0000 (02:31 +0200)
ChangeLog
Makefile.am
gettext-tools/libgrep/ChangeLog
gettext-tools/libgrep/Makefile.am
gettext-tools/libgrep/strdup.c [deleted file]
gettext-tools/m4/ChangeLog
gettext-tools/m4/libgrep.m4
gnulib-local/ChangeLog
gnulib-local/modules/gettext-tools-misc

index 72c03a66389b02c7f7bdcb59450d25ae241654ba..78ebd4587dd99c838bd5442249a4d8fc1766d522 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-15  Bruno Haible  <bruno@clisp.org>
+
+       Stop using gnulib module 'strdup'.
+       * Makefile.am (distcheck-hook): Don't compare strdup.c.
+
 2009-08-14  Bruno Haible  <bruno@clisp.org>
 
        * autogen.sh: Invoke gnulib-tool also for gettext-runtime/libasprintf.
index 9ca7eca468e3d5cad2b18da38eea3782da7198e5..03ef081a8e6b01b1da8fa742ae457bc9b20bcc9b 100644 (file)
@@ -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.
 
index d2b1555aea74845a259607474533a0d326e075f9..897d75f457db8148216f4a9b86a4ce7fe6d734be 100644 (file)
@@ -1,3 +1,9 @@
+2009-08-15  Bruno Haible  <bruno@clisp.org>
+
+       Stop using gnulib module 'strdup'.
+       * strdup.c: Remove file.
+       * Makefile.am (LIBADD_SOURCE): Remove strdup.c.
+
 2008-04-28  Eric Blake  <ebb9@byu.net>
 
        * memchr.c (__memchr): Hand-inline the TYPE_MAXIMUM check.
index 3e0fab944ae190d1ee692f2b10d9141f5441c014..8edc93d0e8c193a2ea21592fabe084344210742f 100644 (file)
@@ -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 (file)
index bebe5c8..0000000
+++ /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 <config.h>
-#endif
-
-/* Get specification.  */
-#include <string.h>
-
-#include <stdlib.h>
-
-#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
index 285314171a2d16edaa522382cb8abaa9d59808ac..dfbf8f5677412d95df3753b3e590784fb213c980 100644 (file)
@@ -1,3 +1,8 @@
+2009-08-15  Bruno Haible  <bruno@clisp.org>
+
+       Stop using gnulib module 'strdup'.
+       * libgrep.m4 (gt_LIBGREP): Don't invoke gl_FUNC_STRDUP.
+
 2009-08-03  Bruno Haible  <bruno@clisp.org>
 
        * setlocale.m4 (gt_SETLOCALE): Fix displayed message with
index d1c046109b38e67d36cbb16fd6e4ab1a586433f9..690dd6addf24fee50d92116f4ce4c9ac352b006f 100644 (file)
@@ -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])
index 9a5c62ba5432c5688c44f7219dfb13cb7658c705..e31d8cfacc3d4f023b5899b5e1a217d1e38c69ce 100644 (file)
@@ -1,3 +1,8 @@
+2009-08-15  Bruno Haible  <bruno@clisp.org>
+
+       Stop using gnulib module 'strdup'.
+       * modules/gettext-tools-misc (Files): Remove m4/strdup.m4.
+
 2009-08-10  Bruno Haible  <bruno@clisp.org>
 
        Avoid gcc warning on Cygwin.
index 6ce3f0bfc91fc67cef410206264c255b663a8c5c..965f4988bf6550d4941908f7025e8501b3200267 100644 (file)
@@ -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