[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stat(1) on Solaris 9
From: |
Jim Meyering |
Subject: |
Re: stat(1) on Solaris 9 |
Date: |
Thu, 22 Oct 2009 12:14:24 +0200 |
Jim Meyering wrote:
> Eric Blake wrote:
>> Gnulib fixed stat(2) to work around Solaris 9 bugs. But stat(1) still
> Good reason to add a test of stat(1), too,
> if there isn't one.
>
>> exposes the bug. Why? Because our replacement <sys/stat.h> declares stat
>> as an object-like macro, but stat(1) had a usage pattern that hid rpl_stat
>> from view and directly called the buggy stat. OK to commit?
>
> Good catch. Please do.
>
>> Also, I'm reattaching the stdbuf readlink() cleanup patch from a few days
>> ago; I've now tested it on Linux. What file contains maintainer syntax
>> checks to ensure we don't reintroduce raw '\breadlink(at)?' or 'stat :'?
>
> cfg.mk is where I've been putting coreutils-specific syntax checks.
Here's part of it:
>From cbf36952d8c227aa5e46acf8643458a7fd51d473 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 22 Oct 2009 12:12:24 +0200
Subject: [PATCH] build: prohibit direct use of readlink or readlinkat
* cfg.mk (sc_prohibit_readlink): New rule.
Suggested by Eric Blake.
---
cfg.mk | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 5de2f37..807d3c9 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -191,6 +191,12 @@ sc_no_exec_perl_coreutils:
exit 1; } || :; \
fi
+# Don't use "readlink" or "readlinkat" directly
+sc_prohibit_readlink:
+ @re='\<readlink(at)? \(' \
+ msg='do not use readlink(at); use via xreadlink or areadlink*' \
+ $(_prohibit_regexp)
+
# Ensure that date's --help output stays in sync with the info
# documentation for GNU strftime. The only exception is %N,
# which date accepts but GNU strftime does not.
--
1.6.5.1.305.g914c1