From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 546A61F45D for ; Sun, 22 Mar 2020 12:43:12 +0000 (UTC) Received: from localhost ([::1]:46114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFzwd-0004Es-3s for normalperson@yhbt.net; Sun, 22 Mar 2020 08:43:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48891) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFzuD-0008OI-G4 for bug-gnulib@gnu.org; Sun, 22 Mar 2020 08:40:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFzuB-0005nP-6S for bug-gnulib@gnu.org; Sun, 22 Mar 2020 08:40:41 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::10]:20415) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFzu9-0005mt-UW for bug-gnulib@gnu.org; Sun, 22 Mar 2020 08:40:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1584880834; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=rRPqHZvYjGiyadQo2uSetXMXEDH0hMzR5YtO2e8PJIY=; b=sxl3dWNcBrl2C5R7PHRgbKQl7vIFyyo5u0yupGR3tFroIG0z1TsXmyfDyAjRo8E8wl pAibUI0i68DMWV32PjoEo255yMUFNw2I24TW9/yRVFz6Dw++CgQT1NO/USxNLZkzgm1n YMcu5CDAG2APu5gdhAP6mVchp39pMrnEDcybu8wx4kylHe9jI0rq/4nqNfrcR9b/yFPv I134+//7TzCU/58pVLiXRgKxuzIpsLROM1puVxZLcD6PZuP3VfSJ0ONssk0lo2rlh/I3 OYub623yJINjqngturvcwEc4yBpJoR5PMPwe3CvNkpEH6FSq+aPB3371u/yAFbdD5KZr +/Jg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.2.1 DYNA|AUTH) with ESMTPSA id R09594w2MCeXDI0 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sun, 22 Mar 2020 13:40:33 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: add dependencies to 'stat' Date: Sun, 22 Mar 2020 13:40:33 +0100 Message-ID: <2419631.XzKDRq9MxM@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-174-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <4788282.ZROCF8QrpU@omega> References: <4788282.ZROCF8QrpU@omega> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::10 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On 2020-03-08 I wrote: > We have documented on 2020-01-03 that fstat() needs workarounds even on plain > glibc/Linux systems. So, basically every use of fstat() in gnulib needs a > dependency on the 'fstat' module. Likewise for the 'stat' module. I found these (listing the source files and corresponding modules): linkat, renameatu at-func2.c:128: if (stat (".", &st1) == -1 || fstat (fd2, &st2) == -1) at-func2.c:140: if (stat (".", &st2) == -1 || fstat (fd1, &st1) == -1) at-func2.c:162: if (stat (".", &st1) == 0 && SAME_INODE (st1, st2)) at-func2.c:175: if (stat (".", &st2) == 0 && SAME_INODE (st1, st2)) linkat linkat.c:72: if (lstat (file1, &st1) == 0 && stat (dir, &st2) == 0) canonicalize canonicalize.c:233: else if ((logical ? stat (rname, &st) : lstat (rname, &st)) != 0) file-has-acl (Not needed on Linux. But on HP-UX 32-bit, off_t is 32-bit.) file-has-acl.c:356: if (stat (name, &statbuf) < 0) fstatat fstatat.c:116: return stat (name, st); fstat fstat.c:75: return stat (name, buf); glob glob.c:79:# define __stat64(fname, buf) stat (fname, buf) glob.c:262: : __stat64 (filename, &st64) == 0 && S_ISDIR (st64.st_mode)); javacomp javacomp.c:840: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:855: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:889: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:923: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:988: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1050: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1064: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1096: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1105: && stat (compiled_file_name, &statbuf) >= 0)) javacomp.c:1191: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1206: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1240: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1274: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1290: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1326: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1364: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1630: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1642: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1675: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1706: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1769: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1826: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1840: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:1938: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1951: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:1985: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:2017: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:2032: && stat (compiled_file_name, &statbuf) >= 0 javacomp.c:2067: && stat (compiled_file_name, &statbuf) >= 0) javacomp.c:2102: && stat (compiled_file_name, &statbuf) >= 0 mkdir mkdir.c:80: if (stat (tmp_dir, &st) == 0) pt_chown pt_chown.c:53: if (stat (pty, &st) < 0 || !S_ISCHR (st.st_mode)) ptsname_r ptsname_r.c:201: if (__stat (buf, &st) < 0) readlinkat readlinkat.c:46: if (stat (file, &st) == 0) rename rename.c:91: if (stat (src, &src_st)) rename.c:93: if (stat (dst, &dst_st)) acl-permissions set-permissions.c:286: ret = stat (name, &statbuf); tmpdir tmpdir.c:57:# define __xstat64(version, path, buf) stat (path, buf) utimens utimens.c:236: if (fd < 0 ? stat (file, &st) : fstat (fd, &st)) utimens.c:380: && (fd < 0 ? stat (file, &st) : fstat (fd, &st))) relocatable-prog-wrapper progreloc.c:177: if (stat (filename, &statfile) < 0) 2020-03-22 Bruno Haible Several modules: Depend on stat. * modules/acl-permissions (Depends-on): Add stat. * modules/canonicalize (Depends-on): Likewise. * modules/file-has-acl (Depends-on): Likewise. * modules/fstat (Depends-on): Likewise. * modules/fstatat (Depends-on): Likewise. * modules/glob (Depends-on): Likewise. * modules/javacomp (Depends-on): Likewise. * modules/linkat (Depends-on): Likewise. * modules/mkdir (Depends-on): Likewise. * modules/pt_chown (Depends-on): Likewise. * modules/ptsname_r (Depends-on): Likewise. * modules/readlinkat (Depends-on): Likewise. * modules/rename (Depends-on): Likewise. * modules/renameatu (Depends-on): Likewise. * modules/tmpdir (Depends-on): Likewise. * modules/utimens (Depends-on): Likewise. * modules/relocatable-prog-wrapper (Depends-on): Add largefile. * modules/same (Depends-on): Remove stat. diff --git a/modules/acl-permissions b/modules/acl-permissions index 49b91ff..3ecbb95 100644 --- a/modules/acl-permissions +++ b/modules/acl-permissions @@ -14,6 +14,7 @@ m4/acl.m4 Depends-on: extern-inline fstat +stat stdbool sys_stat diff --git a/modules/canonicalize b/modules/canonicalize index bf3dc57..b8aadb7 100644 --- a/modules/canonicalize +++ b/modules/canonicalize @@ -17,6 +17,7 @@ lstat memmove nocrash pathmax +stat sys_stat xalloc xgetcwd diff --git a/modules/file-has-acl b/modules/file-has-acl index 4857fea..0f8ab37 100644 --- a/modules/file-has-acl +++ b/modules/file-has-acl @@ -8,6 +8,7 @@ m4/acl.m4 Depends-on: acl-permissions +stat configure.ac: gl_FILE_HAS_ACL diff --git a/modules/fstat b/modules/fstat index b557494..e88bb43 100644 --- a/modules/fstat +++ b/modules/fstat @@ -11,6 +11,7 @@ Depends-on: sys_stat largefile pathmax [test $REPLACE_FSTAT = 1] +stat [test $REPLACE_FSTAT = 1] stat-time [test $REPLACE_FSTAT = 1] unistd [test $REPLACE_FSTAT = 1] verify [test $REPLACE_FSTAT = 1] diff --git a/modules/fstatat b/modules/fstatat index c311846..14c3f27 100644 --- a/modules/fstatat +++ b/modules/fstatat @@ -20,6 +20,7 @@ lstat [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1] openat-die [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1] openat-h [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1] save-cwd [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1] +stat [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1] stat-time [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1] configure.ac: diff --git a/modules/glob b/modules/glob index 33d43bf..eb1bd9e 100644 --- a/modules/glob +++ b/modules/glob @@ -26,6 +26,7 @@ mempcpy [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1] opendir [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1] readdir [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1] scratch_buffer [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1] +stat [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1] stdbool [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1] stdint [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1] strdup [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1] diff --git a/modules/javacomp b/modules/javacomp index d1cc559..4f49bd9 100644 --- a/modules/javacomp +++ b/modules/javacomp @@ -23,6 +23,7 @@ getline xconcat-filename fwriteerror clean-temp +stat error xvasprintf c-strstr diff --git a/modules/linkat b/modules/linkat index e0c4165..a7cbb94 100644 --- a/modules/linkat +++ b/modules/linkat @@ -25,6 +25,7 @@ link [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] lstat [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] same-inode [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] save-cwd [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] +stat [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] symlink [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1] areadlinkat [test $REPLACE_LINKAT = 1] fstatat [test $REPLACE_LINKAT = 1] diff --git a/modules/mkdir b/modules/mkdir index 032f1c5..2f1850c 100644 --- a/modules/mkdir +++ b/modules/mkdir @@ -8,6 +8,7 @@ m4/mkdir.m4 Depends-on: sys_stat dirname-lgpl [test $REPLACE_MKDIR = 1] +stat [test $REPLACE_MKDIR = 1] configure.ac: gl_FUNC_MKDIR diff --git a/modules/pt_chown b/modules/pt_chown index ddde845..5cf4a7c 100644 --- a/modules/pt_chown +++ b/modules/pt_chown @@ -10,6 +10,7 @@ ptsname root-uid stdlib configmake +stat configure.ac: diff --git a/modules/ptsname_r b/modules/ptsname_r index 9adc08b..9cd5703 100644 --- a/modules/ptsname_r +++ b/modules/ptsname_r @@ -9,6 +9,7 @@ Depends-on: stdlib extensions isatty [test $HAVE_PTSNAME_R = 0 || test $REPLACE_PTSNAME_R = 1] +stat [test $HAVE_PTSNAME_R = 0 || test $REPLACE_PTSNAME_R = 1] ttyname_r [test $HAVE_PTSNAME_R = 0 || test $REPLACE_PTSNAME_R = 1] configure.ac: diff --git a/modules/readlinkat b/modules/readlinkat index a89c53f..84dac40 100644 --- a/modules/readlinkat +++ b/modules/readlinkat @@ -17,6 +17,7 @@ fcntl-h [test $HAVE_READLINKAT = 0] openat-die [test $HAVE_READLINKAT = 0] openat-h [test $HAVE_READLINKAT = 0] save-cwd [test $HAVE_READLINKAT = 0] +stat [test $HAVE_READLINKAT = 0] readlink [test $HAVE_READLINKAT = 0] configure.ac: diff --git a/modules/relocatable-prog-wrapper b/modules/relocatable-prog-wrapper index 58af208..25cc66f 100644 --- a/modules/relocatable-prog-wrapper +++ b/modules/relocatable-prog-wrapper @@ -37,6 +37,7 @@ Depends-on: alloca-opt double-slash-root errno +largefile pathmax ssize_t stdbool diff --git a/modules/rename b/modules/rename index 582d630..27d6d4a 100644 --- a/modules/rename +++ b/modules/rename @@ -13,6 +13,7 @@ dirname-lgpl [test $REPLACE_RENAME = 1] lstat [test $REPLACE_RENAME = 1] rmdir [test $REPLACE_RENAME = 1] same-inode [test $REPLACE_RENAME = 1] +stat [test $REPLACE_RENAME = 1] stdbool [test $REPLACE_RENAME = 1] strdup [test $REPLACE_RENAME = 1] diff --git a/modules/renameatu b/modules/renameatu index bc320d1..d0a123c 100644 --- a/modules/renameatu +++ b/modules/renameatu @@ -23,6 +23,7 @@ openat-die [test $HAVE_RENAMEAT = 0] rename [test $HAVE_RENAMEAT = 0] same-inode [test $HAVE_RENAMEAT = 0] save-cwd [test $HAVE_RENAMEAT = 0] +stat [test $HAVE_RENAMEAT = 0] configure.ac: gl_FUNC_RENAMEAT diff --git a/modules/same b/modules/same index 24c9cf3..f4926be 100644 --- a/modules/same +++ b/modules/same @@ -14,7 +14,6 @@ fstat fstatat openat same-inode -stat stdbool memcmp diff --git a/modules/tmpdir b/modules/tmpdir index 40023b8..591a741 100644 --- a/modules/tmpdir +++ b/modules/tmpdir @@ -8,6 +8,7 @@ m4/tmpdir.m4 Depends-on: secure_getenv +stat stdbool sys_stat pathmax diff --git a/modules/utimens b/modules/utimens index dbe24df..c124cb5 100644 --- a/modules/utimens +++ b/modules/utimens @@ -15,6 +15,7 @@ fstat lstat gettime msvc-nothrow +stat stat-time stdbool sys_stat