atoll: Fix module dependencies
This patch fixes a trivial oversight: 2024-07-29 Bruno Haible atoll: Fix module dependencies. * modules/atoll (Depends-on): Add stdlib. diff --git a/modules/atoll b/modules/atoll index ac5fdcb9b9..8f7c347af5 100644 --- a/modules/atoll +++ b/modules/atoll @@ -6,6 +6,7 @@ lib/atoll.c m4/atoll.m4 Depends-on: +stdlib strtoll [test $HAVE_ATOLL = 0] configure.ac:
[PATCH] gnulib-tool.py: Handle module dependencies that cannot be found.
* pygnulib/GLModuleSystem.py (GLModule.getDependenciesWithoutConditions): Filter out None from the module dependencies. An appropriate warning will already be printed by GLModuleSystem.find(). --- ChangeLog | 8 pygnulib/GLModuleSystem.py | 5 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 21f4039dfe..b752fde065 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-05-07 Collin Funk + + gnulib-tool.py: Handle module dependencies that cannot be found. + * pygnulib/GLModuleSystem.py + (GLModule.getDependenciesWithoutConditions): Filter out None from the + module dependencies. An appropriate warning will already be printed by + GLModuleSystem.find(). + 2024-05-07 Paul Eggert nstrftime: use clearer code for padding diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index 2cb5d1d468..b25779d62e 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -504,7 +504,7 @@ def getDependencies(self) -> str: self.cache['dependencies'] = result return self.cache['dependencies'] -def getDependenciesWithoutConditions(self) -> list[GLModule | None]: +def getDependenciesWithoutConditions(self) -> list[GLModule]: '''Return list of dependencies, as a list of GLModule objects. GLConfig: localpath.''' if 'dependenciesWithoutCond' not in self.cache: @@ -518,6 +518,9 @@ def getDependenciesWithoutConditions(self) -> list[GLModule | None]: result = [ self.modulesystem.find(module) for module in lines if module != '' ] +result = [ module + for module in result + if module is not None ] self.cache['dependenciesWithoutCond'] = result return self.cache['dependenciesWithoutCond'] -- 2.45.0
nstrftime: omit locking code from module dependencies
With the last two patches, nstrftime no longer does any locking while retrieving a locale name. But the locking code is still present, as part of module dependencies. These two patches fix that: The module dependencies are restructured so that nstrftime no longer indirectly depends on the 'lock' module (and still passes its test suite on Solaris and NetBSD, of course). 2024-02-15 Bruno Haible nstrftime: Optimize module dependencies. * modules/nstrftime (Depends-on): Remove localename-unsafe. Add localename-unsafe-limited. 2024-02-15 Bruno Haible localename-unsafe-limited: New module. * m4/localename.m4 (gl_LOCALENAME_UNSAFE_LIMITED): New macro. * modules/localename-unsafe-limited: New file. * modules/localename-unsafe (Depends-on): Add localename-unsafe-limited. (Makefile.am): Compile localename-unsafe.c only if the module localename-unsafe-limited does not already do it. >From b17d8b199128f3872773d5ceb6a12897723c1dfa Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 15 Feb 2024 20:47:28 +0100 Subject: [PATCH 1/2] localename-unsafe-limited: New module. * m4/localename.m4 (gl_LOCALENAME_UNSAFE_LIMITED): New macro. * modules/localename-unsafe-limited: New file. * modules/localename-unsafe (Depends-on): Add localename-unsafe-limited. (Makefile.am): Compile localename-unsafe.c only if the module localename-unsafe-limited does not already do it. --- ChangeLog | 9 +++ m4/localename.m4 | 8 ++- modules/localename-unsafe | 6 - modules/localename-unsafe-limited | 39 +++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 modules/localename-unsafe-limited diff --git a/ChangeLog b/ChangeLog index 68a0050a68..0550e82a04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024-02-15 Bruno Haible + + localename-unsafe-limited: New module. + * m4/localename.m4 (gl_LOCALENAME_UNSAFE_LIMITED): New macro. + * modules/localename-unsafe-limited: New file. + * modules/localename-unsafe (Depends-on): Add localename-unsafe-limited. + (Makefile.am): Compile localename-unsafe.c only if the module + localename-unsafe-limited does not already do it. + 2024-02-15 Bruno Haible nstrftime, fprintftime: Optimize. diff --git a/m4/localename.m4 b/m4/localename.m4 index 189aee6346..d91fd5deb4 100644 --- a/m4/localename.m4 +++ b/m4/localename.m4 @@ -1,4 +1,4 @@ -# localename.m4 serial 11 +# localename.m4 serial 12 dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -53,3 +53,9 @@ AC_DEFUN([gl_LOCALENAME_UNSAFE] REPLACE_FREELOCALE=1 fi ]) + +AC_DEFUN([gl_LOCALENAME_UNSAFE_LIMITED], +[ + AC_REQUIRE([gt_LC_MESSAGES]) + AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME]) +]) diff --git a/modules/localename-unsafe b/modules/localename-unsafe index 4b8ad0279b..3bcdbcad7b 100644 --- a/modules/localename-unsafe +++ b/modules/localename-unsafe @@ -15,6 +15,7 @@ m4/lcmessage.m4 m4/musl.m4 Depends-on: +localename-unsafe-limited extensions stdbool locale @@ -33,7 +34,10 @@ gl_LOCALE_MODULE_INDICATOR([localename-unsafe]) gl_MUSL_LIBC Makefile.am: -lib_SOURCES += localename-unsafe.c localename-table.c +if !GL_COND_OBJ_LOCALENAME_UNSAFE_LIMITED +lib_SOURCES += localename-unsafe.c +endif +lib_SOURCES += localename-table.c Include: "localename.h" diff --git a/modules/localename-unsafe-limited b/modules/localename-unsafe-limited new file mode 100644 index 00..b9f845bfbd --- /dev/null +++ b/modules/localename-unsafe-limited @@ -0,0 +1,39 @@ +Description: +Return current locale's name, according to glibc naming conventions, +in thread-local (unsafe) storage. +Only works on a limited set of platforms: on NetBSD and Solaris. + +Files: +lib/localename.h +lib/localename-unsafe.c +m4/localename.m4 +m4/intl-thread-locale.m4 +m4/lcmessage.m4 + +Depends-on: +extensions +locale +setlocale-null-unlocked + +configure.ac: +gl_LOCALENAME_UNSAFE_LIMITED +AC_REQUIRE([AC_CANONICAL_HOST]) +gl_CONDITIONAL([GL_COND_OBJ_LOCALENAME_UNSAFE_LIMITED], + [case "$host_os" in netbsd* | solaris*) true;; *) false;; esac]) + +Makefile.am: +if GL_COND_OBJ_LOCALENAME_UNSAFE_LIMITED +lib_SOURCES += localename-unsafe.c +endif + +Include: +"localename.h" + +Link: +$(LIBTHREAD) + +License: +LGPLv2+ + +Maintainer: +all -- 2.34.1 >From d5191e456737661d4a0df5287f6c2064ab74dbbe Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 15 Feb 2024 20:48:59 +0100 Subject: [PATCH 2/2] nstrftime: Optimize module dependencies. * modules/nstrftime (Depends-on): Remove localename-unsafe. Add localename-unsafe-limited. --- ChangeLog | 6 ++ modules/nstrftime | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog
lseek: Fix module dependencies
On 2021-11-15 a change was made to optimize the conditions of the module dependencies of 'lseek'. Such optimizations are often hairy, because they assume that the workaround is only needed in the _currently known_ circumstances. In this case, the optimization was also wrong, because the dependency to 'msvc-nothrow' is necessary for _get_osfhandle() to work reliably on MSVC, regardless of the value of WINDOWS_64_BIT_OFF_T; there are multiple reasons for the lseek() workaround on native Windows (support for large files and the behaviour on pipes). 2023-04-24 Bruno Haible lseek: Fix module dependencies (regression 2021-11-15). * modules/lseek (Depends-on): Re-enable the msvc-nothrow dependency also when WINDOWS_64_BIT_OFF_T is 0. diff --git a/modules/lseek b/modules/lseek index 17d02a79c5..711afeb2fa 100644 --- a/modules/lseek +++ b/modules/lseek @@ -9,7 +9,7 @@ Depends-on: unistd sys_types largefile -msvc-nothrow[test $WINDOWS_64_BIT_OFF_T = 1] +msvc-nothrow[test $REPLACE_LSEEK = 1] fstat [test "$gl_cv_func_lseek_pipe" = no] configure.ac:
Re: vasnwprintf: Fix module dependencies
Yesterday I did: > 2023-03-19 Bruno Haible > > vasnwprintf: Fix module dependencies. > * modules/vasnwprintf (Depends-on): Add wmemcpy, wmemset. Oops, this produces gnulib-tool warnings: gnulib-tool: warning: module vasnwprintf-posix depends on a module with an incompatible license: wmemcpy gnulib-tool: warning: module vasnwprintf-posix depends on a module with an incompatible license: wmemset Fixed by relicensing these two modules under LGPLv2. (I am the only copyright- relevant contributor to the files of these two modules.) 2023-03-20 Bruno Haible wmemset: Relicense under LGPLv2+. * modules/wmemset (License): Change to LGPLv2+. * lib/wmemset.c: Update license notice. * lib/wmemset-impl.h: Likewise. 2023-03-20 Bruno Haible wmemcpy: Relicense under LGPLv2+. * modules/wmemcpy (License): Change to LGPLv2+. * lib/wmemcpy.c: Update license notice. * lib/wmemcpy-impl.h: Likewise. >From d8f3b7a5aecc81f83c2fb62a7e3e63c0b3998300 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 20 Mar 2023 10:09:16 +0100 Subject: [PATCH 1/2] wmemcpy: Relicense under LGPLv2+. * modules/wmemcpy (License): Change to LGPLv2+. * lib/wmemcpy.c: Update license notice. * lib/wmemcpy-impl.h: Likewise. --- ChangeLog | 7 +++ lib/wmemcpy-impl.h | 2 +- lib/wmemcpy.c | 2 +- modules/wmemcpy| 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e83875f2ee..83e9383f40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-03-20 Bruno Haible + + wmemcpy: Relicense under LGPLv2+. + * modules/wmemcpy (License): Change to LGPLv2+. + * lib/wmemcpy.c: Update license notice. + * lib/wmemcpy-impl.h: Likewise. + 2023-03-19 Bruno Haible vasnwprintf: Fix test failures on musl libc. diff --git a/lib/wmemcpy-impl.h b/lib/wmemcpy-impl.h index f0a7007506..c243acfa15 100644 --- a/lib/wmemcpy-impl.h +++ b/lib/wmemcpy-impl.h @@ -4,7 +4,7 @@ This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the + published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This file is distributed in the hope that it will be useful, diff --git a/lib/wmemcpy.c b/lib/wmemcpy.c index 0cfe407a1a..082bfed9ef 100644 --- a/lib/wmemcpy.c +++ b/lib/wmemcpy.c @@ -4,7 +4,7 @@ This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the + published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This file is distributed in the hope that it will be useful, diff --git a/modules/wmemcpy b/modules/wmemcpy index e45e94fe70..161762304e 100644 --- a/modules/wmemcpy +++ b/modules/wmemcpy @@ -23,7 +23,7 @@ Include: License: -LGPL +LGPLv2+ Maintainer: all -- 2.34.1 >From d25f915afb66e63d32f1feec94a0a9bbc87ff8a8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 20 Mar 2023 10:09:57 +0100 Subject: [PATCH 2/2] wmemset: Relicense under LGPLv2+. * modules/wmemset (License): Change to LGPLv2+. * lib/wmemset.c: Update license notice. * lib/wmemset-impl.h: Likewise. --- ChangeLog | 7 +++ lib/wmemset-impl.h | 2 +- lib/wmemset.c | 2 +- modules/wmemset| 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83e9383f40..7320f54be3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-03-20 Bruno Haible + + wmemset: Relicense under LGPLv2+. + * modules/wmemset (License): Change to LGPLv2+. + * lib/wmemset.c: Update license notice. + * lib/wmemset-impl.h: Likewise. + 2023-03-20 Bruno Haible wmemcpy: Relicense under LGPLv2+. diff --git a/lib/wmemset-impl.h b/lib/wmemset-impl.h index d2cc14ad42..2743469c04 100644 --- a/lib/wmemset-impl.h +++ b/lib/wmemset-impl.h @@ -4,7 +4,7 @@ This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the + published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This file is distributed in the hope that it will be useful, diff --git a/lib/wmemset.c b/lib/wmemset.c index 72b9eb5f56..d83e07ba64 100644 --- a/lib/wmemset.c +++ b/lib/wmemset.c @@ -4,7 +4,7 @@ This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the + published by the Free Software Foundation; either
vasnwprintf: Fix module dependencies
The vasnwprintf implementation and tests depend on a few wide-character string functions from . This patch adds the dependencies. It also depends on 'swprintf'; to be added later. 2023-03-19 Bruno Haible vasnwprintf: Fix module dependencies. * modules/vasnwprintf (Depends-on): Add wmemcpy, wmemset. * modules/vasnwprintf-tests (Depends-on): Add wmemcmp. * modules/vasnwprintf-posix-tests (Depends-on): Likewise. diff --git a/modules/vasnwprintf b/modules/vasnwprintf index 544d7144a4..6c7d63a5f6 100644 --- a/modules/vasnwprintf +++ b/modules/vasnwprintf @@ -34,6 +34,8 @@ errno memchr assert-h wchar +wmemcpy +wmemset configure.ac: AC_REQUIRE([AC_C_RESTRICT]) diff --git a/modules/vasnwprintf-posix-tests b/modules/vasnwprintf-posix-tests index 4f2891a4ff..d9729e9dcb 100644 --- a/modules/vasnwprintf-posix-tests +++ b/modules/vasnwprintf-posix-tests @@ -16,6 +16,7 @@ float setlocale wcscmp wcsspn +wmemcmp wmemcpy configure.ac: diff --git a/modules/vasnwprintf-tests b/modules/vasnwprintf-tests index e90236e8d2..37ed08de56 100644 --- a/modules/vasnwprintf-tests +++ b/modules/vasnwprintf-tests @@ -4,6 +4,7 @@ tests/macros.h Depends-on: wcscmp +wmemcmp wmemcpy configure.ac:
posix_spawn_file_actions_* tests: Fix module dependencies
Building a testdir for module 'posix_spawn_file_actions_addclose' on Solaris 11.4, I see this warning: ../../gltests/test-posix_spawn_file_actions_addclose.c: In function ‘main’: ../../gltests/test-posix_spawn_file_actions_addclose.c:63:37: warning: passing argument 1 of ‘posix_spawn_file_actions_destroy’ from incompatible pointer type [-Wincompatible-pointer-types] posix_spawn_file_actions_destroy (&actions); ^ In file included from ../gllib/spawn.h:42:0, from ../../gltests/test-posix_spawn_file_actions_addclose.c:19: /usr/include/spawn.h:52:12: note: expected ‘posix_spawn_file_actions_t * {aka struct *}’ but argument is of type ‘rpl_posix_spawn_file_actions_t * {aka struct *}’ extern int posix_spawn_file_actions_destroy( ^~~~ This patch fixes it. 2021-01-25 Bruno Haible posix_spawn_file_actions_* tests: Fix module dependencies. * modules/posix_spawn_file_actions_addclose-tests (Depends-on): Add posix_spawn_file_actions_destroy. * modules/posix_spawn_file_actions_addopen-tests (Depends-on): Likewise. * modules/posix_spawn_file_actions_adddup2-tests (Depends-on): Likewise. * modules/posix_spawn_file_actions_addchdir-tests (Depends-on): Likewise. * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Likewise. diff --git a/modules/posix_spawn_file_actions_addchdir-tests b/modules/posix_spawn_file_actions_addchdir-tests index 1c56b1c..e554138 100644 --- a/modules/posix_spawn_file_actions_addchdir-tests +++ b/modules/posix_spawn_file_actions_addchdir-tests @@ -6,6 +6,7 @@ tests/macros.h Depends-on: posix_spawn_file_actions_init +posix_spawn_file_actions_destroy posix_spawnp-tests findprog diff --git a/modules/posix_spawn_file_actions_addclose-tests b/modules/posix_spawn_file_actions_addclose-tests index 848acce..b115e3d 100644 --- a/modules/posix_spawn_file_actions_addclose-tests +++ b/modules/posix_spawn_file_actions_addclose-tests @@ -6,6 +6,7 @@ tests/macros.h Depends-on: getdtablesize posix_spawn_file_actions_init +posix_spawn_file_actions_destroy configure.ac: diff --git a/modules/posix_spawn_file_actions_adddup2-tests b/modules/posix_spawn_file_actions_adddup2-tests index f504892..5e25990 100644 --- a/modules/posix_spawn_file_actions_adddup2-tests +++ b/modules/posix_spawn_file_actions_adddup2-tests @@ -6,6 +6,7 @@ tests/macros.h Depends-on: getdtablesize posix_spawn_file_actions_init +posix_spawn_file_actions_destroy configure.ac: diff --git a/modules/posix_spawn_file_actions_addfchdir-tests b/modules/posix_spawn_file_actions_addfchdir-tests index 45f4230..2f09934 100644 --- a/modules/posix_spawn_file_actions_addfchdir-tests +++ b/modules/posix_spawn_file_actions_addfchdir-tests @@ -6,6 +6,7 @@ tests/macros.h Depends-on: posix_spawn_file_actions_init +posix_spawn_file_actions_destroy posix_spawnp-tests findprog diff --git a/modules/posix_spawn_file_actions_addopen-tests b/modules/posix_spawn_file_actions_addopen-tests index fbe7943..8f0de9e 100644 --- a/modules/posix_spawn_file_actions_addopen-tests +++ b/modules/posix_spawn_file_actions_addopen-tests @@ -6,6 +6,7 @@ tests/macros.h Depends-on: getdtablesize posix_spawn_file_actions_init +posix_spawn_file_actions_destroy configure.ac:
Fix missing module dependencies to 'xalloc'
A gnulib testdir for module 'xvasprintf' fails to build: $ ./gnulib-tool --test --single-configure xvasprintf ... ../../gllib/xvasprintf.c: In function 'xstrcat': ../../gllib/xvasprintf.c:61:12: warning: implicit declaration of function 'XNMALLOC' [-Wimplicit-function-declaration] result = XNMALLOC (totalsize + 1, char); ^ ../../gllib/xvasprintf.c:61:37: error: expected expression before 'char' result = XNMALLOC (totalsize + 1, char); ^ make[4]: *** [Makefile:1541: xvasprintf.o] Error 1 The cause is the change "xalloc-die: Fix link error with Solaris cc (regression 2020-07-27)" from 2020-10-19. Module dependencies to 'xalloc' must now be explicitly stated; a module dependency to 'xalloc-die' no longer implies one to 'xalloc'. This patch fixes it; also in a couple of module for which the testdir currently does not produce an error. 2020-11-22 Bruno Haible Fix missing module dependencies to 'xalloc' (regression 2020-10-19). * modules/xvasprintf (Depends-on): Add xalloc. * modules/pipe-filter-gi (Depends-on): Likewise. * modules/execute (Depends-on): Likewise, for w32spawn.h. * modules/spawn-pipe (Depends-on): Likewise. diff --git a/modules/execute b/modules/execute index 857a188..a438fbf 100644 --- a/modules/execute +++ b/modules/execute @@ -29,6 +29,7 @@ stdlib strpbrk unistd environ +xalloc configure.ac: gl_EXECUTE diff --git a/modules/pipe-filter-gi b/modules/pipe-filter-gi index 84e6cb3..152f909 100644 --- a/modules/pipe-filter-gi +++ b/modules/pipe-filter-gi @@ -19,6 +19,7 @@ stdint stdlib sys_select unistd +xalloc configure.ac: AC_CHECK_FUNCS_ONCE([select]) diff --git a/modules/spawn-pipe b/modules/spawn-pipe index ff19236..dd07fef 100644 --- a/modules/spawn-pipe +++ b/modules/spawn-pipe @@ -35,6 +35,7 @@ strpbrk unistd unistd-safer wait-process +xalloc configure.ac: gl_SPAWN_PIPE diff --git a/modules/xvasprintf b/modules/xvasprintf index 410b45f..59d9a6e 100644 --- a/modules/xvasprintf +++ b/modules/xvasprintf @@ -14,6 +14,7 @@ m4/xvasprintf.m4 Depends-on: vasprintf +xalloc xalloc-die xsize stdarg
canonicalize: Trim module dependencies
The 'canonicalize' module has, among others, this dependency chain: 'canonicalize' -> 'hash-triple' -> 'same' -> {'fstatat','openat'} -> 'fchdir' But the 'canonicalize' module needs only part of the 'hash-triple' module and, in particular, only the part that does not need the 'same' module. 2020-07-07 Bruno Haible canonicalize: Trim module dependencies. * lib/hash-triple.h: Group declarations. * lib/hash-triple-simple.c: New file, extracted from lib/hash-triple.c. * lib/hash-triple.c: Don't include , , hash-pjw.h. (STREQ): Remove macro. (triple_hash, triple_compare_ino_str, triple_free): Remove functions. * modules/hash-triple-simple: New file, based on modules/hash-triple. * modules/hash-triple (Files): Remove lib/hash-triple.h. (Depends-on): Add hash-triple-simple. Remove hash-pjw. * modules/canonicalize (Depends-on): Remove hash-triple. Add hash-triple-simple. * modules/file-set (Depends-on): Likewise. diff --git a/lib/hash-triple-simple.c b/lib/hash-triple-simple.c new file mode 100644 index 000..98728f2 --- /dev/null +++ b/lib/hash-triple-simple.c @@ -0,0 +1,59 @@ +/* Hash functions for file-related triples: name, device, inode. + Copyright (C) 2007, 2009-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 + the Free Software Foundation; either version 3 of the License, 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, see <https://www.gnu.org/licenses/>. */ + +/* written by Jim Meyering */ + +#include + +/* Specification. */ +#include "hash-triple.h" + +#include +#include + +#include "hash-pjw.h" +#include "same-inode.h" + +#define STREQ(a, b) (strcmp (a, b) == 0) + +/* Hash an F_triple, and *do* consider the file name. */ +size_t +triple_hash (void const *x, size_t table_size) +{ + struct F_triple const *p = x; + size_t tmp = hash_pjw (p->name, table_size); + + /* Ignoring the device number here should be fine. */ + return (tmp ^ p->st_ino) % table_size; +} + +/* Compare two F_triple structs. */ +bool +triple_compare_ino_str (void const *x, void const *y) +{ + struct F_triple const *a = x; + struct F_triple const *b = y; + return (SAME_INODE (*a, *b) && STREQ (a->name, b->name)) ? true : false; +} + +/* Free an F_triple. */ +void +triple_free (void *x) +{ + struct F_triple *a = x; + free (a->name); + free (a); +} diff --git a/lib/hash-triple.c b/lib/hash-triple.c index 560e442..ad1a559 100644 --- a/lib/hash-triple.c +++ b/lib/hash-triple.c @@ -18,28 +18,12 @@ #include +/* Specification. */ #include "hash-triple.h" -#include -#include - -#include "hash-pjw.h" #include "same.h" #include "same-inode.h" -#define STREQ(a, b) (strcmp (a, b) == 0) - -/* Hash an F_triple, and *do* consider the file name. */ -size_t -triple_hash (void const *x, size_t table_size) -{ - struct F_triple const *p = x; - size_t tmp = hash_pjw (p->name, table_size); - - /* Ignoring the device number here should be fine. */ - return (tmp ^ p->st_ino) % table_size; -} - /* Hash an F_triple, without considering the file name. */ size_t triple_hash_no_name (void const *x, size_t table_size) @@ -58,20 +42,3 @@ triple_compare (void const *x, void const *y) struct F_triple const *b = y; return (SAME_INODE (*a, *b) && same_name (a->name, b->name)) ? true : false; } - -bool -triple_compare_ino_str (void const *x, void const *y) -{ - struct F_triple const *a = x; - struct F_triple const *b = y; - return (SAME_INODE (*a, *b) && STREQ (a->name, b->name)) ? true : false; -} - -/* Free an F_triple. */ -void -triple_free (void *x) -{ - struct F_triple *a = x; - free (a->name); - free (a); -} diff --git a/lib/hash-triple.h b/lib/hash-triple.h index c65450e..16f5330 100644 --- a/lib/hash-triple.h +++ b/lib/hash-triple.h @@ -31,12 +31,16 @@ struct F_triple dev_t st_dev; }; +/* Defined in module 'hash-triple-simple'. */ + extern size_t triple_hash (void const *x, size_t table_size) _GL_ATTRIBUTE_PURE; -extern size_t triple_hash_no_name (void const *x, size_t table_size) - _GL_ATTRIBUTE_PURE; -extern bool triple_compare (void const *x, void const *y); extern bool triple_compare_ino_str (void const *x, void const *y) _GL_ATTRIBU
Re: Module dependencies
Hi, > So Case 1 says alloca and alloca-opt are included and tested with > iconv. Case 2 and Case 3 say alloca and alloca-opt are not included > and therefore not tested with iconv. Try ./gnulib-tool --create-testdir --dir="${TEST_DIR}" iconv vs. ./gnulib-tool --create-testdir --dir="${TEST_DIR}" --without-tests iconv and look at the dependencies of 'iconv-tests' ... Bruno
Module dependencies
Hi Everyone, There are 1700+ modules according to --list. At 3 minutes (est.) a test that would take 85 hours to complete. I _think_ a speedup is, if module A uses B and C, then we can scratch three off the list at a time. The problem I am having is, I'm having trouble understand the output from --extract-dependencies and --extract-recursive-dependencies. What is the difference between these: CASE 1: ./gnulib-tool --create-testdir --dir="${TEST_DIR}" iconv Module list with included dependencies (indented): absolute-header accept accept-tests alloca alloca-opt alloca-opt-tests ... CASE 2: $ ./gnulib-tool --extract-dependencies iconv havelib CASE 3: $ ./gnulib-tool --extract-recursive-dependencies iconv havelib iconv In Case 1 there's a rich list of modules. Case 2 and Case 3 seem to be missing dependencies. For example, --list shows: $ ./gnulib-tool --list ... alloca alloca-opt allocator ... So Case 1 says alloca and alloca-opt are included and tested with iconv. Case 2 and Case 3 say alloca and alloca-opt are not included and therefore not tested with iconv. What is the difference in outputs? Jeff
c-xvasprintf: fix module dependencies
lib/c-xvasprintf includes xalloc.h and invokes xalloc_die(). The module therefore needs to depend on either 'xalloc' or 'xalloc-die'. 2019-01-04 Bruno Haible c-xvasprintf: Fix module dependencies. * modules/c-xvasprintf (Depends-on): Add 'xalloc-die'. diff --git a/modules/c-xvasprintf b/modules/c-xvasprintf index e6681e8..6650dda 100644 --- a/modules/c-xvasprintf +++ b/modules/c-xvasprintf @@ -1,5 +1,5 @@ Description: -c_asprintf and c_vasprintf with out-of-memory checking. Also see xalloc-die. +c_asprintf and c_vasprintf with out-of-memory checking. Files: lib/c-xvasprintf.h @@ -8,6 +8,7 @@ lib/c-xvasprintf.c Depends-on: c-vasprintf +xalloc-die configure.ac:
bitsetv: fix module dependencies
A module shouldn't rely on internals of another module. bitsetv.c invokes xalloc_die(), therefore it should #include "xalloc.h", regardless whether bitset.h already - indirectly through bitset/base.h - includes xalloc.h. 2019-01-04 Bruno Haible bitsetv: Fix module dependencies. * lib/bitsetv.c: Include xalloc.h. * modules/bitsetv (Depends-on): Add 'xalloc'. diff --git a/lib/bitsetv.c b/lib/bitsetv.c index b509982..e3cc584 100644 --- a/lib/bitsetv.c +++ b/lib/bitsetv.c @@ -22,6 +22,8 @@ #include +#include "xalloc.h" + /* Create a vector of N_VECS bitsets, each of N_BITS, and of type TYPE. */ diff --git a/modules/bitsetv b/modules/bitsetv index 30be286..4b6c1a8 100644 --- a/modules/bitsetv +++ b/modules/bitsetv @@ -7,6 +7,7 @@ lib/bitsetv.h Depends-on: bitset +xalloc Makefile.am: lib_SOURCES += bitsetv.c
backupfile: fix module dependencies
lib/backup-find.c include xalloc.h and invokes xalloc_die(). Therefore: 2019-01-04 Bruno Haible backupfile: Fix module dependencies. * modules/backupfile (Depends-on): Add 'xalloc'. diff --git a/modules/backupfile b/modules/backupfile index 4ada3f5..5dcf6c7 100644 --- a/modules/backupfile +++ b/modules/backupfile @@ -21,6 +21,7 @@ renameatu readdir stdbool stdint +xalloc configure.ac: gl_BACKUPFILE
Re: [PATCH] regex: trim module dependencies
Thanks for the detailed review, and you're right on all counts. I installed the attached to do the fixes you suggest. I'm still having trouble with the regex code under Emacs, and will try to follow up shortly. >From e09e64c7e0d3c9d0cca82cb80713f8aea195d493 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 1 Jul 2018 06:37:38 -0700 Subject: [PATCH] regex: revert most trimming MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problems reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2018-07/msg1.html * modules/regex (Depends-on): Add lock, memcmp, memmove, and wctype back in. lock because regex users shouldnât need to know that regex needs locking, and the rest because gnulib-tool should ordinarily ignore them anyway. --- ChangeLog | 10 ++ modules/regex | 4 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index e25f5a7..4e9f441 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2018-07-01 Paul Eggert + + regex: revert most trimming + Problems reported by Bruno Haible in: + https://lists.gnu.org/r/bug-gnulib/2018-07/msg1.html + * modules/regex (Depends-on): Add lock, memcmp, memmove, + and wctype back in. lock because regex users shouldnât + need to know that regex needs locking, and the rest because + gnulib-tool should ordinarily ignore them anyway. + 2018-06-30 Paul Eggert regex: trim module dependencies diff --git a/modules/regex b/modules/regex index 8a6afcb..8863a8e 100644 --- a/modules/regex +++ b/modules/regex @@ -20,6 +20,9 @@ alloca-opt [test $ac_use_included_regex = yes] btowc [test $ac_use_included_regex = yes] builtin-expect [test $ac_use_included_regex = yes] intprops[test $ac_use_included_regex = yes] +lock [test "$ac_cv_gnu_library_2_1:$ac_use_included_regex" = no:yes] +memcmp [test $ac_use_included_regex = yes] +memmove [test $ac_use_included_regex = yes] mbrtowc [test $ac_use_included_regex = yes] mbsinit [test $ac_use_included_regex = yes] nl_langinfo [test $ac_use_included_regex = yes] @@ -28,6 +31,7 @@ stdint [test $ac_use_included_regex = yes] wchar [test $ac_use_included_regex = yes] wcrtomb [test $ac_use_included_regex = yes] wctype-h[test $ac_use_included_regex = yes] +wctype [test $ac_use_included_regex = yes] configure.ac: gl_REGEX -- 2.7.4
Re: [PATCH] regex: trim module dependencies
Hi Paul, > * modules/regex (Depends-on): Remove gettext-h and lock, > since the regex code should work OK without these modules, > and Emacs uses it that way. The removal of the gettext-h dependency is fine; regex_internal.h tests ENABLE_NLS and includes . But I object against the removal of the 'lock' dependency. This change transforms a module that is by default multithread-safe into a module that by default will crash in multithreaded situations. There is logic in regex_internal.h (lines 61..97): #elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO # include "glthread/lock.h" # define lock_define(name) # ... #elif defined GNULIB_PTHREAD && !defined USE_UNLOCKED_IO # include # define lock_define(name) pthread_mutex_t name; # ... #else # define lock_define(name) # ... #endif It implements the following (desired and perfectly correct) behaviour: - If the 'lock' module is present, use it to achieve MT-safety on all platforms. - Otherwise, if the 'pthread' module is present, use it to achieve MT-safety on POSIX-like platforms. - Otherwise, give up on MT-safety. Gnulib users should *not* need to know "regex is not MT-safe by default, therefore I need to include the 'lock' module". Rather, Gnulib users should get an MT-safe module by default, and if they don't like the complexities of 'lock' or 'pthread' modules, they can use the --avoid option IF THEY KNOW that their application is single-threaded. The coreutils maintainers should not have to check whether 'sort' and other multithreaded programs use regex. Likewise, the gettext maintainers should not have to check whether 'msgmerge' and libgettextpo (and possibly other multithreaded parts of gettext) use regex. And so on. That's easy for you to achieve in Emacs (assuming you know that Emacs uses regex only from a single thread): diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 9a5ad54..f55908c 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -47,8 +47,9 @@ GNULIB_MODULES=' AVOIDED_MODULES=' close dup fchdir fstat + lock malloc-posix msvc-inval msvc-nothrow - openat-die opendir raise + openat-die opendir pthread raise save-cwd select setenv sigprocmask stat stdarg stdbool threadlib tzset unsetenv utime utime-h ' > Also remove memcmp, memmove, > and wctype, as these modules are obsolete and should not be > needed any more. It is not needed to avoid dependencies to obsolete modules. See the Gnulib documentation [1]: "Depends-on This field contains a newline separated list of the modules that are required for the proper working of this module. gnulib-tool includes each required module automatically, unless it is specified with option --avoid or it is marked as obsolete and the option --with-obsolete is not given." Maybe this sentence is too long to be understood, and I should reword it? Bruno [1] https://www.gnu.org/software/gnulib/manual/html_node/Module-description.html
[PATCH] regex: trim module dependencies
* modules/regex (Depends-on): Remove gettext-h and lock, since the regex code should work OK without these modules, and Emacs uses it that way. Also remove memcmp, memmove, and wctype, as these modules are obsolete and should not be needed any more. --- ChangeLog | 9 + modules/regex | 5 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5c1e02c7..e25f5a7d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-06-30 Paul Eggert + + regex: trim module dependencies + * modules/regex (Depends-on): Remove gettext-h and lock, + since the regex code should work OK without these modules, + and Emacs uses it that way. Also remove memcmp, memmove, + and wctype, as these modules are obsolete and should not be + needed any more. + 2018-06-29 Paul Eggert regex: glibc does not use intprops.h diff --git a/modules/regex b/modules/regex index 1030f0300..8a6afcb5b 100644 --- a/modules/regex +++ b/modules/regex @@ -19,11 +19,7 @@ ssize_t alloca-opt [test $ac_use_included_regex = yes] btowc [test $ac_use_included_regex = yes] builtin-expect [test $ac_use_included_regex = yes] -gettext-h [test $ac_use_included_regex = yes] intprops[test $ac_use_included_regex = yes] -lock [test "$ac_cv_gnu_library_2_1:$ac_use_included_regex" = no:yes] -memcmp [test $ac_use_included_regex = yes] -memmove [test $ac_use_included_regex = yes] mbrtowc [test $ac_use_included_regex = yes] mbsinit [test $ac_use_included_regex = yes] nl_langinfo [test $ac_use_included_regex = yes] @@ -32,7 +28,6 @@ stdint [test $ac_use_included_regex = yes] wchar [test $ac_use_included_regex = yes] wcrtomb [test $ac_use_included_regex = yes] wctype-h[test $ac_use_included_regex = yes] -wctype [test $ac_use_included_regex = yes] configure.ac: gl_REGEX -- 2.17.1
Re: missing module dependencies for vasnprintf
On Apr 8, 2010, at 5:11 PM, ext Bruno Haible wrote: > > Yup, this is pretty much the situation that I imagined. Probably the patch > that I've just committed will fix it. > Yes it did, thanks. Jarno
Re: missing module dependencies for vasnprintf
On Apr 8, 2010, at 5:02 PM, ext Bruno Haible wrote: > Trying to reproduce Jarno's errors, I added into some package that is > using "gnulib-tool --with-tests" > 1. vasnprintf but not vasnprintf-posix, > 2. round (any one of ceilf, floorf, roundf, round, truncf, trunc), > and got this error after running > $ gnulib-tool --import round vasnprintf > $ autoreconf > missing file gnulib/tests/vasnprintf.c > configure.ac:32: error: expected source file, required through > AC_LIBSOURCES, not found > gnulib/m4/gnulib-comp.m4:160: gl_INIT is expanded from... > configure.ac:32: the top level > autom4te: /arch/x86-linux/gnu/bin/m4 failed with exit status: 1 > aclocal: /arch/x86-linux/gnu/bin/autom4te failed with exit status: 1 > autoreconf: aclocal failed with exit status: 1 > I completely forgot to mention that I had the same problem, when invoking gnulib --with-tests. I guess your call above also implicitly included --with-tests? it complains about missing file in tests, while the file exists in the (gnu)lib directory. After this error I was not able to even make distclean. To be able to do that I copied all sources from the libgnu directory to the tests directory... which probably was not the right thing to do. Does your fix adderess this? Regards, Jarno > I'm applying this fix. > > > 2010-04-08 Bruno Haible > > Fix side effects from tests-related modules. > * modules/dprintf-posix (Comment): New section. > * modules/fprintf-posix (Comment): Likewise. > * modules/obstack-printf-posix (Comment): Likewise. > * modules/printf-posix (Comment): Likewise. > * modules/snprintf-posix (Comment): Likewise. > * modules/sprintf-posix (Comment): Likewise. > * modules/vasnprintf-posix (Comment): Likewise. > * modules/vasprintf-posix (Comment): Likewise. > * modules/vdprintf-posix (Comment): Likewise. > * modules/vfprintf-posix (Comment): Likewise. > * modules/vprintf-posix (Comment): Likewise. > * modules/vsnprintf-posix (Comment): Likewise. > * modules/vsprintf-posix (Comment): Likewise. > * modules/xprintf-posix (Comment): Likewise. > * modules/xvasprintf-posix (Comment): Likewise. > * modules/ceilf-tests (Depends-on): Remove fprintf-posix. > * modules/floorf-tests (Depends-on): Likewise. > * modules/round-tests (Depends-on): Likewise. > * modules/roundf-tests (Depends-on): Likewise. > * modules/trunc-tests (Depends-on): Likewise. > * modules/truncf-tests (Depends-on): Likewise. > * tests/test-ceilf2.c (check): Don't invoke fprintf if the > 'fprintf-posix' module is not present. > * tests/test-floorf2.c (check): Likewise. > * tests/test-trunc2.c (check): Likewise. > * tests/test-truncf2.c (check): Likewise. > * tests/test-round2.c (equal): Likewise. > > --- modules/ceilf-tests.orig Fri Apr 9 01:52:45 2010 > +++ modules/ceilf-tests Fri Apr 9 00:58:09 2010 > @@ -10,7 +10,6 @@ > isnanf-nolibm > stdbool > stdint > -fprintf-posix > > configure.ac: > > --- modules/dprintf-posix.origFri Apr 9 01:52:45 2010 > +++ modules/dprintf-posix Fri Apr 9 01:52:01 2010 > @@ -2,6 +2,12 @@ > POSIX compatible dprintf() function: print formatted output to a file > descriptor > > +Comment: > +This module should not be used as a dependency from a test module, > +otherwise when this module occurs as a tests-related module, it will > +have side effects on the compilation of the 'vasnprintf' module, if > +that module occurs among the main modules in lib/. > + > Files: > m4/dprintf-posix.m4 > m4/printf.m4 > --- modules/floorf-tests.orig Fri Apr 9 01:52:46 2010 > +++ modules/floorf-tests Fri Apr 9 00:58:10 2010 > @@ -10,7 +10,6 @@ > isnanf-nolibm > stdbool > stdint > -fprintf-posix > > configure.ac: > > --- modules/fprintf-posix.origFri Apr 9 01:52:46 2010 > +++ modules/fprintf-posix Fri Apr 9 01:52:02 2010 > @@ -1,6 +1,12 @@ > Description: > POSIX compatible fprintf() function: print formatted output to a stream > > +Comment: > +This module should not be used as a dependency from a test module, > +otherwise when this module occurs as a tests-related module, it will > +have side effects on the compilation of the 'vasnprintf' module, if > +that module occurs among the main modules in lib/. > + > Files: > lib/fprintf.c > m4/fprintf-posix.m4 > --- modules/obstack-printf-posix.orig Fri Apr 9 01:52:46 2010 > +++ modules/obstack-printf-posix Fri Apr 9 01:52:02 2010 > @@ -1,6 +1,12 @@ > Description: > POSIX formatted printing into an obstack. > > +Comment: > +This module should not be used as a dependency from a test module, > +otherwise when this module occurs as a tests-related module, it will > +have side effects on the compilation of the 'vasnprintf' module, if > +that module occurs among the main modules in lib/. > + > Files: > m4/obstack-printf.m4 > m4/obstack-printf-posix.m4 > --- modules/printf-posi
Re: missing module dependencies for vasnprintf
Jarno Rajahalme wrote: > thought I have a problem with gnulib, so I did make distclean, git pull on > gnulib, gnulib-tool --import, ./configure. After the gnulib-tool invocation, you likely need to insert an 'autoreconf' invocation. Often it may work without it, but not always. > I have now these defined in config.h, after doing the above: > > #define NEED_PRINTF_DIRECTIVE_A 1 > ... > m4/gnulib-cache looks like this: > > gl_LOCAL_DIR([gl]) > gl_MODULES([ > ... > round > roundf > ... > vsnprintf > ]) Yup, this is pretty much the situation that I imagined. Probably the patch that I've just committed will fix it. > running "gnulib-tool --create-megatestdir --with-tests --dir=..." completes. > Yesterday it failed to complete, and today it has been running for about 5 > hours already, is this normal? Yes. The "megatestdir" is really huge, as the name says. It is the right tool for testing the completeness of the dependencies of a single module, but a situation where two specific modules combined (like here, 'round' and 'vsnprintf') will not be detected even by the megatestdir. For testing portability, one usually uses the --create-testdir option. Bruno
Re: missing module dependencies for vasnprintf
Hi, Trying to reproduce Jarno's errors, I added into some package that is using "gnulib-tool --with-tests" 1. vasnprintf but not vasnprintf-posix, 2. round (any one of ceilf, floorf, roundf, round, truncf, trunc), and got this error after running $ gnulib-tool --import round vasnprintf $ autoreconf missing file gnulib/tests/vasnprintf.c configure.ac:32: error: expected source file, required through AC_LIBSOURCES, not found gnulib/m4/gnulib-comp.m4:160: gl_INIT is expanded from... configure.ac:32: the top level autom4te: /arch/x86-linux/gnu/bin/m4 failed with exit status: 1 aclocal: /arch/x86-linux/gnu/bin/autom4te failed with exit status: 1 autoreconf: aclocal failed with exit status: 1 I'm applying this fix. 2010-04-08 Bruno Haible Fix side effects from tests-related modules. * modules/dprintf-posix (Comment): New section. * modules/fprintf-posix (Comment): Likewise. * modules/obstack-printf-posix (Comment): Likewise. * modules/printf-posix (Comment): Likewise. * modules/snprintf-posix (Comment): Likewise. * modules/sprintf-posix (Comment): Likewise. * modules/vasnprintf-posix (Comment): Likewise. * modules/vasprintf-posix (Comment): Likewise. * modules/vdprintf-posix (Comment): Likewise. * modules/vfprintf-posix (Comment): Likewise. * modules/vprintf-posix (Comment): Likewise. * modules/vsnprintf-posix (Comment): Likewise. * modules/vsprintf-posix (Comment): Likewise. * modules/xprintf-posix (Comment): Likewise. * modules/xvasprintf-posix (Comment): Likewise. * modules/ceilf-tests (Depends-on): Remove fprintf-posix. * modules/floorf-tests (Depends-on): Likewise. * modules/round-tests (Depends-on): Likewise. * modules/roundf-tests (Depends-on): Likewise. * modules/trunc-tests (Depends-on): Likewise. * modules/truncf-tests (Depends-on): Likewise. * tests/test-ceilf2.c (check): Don't invoke fprintf if the 'fprintf-posix' module is not present. * tests/test-floorf2.c (check): Likewise. * tests/test-trunc2.c (check): Likewise. * tests/test-truncf2.c (check): Likewise. * tests/test-round2.c (equal): Likewise. --- modules/ceilf-tests.origFri Apr 9 01:52:45 2010 +++ modules/ceilf-tests Fri Apr 9 00:58:09 2010 @@ -10,7 +10,6 @@ isnanf-nolibm stdbool stdint -fprintf-posix configure.ac: --- modules/dprintf-posix.orig Fri Apr 9 01:52:45 2010 +++ modules/dprintf-posix Fri Apr 9 01:52:01 2010 @@ -2,6 +2,12 @@ POSIX compatible dprintf() function: print formatted output to a file descriptor +Comment: +This module should not be used as a dependency from a test module, +otherwise when this module occurs as a tests-related module, it will +have side effects on the compilation of the 'vasnprintf' module, if +that module occurs among the main modules in lib/. + Files: m4/dprintf-posix.m4 m4/printf.m4 --- modules/floorf-tests.orig Fri Apr 9 01:52:46 2010 +++ modules/floorf-testsFri Apr 9 00:58:10 2010 @@ -10,7 +10,6 @@ isnanf-nolibm stdbool stdint -fprintf-posix configure.ac: --- modules/fprintf-posix.orig Fri Apr 9 01:52:46 2010 +++ modules/fprintf-posix Fri Apr 9 01:52:02 2010 @@ -1,6 +1,12 @@ Description: POSIX compatible fprintf() function: print formatted output to a stream +Comment: +This module should not be used as a dependency from a test module, +otherwise when this module occurs as a tests-related module, it will +have side effects on the compilation of the 'vasnprintf' module, if +that module occurs among the main modules in lib/. + Files: lib/fprintf.c m4/fprintf-posix.m4 --- modules/obstack-printf-posix.orig Fri Apr 9 01:52:46 2010 +++ modules/obstack-printf-posixFri Apr 9 01:52:02 2010 @@ -1,6 +1,12 @@ Description: POSIX formatted printing into an obstack. +Comment: +This module should not be used as a dependency from a test module, +otherwise when this module occurs as a tests-related module, it will +have side effects on the compilation of the 'vasnprintf' module, if +that module occurs among the main modules in lib/. + Files: m4/obstack-printf.m4 m4/obstack-printf-posix.m4 --- modules/printf-posix.orig Fri Apr 9 01:52:46 2010 +++ modules/printf-posixFri Apr 9 01:52:02 2010 @@ -1,6 +1,12 @@ Description: POSIX compatible printf() function: print formatted output to standard output +Comment: +This module should not be used as a dependency from a test module, +otherwise when this module occurs as a tests-related module, it will +have side effects on the compilation of the 'vasnprintf' module, if +that module occurs among the main modules in lib/. + Files: lib/printf.c m4/printf-posix-rpl.m4 --- modules/round-tests.origFri Apr 9 01:52:46 2010 +++ modules/round-tests Fri Apr 9 00:58:10 2010 @@ -9,7 +9,6 @@ isnand-nolibm stdbool stdint -fprintf-posix v
Re: missing module dependencies for vasnprintf
I'm trying to compile octave with GCC 4.4, and thought I have a problem with gnulib, so I did make distclean, git pull on gnulib, gnulib-tool --import, ./configure. I have now these defined in config.h, after doing the above: #define NEED_PRINTF_DIRECTIVE_A 1 /* #undef NEED_PRINTF_DIRECTIVE_F */ /* #undef NEED_PRINTF_DIRECTIVE_LS */ /* #undef NEED_PRINTF_DOUBLE */ /* #undef NEED_PRINTF_ENOMEM */ /* #undef NEED_PRINTF_FLAG_GROUPING */ /* #undef NEED_PRINTF_FLAG_LEFTADJUST */ #define NEED_PRINTF_FLAG_ZERO 1 /* #undef NEED_PRINTF_INFINITE_DOUBLE */ #define NEED_PRINTF_INFINITE_LONG_DOUBLE 1 /* #undef NEED_PRINTF_LONG_DOUBLE */ /* #undef NEED_PRINTF_UNBOUNDED_PRECISION */ m4/gnulib-cache looks like this: gl_LOCAL_DIR([gl]) gl_MODULES([ c-strcase crypto/md5 fcntl fnmatch getcwd gethostname getopt-gnu gettimeofday glob link lstat mkdir mkfifo nanosleep pathmax progname readlink rename rmdir round roundf sigaction signal sigprocmask sleep stat stdint strftime strptime symlink sys_stat sys_time sys_times time times trunc truncf unistd unlink vsnprintf ]) gl_AVOID([]) gl_SOURCE_BASE([libgnu]) gl_M4_BASE([m4]) gl_PO_BASE([]) gl_DOC_BASE([doc]) gl_TESTS_BASE([gltests]) gl_WITH_TESTS gl_LIB([libgnu]) gl_MAKEFILE_NAME([]) gl_LIBTOOL gl_MACRO_PREFIX([gl]) gl_PO_DOMAIN([]) libgnu/*.[ch]: alignof.h fnmatch.in.hmkfifo.c strcasecmp.c alloca.cfnmatch_loop.c nanosleep.c strdup.c alloca.hfpucw.h open.c streq.h alloca.in.h frexp.c openat-die.c strerror.c arg-nonnull.h frexpl.copenat-priv.h strftime.c asnprintf.c fstatat.c openat-proc.c strftime.h at-func.c getcwd.copenat.cstring.h basename-lgpl.c getdtablesize.c openat.h string.in.h c++defs.h gethostname.c pathmax.h strings.h c-ctype.c getlogin_r.cpipe-safer.c strings.in.h c-ctype.h getopt.cprintf-args.c stripslash.c c-strcase.h getopt.hprintf-args.h strncasecmp.c c-strcasecmp.c getopt.in.h printf-frexp.c strnlen1.c c-strncasecmp.c getopt1.c printf-frexp.h strnlen1.h canonicalize-lgpl.c getopt_int.hprintf-frexpl.c strptime.c chdir-long.cgettext.h printf-frexpl.h symlink.c chdir-long.hgettimeofday.c printf-parse.c sys_select.in.h chown.c glob-libc.h printf-parse.h sys_socket.in.h cloexec.c glob.c progname.c sys_stat.in.h cloexec.h glob.h progname.h sys_time.in.h close-hook.cglob.in.h readlink.c sys_times.in.h close-hook.hintprops.h realloc.c time.h close.c isnan.c rename.c time.in.h configmake.hisnand-nolibm.h rmdir.c time_r.c dirent.hisnand.cround.c times.c dirent.in.h isnanl-nolibm.h roundf.ctrunc.c dirfd.c isnanl.csame-inode.htruncf.c dirname-lgpl.c lchown.csave-cwd.c unistd--.h dirname.h link.c save-cwd.h unistd-safer.h dup-safer.c localcharset.c select.cunistd.h dup2.c localcharset.h sig-handler.h unistd.in.h errno.in.h lstat.c sigaction.c unlink.c error.c malloc.csignal.h unlinkat.c error.h malloca.c signal.in.h vasnprintf.c exitfail.c malloca.h sigprocmask.c vasnprintf.h exitfail.h math.h size_max.h verify.h fchdir.cmath.in.h sleep.c vsnprintf.c fchmodat.c mbrlen.csockets.c w32sock.h fchown-stub.c mbrtowc.c sockets.h warn-on-use.h fchownat.c mbsinit.c stat.c wchar.h fclose.cmbsrtowcs-state.c stdbool.in.h wchar.in.h fcntl.c mbsrtowcs.c stddef.in.h wctype.h fcntl.h md5.c stdint.h wctype.in.h fcntl.in.
Re: missing module dependencies for vasnprintf
Hi, Jarno Rajahalme wrote: > modules/vasnprintf is missing dependencies, which results in compile error: > > vasnprintf.c:103:28: error: isnanl-nolibm.h: No such file or directory > vasnprintf.c:104:20: error: fpucw.h: No such file or directory > vasnprintf.c:109:28: error: isnand-nolibm.h: No such file or directory > vasnprintf.c:110:27: error: printf-frexp.h: No such file or directory > vasnprintf.c:116:28: error: printf-frexpl.h: No such file or directory > > I got rid of the errors with this change: > *** modules/vasnprintf~ Fri Apr 2 17:41:34 2010 > --- modules/vasnprintfThu Apr 8 12:32:19 2010 > *** > *** 25,30 > --- 25,38 > xsize > errno > memchr > + fpucw > + isnand-nolibm > + isnanl-nolibm > + frexp-nolibm > + frexpl-nolibm > + printf-frexp > + printf-frexpl > + > > configure.ac: > gl_FUNC_VASNPRINTF This should not be needed. The include files that you mention are only used when NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE, and these symbols will only be defined to 1 in if a module of the family *printf-posix is used, and each of these modules depends on 'vasnprintf-posix', and 'vasnprintf-posix' depends on the modules that you mention. Can you tell us how to reproduce the compilation error that you got? I.e. 1) Which modules did you ask gnulib-tool to import? 2) On which platform are you compiling the tarball? Bruno
missing module dependencies for vasnprintf
Hi, modules/vasnprintf is missing dependencies, which results in compile error: vasnprintf.c:103:28: error: isnanl-nolibm.h: No such file or directory vasnprintf.c:104:20: error: fpucw.h: No such file or directory vasnprintf.c:109:28: error: isnand-nolibm.h: No such file or directory vasnprintf.c:110:27: error: printf-frexp.h: No such file or directory vasnprintf.c:116:28: error: printf-frexpl.h: No such file or directory I got rid of the errors with this change: *** modules/vasnprintf~ Fri Apr 2 17:41:34 2010 --- modules/vasnprintf Thu Apr 8 12:32:19 2010 *** *** 25,30 --- 25,38 xsize errno memchr + fpucw + isnand-nolibm + isnanl-nolibm + frexp-nolibm + frexpl-nolibm + printf-frexp + printf-frexpl + configure.ac: gl_FUNC_VASNPRINTF I did not check the sources if these are enough in all cases...
Re: some missing module dependencies
Hello Jim, * Jim Meyering wrote on Fri, Sep 22, 2006 at 09:13:41AM CEST: > Ralf Wildenhues <[EMAIL PROTECTED]> wrote: > > > > Is this patch ok, or would you rather factor out clock_time.m4 into its > > own module (as it is listed by 3 modules already)? > It's a tiny bit nicer to alphabetize lists e.g., of module names > and file names. Done. > > * modules/nanosleep: Need m4/clock_time.m4. > > I too prefer module-based dependencies. > You're welcome to create the new module. Done. I hope it's ok to list you as maintainer. I've applied as shown below. Thanks for the review! Cheers, Ralf * modules/clock-time: New module. * modules/nanosleep (Depends-on): Add clock-time. * modules/gethrxtime (Depends-on): Likewise. * modules/gettime (Depends-on): Likewise. * modules/settime (Depends-on): Likewise. * modules/fts-lgpl: Depend on openat. * modules/mkancesdirs: Depend on savewd. * modules/mkdir-p: Likewise. --- /dev/null 2006-09-21 00:13:29.348322750 +0200 +++ modules/clock-time 2006-09-25 19:28:28.0 +0200 @@ -0,0 +1,21 @@ +Description: +Check for clock_gettime and clock_settime. + +Files: +m4/clock_time.m4 + +Depends-on: +extensions + +configure.ac: +gl_CLOCK_TIME + +Makefile.am: + +Include: + +License: +GPL + +Maintainer: +Jim Meyering Index: modules/fts-lgpl === RCS file: /cvsroot/gnulib/gnulib/modules/fts-lgpl,v retrieving revision 1.2 diff -u -r1.2 fts-lgpl --- modules/fts-lgpl27 May 2005 23:59:22 - 1.2 +++ modules/fts-lgpl25 Sep 2006 17:32:47 - @@ -8,6 +8,7 @@ Depends-on: dirfd +openat stdbool configure.ac: Index: modules/gethrxtime === RCS file: /cvsroot/gnulib/gnulib/modules/gethrxtime,v retrieving revision 1.4 diff -u -r1.4 gethrxtime --- modules/gethrxtime 21 Aug 2006 21:46:31 - 1.4 +++ modules/gethrxtime 25 Sep 2006 17:32:47 - @@ -6,10 +6,10 @@ lib/gethrxtime.c lib/gethrxtime.h m4/gethrxtime.m4 -m4/clock_time.m4 m4/longlong.m4 Depends-on: +clock-time gettime extensions Index: modules/gettime === RCS file: /cvsroot/gnulib/gnulib/modules/gettime,v retrieving revision 1.7 diff -u -r1.7 gettime --- modules/gettime 31 Aug 2006 07:00:50 - 1.7 +++ modules/gettime 25 Sep 2006 17:32:47 - @@ -3,10 +3,10 @@ Files: lib/gettime.c -m4/clock_time.m4 m4/gettime.m4 Depends-on: +clock-time gettime gettimeofday timespec Index: modules/mkancesdirs === RCS file: /cvsroot/gnulib/gnulib/modules/mkancesdirs,v retrieving revision 1.3 diff -u -r1.3 mkancesdirs --- modules/mkancesdirs 16 Sep 2006 19:58:25 - 1.3 +++ modules/mkancesdirs 25 Sep 2006 17:32:47 - @@ -9,6 +9,7 @@ Depends-on: dirname fcntl +savewd stat-macros configure.ac: Index: modules/mkdir-p === RCS file: /cvsroot/gnulib/gnulib/modules/mkdir-p,v retrieving revision 1.9 diff -u -r1.9 mkdir-p --- modules/mkdir-p 28 Aug 2006 22:59:17 - 1.9 +++ modules/mkdir-p 25 Sep 2006 17:32:47 - @@ -16,6 +16,7 @@ lchown mkancesdirs quote +savewd stat-macros stdbool Index: modules/nanosleep === RCS file: /cvsroot/gnulib/gnulib/modules/nanosleep,v retrieving revision 1.7 diff -u -r1.7 nanosleep --- modules/nanosleep 2 Mar 2006 07:36:42 - 1.7 +++ modules/nanosleep 25 Sep 2006 17:32:47 - @@ -6,6 +6,7 @@ m4/nanosleep.m4 Depends-on: +clock-time timespec stdbool extensions Index: modules/settime === RCS file: /cvsroot/gnulib/gnulib/modules/settime,v retrieving revision 1.6 diff -u -r1.6 settime --- modules/settime 2 Mar 2006 07:36:42 - 1.6 +++ modules/settime 25 Sep 2006 17:32:47 - @@ -3,12 +3,12 @@ Files: lib/settime.c -m4/clock_time.m4 m4/settime.m4 Depends-on: -timespec +clock-time extensions +timespec configure.ac: gl_SETTIME
Re: some missing module dependencies
Ralf Wildenhues <[EMAIL PROTECTED]> wrote: > Hello Jim, Paul, all, > > Is this patch ok, or would you rather factor out clock_time.m4 into its > own module (as it is listed by 3 modules already)? > > * modules/fts-lgpl: Depend on openat. > * modules/mkancesdirs: Depend on savewd. > * modules/mkdir-p: Likewise. Thanks for catching those. It's a tiny bit nicer to alphabetize lists e.g., of module names and file names. > * modules/nanosleep: Need m4/clock_time.m4. I too prefer module-based dependencies. You're welcome to create the new module.
some missing module dependencies
Hello Jim, Paul, all, Is this patch ok, or would you rather factor out clock_time.m4 into its own module (as it is listed by 3 modules already)? Cheers, Ralf * modules/fts-lgpl: Depend on openat. * modules/mkancesdirs: Depend on savewd. * modules/mkdir-p: Likewise. * modules/nanosleep: Need m4/clock_time.m4. Index: modules/fts-lgpl === RCS file: /cvsroot/gnulib/gnulib/modules/fts-lgpl,v retrieving revision 1.2 diff -u -r1.2 fts-lgpl --- modules/fts-lgpl27 May 2005 23:59:22 - 1.2 +++ modules/fts-lgpl22 Sep 2006 03:14:16 - @@ -9,6 +9,7 @@ Depends-on: dirfd stdbool +openat configure.ac: gl_FUNC_FTS_LGPL Index: modules/mkancesdirs === RCS file: /cvsroot/gnulib/gnulib/modules/mkancesdirs,v retrieving revision 1.3 diff -u -r1.3 mkancesdirs --- modules/mkancesdirs 16 Sep 2006 19:58:25 - 1.3 +++ modules/mkancesdirs 22 Sep 2006 03:14:16 - @@ -10,6 +10,7 @@ dirname fcntl stat-macros +savewd configure.ac: gl_MKANCESDIRS Index: modules/mkdir-p === RCS file: /cvsroot/gnulib/gnulib/modules/mkdir-p,v retrieving revision 1.9 diff -u -r1.9 mkdir-p --- modules/mkdir-p 28 Aug 2006 22:59:17 - 1.9 +++ modules/mkdir-p 22 Sep 2006 03:14:16 - @@ -18,6 +18,7 @@ quote stat-macros stdbool +savewd configure.ac: gl_MKDIR_PARENTS Index: modules/nanosleep === RCS file: /cvsroot/gnulib/gnulib/modules/nanosleep,v retrieving revision 1.7 diff -u -r1.7 nanosleep --- modules/nanosleep 2 Mar 2006 07:36:42 - 1.7 +++ modules/nanosleep 22 Sep 2006 03:14:16 - @@ -4,6 +4,7 @@ Files: lib/nanosleep.c m4/nanosleep.m4 +m4/clock_time.m4 Depends-on: timespec