From: Bruno Haible Date: Sun, 5 Jan 2025 12:21:35 +0000 (+0100) Subject: tests: Don't use module 'getcwd' as dependency. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=601674d2522e1fbf1a4da34390d6a5cdacd1aaed;p=gnulib.git tests: Don't use module 'getcwd' as dependency. * modules/getcwd (Comment): New section. * modules/xgetcwd (Comment): Likewise. * modules/xgetcwd-lgpl: New file, based on modules/xgetcwd. * modules/chown-tests (Depends-on): Add xgetcwd-lgpl. Remove xgetcwd. * modules/fchownat-tests (Depends-on): Likewise. * modules/fdutimensat-tests (Depends-on): Likewise. * modules/futimens-tests (Depends-on): Likewise. * modules/lchown-tests (Depends-on): Likewise. * modules/stat-time-tests (Depends-on): Likewise. * modules/utime-tests (Depends-on): Likewise. * modules/utimens-tests (Depends-on): Likewise. * modules/utimensat-tests (Depends-on): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 4b7c72c906..2710a9a489 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2025-01-05 Bruno Haible + + tests: Don't use module 'getcwd' as dependency. + * modules/getcwd (Comment): New section. + * modules/xgetcwd (Comment): Likewise. + * modules/xgetcwd-lgpl: New file, based on modules/xgetcwd. + * modules/chown-tests (Depends-on): Add xgetcwd-lgpl. Remove xgetcwd. + * modules/fchownat-tests (Depends-on): Likewise. + * modules/fdutimensat-tests (Depends-on): Likewise. + * modules/futimens-tests (Depends-on): Likewise. + * modules/lchown-tests (Depends-on): Likewise. + * modules/stat-time-tests (Depends-on): Likewise. + * modules/utime-tests (Depends-on): Likewise. + * modules/utimens-tests (Depends-on): Likewise. + * modules/utimensat-tests (Depends-on): Likewise. + 2024-12-31 Bruno Haible getcwd: Return "/bin" instead of "//bin" on Adélie Linux. diff --git a/modules/chown-tests b/modules/chown-tests index 2c3d9686dc..280908109d 100644 --- a/modules/chown-tests +++ b/modules/chown-tests @@ -15,7 +15,7 @@ stdbool stdckdint symlink xconcat-filename -xgetcwd +xgetcwd-lgpl configure.ac: AC_CHECK_FUNCS_ONCE([getgid getegid]) diff --git a/modules/fchownat-tests b/modules/fchownat-tests index 2f804eccc1..bda86efc44 100644 --- a/modules/fchownat-tests +++ b/modules/fchownat-tests @@ -16,7 +16,7 @@ stat-time stdckdint symlink xconcat-filename -xgetcwd +xgetcwd-lgpl configure.ac: AC_CHECK_FUNCS_ONCE([getgid getegid]) diff --git a/modules/fdutimensat-tests b/modules/fdutimensat-tests index f4eb2ecc04..83a300ce92 100644 --- a/modules/fdutimensat-tests +++ b/modules/fdutimensat-tests @@ -17,7 +17,7 @@ timespec dup utimecmp xconcat-filename -xgetcwd +xgetcwd-lgpl configure.ac: diff --git a/modules/futimens-tests b/modules/futimens-tests index 7781dff3d3..5111066176 100644 --- a/modules/futimens-tests +++ b/modules/futimens-tests @@ -16,7 +16,7 @@ timespec dup utimecmp xconcat-filename -xgetcwd +xgetcwd-lgpl configure.ac: diff --git a/modules/getcwd b/modules/getcwd index f1aa6317b9..aea6d560f0 100644 --- a/modules/getcwd +++ b/modules/getcwd @@ -1,6 +1,12 @@ Description: Return the current working directory. +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 'getcwd-lgpl' module, if +that module occurs among the main modules in lib/. + Files: lib/getcwd.c m4/getcwd-abort-bug.m4 diff --git a/modules/lchown-tests b/modules/lchown-tests index cc7bffa55f..4c9d432658 100644 --- a/modules/lchown-tests +++ b/modules/lchown-tests @@ -15,7 +15,7 @@ stat-time stdbool symlink xconcat-filename -xgetcwd +xgetcwd-lgpl configure.ac: AC_CHECK_FUNCS_ONCE([getgid getegid]) diff --git a/modules/stat-time-tests b/modules/stat-time-tests index 9a283783b7..4e8d12e0f7 100644 --- a/modules/stat-time-tests +++ b/modules/stat-time-tests @@ -9,7 +9,7 @@ stdckdint time-h unistd xconcat-filename -xgetcwd +xgetcwd-lgpl configure.ac: diff --git a/modules/utime-tests b/modules/utime-tests index e354b476b8..304d0e097f 100644 --- a/modules/utime-tests +++ b/modules/utime-tests @@ -14,7 +14,7 @@ symlink timespec utimecmp xconcat-filename -xgetcwd +xgetcwd-lgpl configure.ac: diff --git a/modules/utimens-tests b/modules/utimens-tests index 3899bf08d4..d18ec5907e 100644 --- a/modules/utimens-tests +++ b/modules/utimens-tests @@ -17,7 +17,7 @@ symlink timespec utimecmp xconcat-filename -xgetcwd +xgetcwd-lgpl configure.ac: diff --git a/modules/utimensat-tests b/modules/utimensat-tests index 03c8d9990f..4842cecdfa 100644 --- a/modules/utimensat-tests +++ b/modules/utimensat-tests @@ -14,7 +14,7 @@ stdckdint timespec utimecmp xconcat-filename -xgetcwd +xgetcwd-lgpl configure.ac: diff --git a/modules/xgetcwd b/modules/xgetcwd index 9660d4fb2d..f53ce3e3ca 100644 --- a/modules/xgetcwd +++ b/modules/xgetcwd @@ -1,6 +1,12 @@ Description: Return the current working directory, without size limitations. +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 'getcwd-lgpl' module, if +that module occurs among the main modules in lib/. + Files: lib/xgetcwd.h lib/xgetcwd.c diff --git a/modules/xgetcwd-lgpl b/modules/xgetcwd-lgpl new file mode 100644 index 0000000000..64e7c8f60d --- /dev/null +++ b/modules/xgetcwd-lgpl @@ -0,0 +1,26 @@ +Description: +Return the current working directory, without size limitations. + +Files: +lib/xgetcwd.h +lib/xgetcwd.c +m4/xgetcwd.m4 + +Depends-on: +getcwd-lgpl +xalloc + +configure.ac: +gl_XGETCWD + +Makefile.am: +lib_SOURCES += xgetcwd.c + +Include: +"xgetcwd.h" + +License: +GPL + +Maintainer: +Jim Meyering