From: Bruno Haible Date: Sat, 4 Jul 2020 20:21:58 +0000 (+0200) Subject: Avoid a module name and include file name collision with gnulib. X-Git-Tag: v0.21~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3e956dbf8b567f873c134c4b80279a9d5185d08;p=thirdparty%2Fgettext.git Avoid a module name and include file name collision with gnulib. * gnulib-local/lib/mem-hash-map.h: Renamed from gnulib-local/lib/hash.h. * gnulib-local/lib/mem-hash-map.c: Renamed from gnulib-local/lib/hash.c. Include mem-hash-map.h instead of hash.h. * gnulib-local/modules/mem-hash-map: Renamed from gnulib-local/modules/hash. Update. * gnulib-local/Makefile.am (EXTRA_DIST): Update. * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC, GNULIB_MODULES_LIBGETTEXTPO): Update. * libtextstyle/gnulib-local/modules/term-styled-ostream (Depends-on): Likewise. * gettext-tools/src/its.c: Include mem-hash-map.h instead of hash.h. * gettext-tools/src/locating-rule.c: Likewise. * gettext-tools/src/message.c: Likewise. * gettext-tools/src/message.h: Likewise. * gettext-tools/src/read-desktop.h: Likewise. * gettext-tools/src/write-mo.c: Likewise. * gettext-tools/src/write-qt.c: Likewise. * gettext-tools/src/x-c.c: Likewise. * gettext-tools/src/x-csharp.c: Likewise. * gettext-tools/src/x-desktop.c: Likewise. * gettext-tools/src/x-elisp.c: Likewise. * gettext-tools/src/x-java.c: Likewise. * gettext-tools/src/x-librep.c: Likewise. * gettext-tools/src/x-lisp.c: Likewise. * gettext-tools/src/x-scheme.c: Likewise. * gettext-tools/src/x-sh.c: Likewise. * gettext-tools/src/x-tcl.c: Likewise. * gettext-tools/src/x-vala.c: Likewise. * gettext-tools/src/xg-arglist-callshape.h: Likewise. * gettext-tools/src/xg-arglist-context.h: Likewise. * libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c: Likewise. --- diff --git a/.gitignore b/.gitignore index 102c17d22..b94824051 100644 --- a/.gitignore +++ b/.gitignore @@ -135,8 +135,6 @@ /gettext-tools/libgettextpo/gl_xlist.h /gettext-tools/libgettextpo/hard-locale.c /gettext-tools/libgettextpo/hard-locale.h -/gettext-tools/libgettextpo/hash.c -/gettext-tools/libgettextpo/hash.h /gettext-tools/libgettextpo/iconv.c /gettext-tools/libgettextpo/iconv.in.h /gettext-tools/libgettextpo/iconv_close.c @@ -171,6 +169,8 @@ /gettext-tools/libgettextpo/mbswidth.h /gettext-tools/libgettextpo/mbtowc-lock.c /gettext-tools/libgettextpo/mbtowc-lock.h +/gettext-tools/libgettextpo/mem-hash-map.c +/gettext-tools/libgettextpo/mem-hash-map.h /gettext-tools/libgettextpo/memchr.c /gettext-tools/libgettextpo/memchr.valgrind /gettext-tools/libgettextpo/minmax.h diff --git a/autogen.sh b/autogen.sh index 4c820f3a7..86bcd4155 100755 --- a/autogen.sh +++ b/autogen.sh @@ -154,7 +154,6 @@ if ! $skip_gnulib; then getopt-gnu gettext gettext-h - hash iconv javacomp javaexec @@ -165,6 +164,7 @@ if ! $skip_gnulib; then localename localtime lock + mem-hash-map memchr memmove memset @@ -305,11 +305,11 @@ if ! $skip_gnulib; then gcd getline gettext-h - hash iconv libtextstyle-dummy libunistring-optional markup + mem-hash-map minmax open relocatable-lib diff --git a/gettext-tools/src/its.c b/gettext-tools/src/its.c index 8adf04544..b8998a3a0 100644 --- a/gettext-tools/src/its.c +++ b/gettext-tools/src/its.c @@ -1,5 +1,5 @@ /* Internationalization Tag Set (ITS) handling - Copyright (C) 2015, 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2015, 2018-2020 Free Software Foundation, Inc. This file was written by Daiki Ueno , 2015. @@ -27,7 +27,7 @@ #include #include "error.h" #include "gettext.h" -#include "hash.h" +#include "mem-hash-map.h" #include #include #include diff --git a/gettext-tools/src/locating-rule.c b/gettext-tools/src/locating-rule.c index d80fe23d8..1a54d4d28 100644 --- a/gettext-tools/src/locating-rule.c +++ b/gettext-tools/src/locating-rule.c @@ -43,7 +43,7 @@ #include "filename.h" #include #include "gettext.h" -#include "hash.h" +#include "mem-hash-map.h" #include #include #include "xalloc.h" diff --git a/gettext-tools/src/message.c b/gettext-tools/src/message.c index 5f08ee2b6..d4c1a90ce 100644 --- a/gettext-tools/src/message.c +++ b/gettext-tools/src/message.c @@ -27,7 +27,7 @@ #include #include "fstrcmp.h" -#include "hash.h" +#include "mem-hash-map.h" #include "xalloc.h" #include "xmalloca.h" diff --git a/gettext-tools/src/message.h b/gettext-tools/src/message.h index 247609901..f6936dfc7 100644 --- a/gettext-tools/src/message.h +++ b/gettext-tools/src/message.h @@ -21,7 +21,7 @@ #include "str-list.h" #include "pos.h" -#include "hash.h" +#include "mem-hash-map.h" #include diff --git a/gettext-tools/src/read-desktop.h b/gettext-tools/src/read-desktop.h index 873234694..06f7ad100 100644 --- a/gettext-tools/src/read-desktop.h +++ b/gettext-tools/src/read-desktop.h @@ -1,6 +1,5 @@ /* Reading Desktop Entry files. - Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016 Free - Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2016, 2020 Free Software Foundation, Inc. This file was written by Daiki Ueno . This program is free software: you can redistribute it and/or modify @@ -21,7 +20,7 @@ #include #include -#include "hash.h" +#include "mem-hash-map.h" #include "po-lex.h" #include "str-list.h" diff --git a/gettext-tools/src/write-mo.c b/gettext-tools/src/write-mo.c index 36984ac1c..fe93b708b 100644 --- a/gettext-tools/src/write-mo.c +++ b/gettext-tools/src/write-mo.c @@ -39,7 +39,7 @@ #include "byteswap.h" #include "error.h" -#include "hash.h" +#include "mem-hash-map.h" #include "message.h" #include "format.h" #include "xsize.h" diff --git a/gettext-tools/src/write-qt.c b/gettext-tools/src/write-qt.c index 669147e1e..e7e054c68 100644 --- a/gettext-tools/src/write-qt.c +++ b/gettext-tools/src/write-qt.c @@ -39,7 +39,7 @@ #include "unistr.h" #include "xalloc.h" #include "obstack.h" -#include "hash.h" +#include "mem-hash-map.h" #include "binary-io.h" #include "fwriteerror.h" #include "gettext.h" diff --git a/gettext-tools/src/x-c.c b/gettext-tools/src/x-c.c index f4e6522ab..08edb12b1 100644 --- a/gettext-tools/src/x-c.c +++ b/gettext-tools/src/x-c.c @@ -44,7 +44,7 @@ #include "error-progname.h" #include "xalloc.h" #include "xvasprintf.h" -#include "hash.h" +#include "mem-hash-map.h" #include "po-charset.h" #include "gettext.h" diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c index 2fb48f98c..5cf72adbb 100644 --- a/gettext-tools/src/x-csharp.c +++ b/gettext-tools/src/x-csharp.c @@ -44,7 +44,7 @@ #include "xalloc.h" #include "xerror.h" #include "xvasprintf.h" -#include "hash.h" +#include "mem-hash-map.h" #include "po-charset.h" #include "unistr.h" #include "gettext.h" diff --git a/gettext-tools/src/x-desktop.c b/gettext-tools/src/x-desktop.c index 6efcaa62d..8d6a4610a 100644 --- a/gettext-tools/src/x-desktop.c +++ b/gettext-tools/src/x-desktop.c @@ -1,5 +1,5 @@ /* xgettext Desktop Entry backend. - Copyright (C) 2014, 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2014, 2018-2020 Free Software Foundation, Inc. This file was written by Daiki Ueno , 2014. @@ -36,7 +36,7 @@ #include "error-progname.h" #include "xalloc.h" #include "xvasprintf.h" -#include "hash.h" +#include "mem-hash-map.h" #include "gettext.h" #include "read-desktop.h" #include "po-charset.h" diff --git a/gettext-tools/src/x-elisp.c b/gettext-tools/src/x-elisp.c index c85739fe3..b29fce5d0 100644 --- a/gettext-tools/src/x-elisp.c +++ b/gettext-tools/src/x-elisp.c @@ -1,5 +1,5 @@ /* xgettext Emacs Lisp backend. - Copyright (C) 2001-2003, 2005-2009, 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2009, 2018-2020 Free Software Foundation, Inc. This file was written by Bruno Haible , 2001-2002. @@ -39,7 +39,7 @@ #include "xg-message.h" #include "error.h" #include "xalloc.h" -#include "hash.h" +#include "mem-hash-map.h" #include "c-ctype.h" #include "gettext.h" diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c index 577304f6a..eff1e6f7f 100644 --- a/gettext-tools/src/x-java.c +++ b/gettext-tools/src/x-java.c @@ -41,7 +41,7 @@ #include "error.h" #include "error-progname.h" #include "xalloc.h" -#include "hash.h" +#include "mem-hash-map.h" #include "po-charset.h" #include "unistr.h" #include "unictype.h" diff --git a/gettext-tools/src/x-librep.c b/gettext-tools/src/x-librep.c index d1ad681fc..fc346bf08 100644 --- a/gettext-tools/src/x-librep.c +++ b/gettext-tools/src/x-librep.c @@ -1,5 +1,5 @@ /* xgettext librep backend. - Copyright (C) 2001-2003, 2005-2009, 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2009, 2018-2020 Free Software Foundation, Inc. This file was written by Bruno Haible , 2001. @@ -40,7 +40,7 @@ #include "xg-message.h" #include "error.h" #include "xalloc.h" -#include "hash.h" +#include "mem-hash-map.h" #include "gettext.h" #define _(s) gettext(s) diff --git a/gettext-tools/src/x-lisp.c b/gettext-tools/src/x-lisp.c index a436f444c..921db484f 100644 --- a/gettext-tools/src/x-lisp.c +++ b/gettext-tools/src/x-lisp.c @@ -1,5 +1,5 @@ /* xgettext Lisp backend. - Copyright (C) 2001-2003, 2005-2009, 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2009, 2018-2020 Free Software Foundation, Inc. This file was written by Bruno Haible , 2001. @@ -39,7 +39,7 @@ #include "xg-message.h" #include "error.h" #include "xalloc.h" -#include "hash.h" +#include "mem-hash-map.h" #include "gettext.h" #define _(s) gettext(s) diff --git a/gettext-tools/src/x-scheme.c b/gettext-tools/src/x-scheme.c index fdde5f4ab..f29bfe5db 100644 --- a/gettext-tools/src/x-scheme.c +++ b/gettext-tools/src/x-scheme.c @@ -1,5 +1,5 @@ /* xgettext Scheme backend. - Copyright (C) 2004-2009, 2011, 2014, 2018-2019 Free Software Foundation, Inc. + Copyright (C) 2004-2009, 2011, 2014, 2018-2020 Free Software Foundation, Inc. This file was written by Bruno Haible , 2004-2005. @@ -39,7 +39,7 @@ #include "xg-message.h" #include "error.h" #include "xalloc.h" -#include "hash.h" +#include "mem-hash-map.h" #include "gettext.h" #define _(s) gettext(s) diff --git a/gettext-tools/src/x-sh.c b/gettext-tools/src/x-sh.c index 2868e4031..2b0dedc12 100644 --- a/gettext-tools/src/x-sh.c +++ b/gettext-tools/src/x-sh.c @@ -40,7 +40,7 @@ #include "error.h" #include "error-progname.h" #include "xalloc.h" -#include "hash.h" +#include "mem-hash-map.h" #include "../../gettext-runtime/src/escapes.h" #include "gettext.h" diff --git a/gettext-tools/src/x-tcl.c b/gettext-tools/src/x-tcl.c index 6c347a7cb..6b2b36cf7 100644 --- a/gettext-tools/src/x-tcl.c +++ b/gettext-tools/src/x-tcl.c @@ -42,7 +42,7 @@ #include "xg-message.h" #include "error.h" #include "xalloc.h" -#include "hash.h" +#include "mem-hash-map.h" #include "c-ctype.h" #include "po-charset.h" #include "unistr.h" diff --git a/gettext-tools/src/x-vala.c b/gettext-tools/src/x-vala.c index 1e8b26bfe..d807f5a6c 100644 --- a/gettext-tools/src/x-vala.c +++ b/gettext-tools/src/x-vala.c @@ -44,7 +44,7 @@ #include "error-progname.h" #include "xalloc.h" #include "xvasprintf.h" -#include "hash.h" +#include "mem-hash-map.h" #include "po-charset.h" #include "gettext.h" diff --git a/gettext-tools/src/xg-arglist-callshape.h b/gettext-tools/src/xg-arglist-callshape.h index 6659f45a4..9aa805479 100644 --- a/gettext-tools/src/xg-arglist-callshape.h +++ b/gettext-tools/src/xg-arglist-callshape.h @@ -1,6 +1,6 @@ /* Resolving ambiguity of argument lists: Information given through command-line options. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2018, 2020 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 @@ -22,7 +22,7 @@ #include #include "str-list.h" -#include "hash.h" +#include "mem-hash-map.h" #ifdef __cplusplus extern "C" { diff --git a/gettext-tools/src/xg-arglist-context.h b/gettext-tools/src/xg-arglist-context.h index 16508c3c6..6387931e1 100644 --- a/gettext-tools/src/xg-arglist-context.h +++ b/gettext-tools/src/xg-arglist-context.h @@ -1,6 +1,6 @@ /* Keeping track of the flags that apply to a string extracted in a certain context. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2018, 2020 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 @@ -20,7 +20,7 @@ #include -#include "hash.h" +#include "mem-hash-map.h" #include "message.h" #ifdef __cplusplus diff --git a/gnulib-local/Makefile.am b/gnulib-local/Makefile.am index 58207da17..b04a50c60 100644 --- a/gnulib-local/Makefile.am +++ b/gnulib-local/Makefile.am @@ -38,8 +38,6 @@ lib/getopt-core.h.diff \ lib/gettext.h \ lib/gl_array_list.h.diff \ lib/gl_linkedhash_list.h.diff \ -lib/hash.c \ -lib/hash.h \ lib/libxml/buf.c \ lib/libxml/buf.h \ lib/libxml/c14n.c \ @@ -142,6 +140,8 @@ lib/libxml/xpointer.c \ lib/libxml/xpointer.in.h \ lib/markup.c \ lib/markup.h \ +lib/mem-hash-map.c \ +lib/mem-hash-map.h \ lib/obstack.h.diff \ lib/progname.h.diff \ lib/regex_internal.h.diff \ @@ -163,11 +163,11 @@ modules/closeout \ modules/error-progname \ modules/gettext-runtime-misc \ modules/gettext-tools-misc \ -modules/hash \ modules/java \ modules/libtextstyle-dummy \ modules/libxml \ modules/markup \ +modules/mem-hash-map \ modules/xalloc \ modules/xalloc-die \ modules/xerror \ diff --git a/gnulib-local/lib/hash.c b/gnulib-local/lib/mem-hash-map.c similarity index 98% rename from gnulib-local/lib/hash.c rename to gnulib-local/lib/mem-hash-map.c index 0e3699586..43f7df055 100644 --- a/gnulib-local/lib/hash.c +++ b/gnulib-local/lib/mem-hash-map.c @@ -1,5 +1,5 @@ -/* hash - implement simple hashing table with string based keys. - Copyright (C) 1994-1995, 2000-2006, 2018 Free Software Foundation, Inc. +/* hash - implement simple hashing table where the keys are memory blocks. + Copyright (C) 1994-1995, 2000-2006, 2018, 2020 Free Software Foundation, Inc. Written by Ulrich Drepper , October 1994. This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ #include /* Specification. */ -#include "hash.h" +#include "mem-hash-map.h" #include #include diff --git a/gnulib-local/lib/hash.h b/gnulib-local/lib/mem-hash-map.h similarity index 100% rename from gnulib-local/lib/hash.h rename to gnulib-local/lib/mem-hash-map.h diff --git a/gnulib-local/modules/hash b/gnulib-local/modules/hash deleted file mode 100644 index f8495dab6..000000000 --- a/gnulib-local/modules/hash +++ /dev/null @@ -1,25 +0,0 @@ -Description: -Simple hash table with string based keys. - -Files: -lib/hash.h -lib/hash.c - -Depends-on: -obstack -xalloc - -configure.ac: - -Makefile.am: -lib_SOURCES += hash.h hash.c - -Include: -"hash.h" - -License: -GPL - -Maintainer: -Bruno Haible - diff --git a/gnulib-local/modules/mem-hash-map b/gnulib-local/modules/mem-hash-map new file mode 100644 index 000000000..68ce5a780 --- /dev/null +++ b/gnulib-local/modules/mem-hash-map @@ -0,0 +1,24 @@ +Description: +Simple hash table where the keys are memory blocks. + +Files: +lib/mem-hash-map.h +lib/mem-hash-map.c + +Depends-on: +obstack +xalloc + +configure.ac: + +Makefile.am: +lib_SOURCES += mem-hash-map.h mem-hash-map.c + +Include: +"mem-hash-map.h" + +License: +GPL + +Maintainer: +Bruno Haible diff --git a/libtextstyle/.gitignore b/libtextstyle/.gitignore index 1f722c4a4..64f4a1fcd 100644 --- a/libtextstyle/.gitignore +++ b/libtextstyle/.gitignore @@ -86,8 +86,6 @@ /lib/glib/ /lib/glib.in.h /lib/glibconfig.in.h -/lib/hash.c -/lib/hash.h /lib/html-ostream.oo.c /lib/html-ostream.oo.h /lib/html-styled-ostream.oo.c @@ -117,6 +115,8 @@ /lib/malloca.h /lib/math.c /lib/math.in.h +/lib/mem-hash-map.c +/lib/mem-hash-map.h /lib/memchr.c /lib/memchr.valgrind /lib/memory-ostream.oo.c diff --git a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c index e9d4f0fd3..2ff978f66 100644 --- a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c +++ b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c @@ -1,5 +1,5 @@ /* Output stream for CSS styled text, producing ANSI escape sequences. - Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2019-2020 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -33,7 +33,7 @@ #include #include "term-ostream.h" -#include "hash.h" +#include "mem-hash-map.h" #include "xalloc.h" diff --git a/libtextstyle/gnulib-local/modules/term-styled-ostream b/libtextstyle/gnulib-local/modules/term-styled-ostream index c2412fc4a..1b211b7c9 100644 --- a/libtextstyle/gnulib-local/modules/term-styled-ostream +++ b/libtextstyle/gnulib-local/modules/term-styled-ostream @@ -10,7 +10,7 @@ styled-ostream term-ostream libcroco libxml -hash +mem-hash-map xalloc configure.ac: