summaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2003-01-30 05:22:52 +0000
committerPaul Smith <psmith@gnu.org>2003-01-30 05:22:52 +0000
commitd33ff301454fa1db9919674dbc2a37309bbd529f (patch)
treeb843b352a445c03c8d1f4c2265334ea0e83de046 /commands.c
parentd15a484098a52e0784933ba03a98445fdc86ea3f (diff)
downloadgunmake-d33ff301454fa1db9919674dbc2a37309bbd529f.tar.gz
Portability fix for glob.h building in FreeBSD ports system.
Implement a fix for bug # 2169: too many OSs, even major OSs like Solaris, don't properly implement SA_RESTART: important system calls like stat() can still fail when SA_RESTART is set. So, forget the BROKEN_RESTART config check and get rid of atomic_stat() and atomic_readdir(), and implement permanent wrappers for EINTR checking on various system calls (stat(), fstat(), opendir(), and readdir() so far).
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands.c b/commands.c
index 30787a4..a6964d5 100644
--- a/commands.c
+++ b/commands.c
@@ -492,6 +492,7 @@ static void
delete_target (struct file *file, char *on_behalf_of)
{
struct stat st;
+ int e;
if (file->precious || file->phony)
return;
@@ -515,7 +516,8 @@ delete_target (struct file *file, char *on_behalf_of)
}
#endif
- if (stat (file->name, &st) == 0
+ EINTRLOOP (e, stat (file->name, &st));
+ if (e == 0
&& S_ISREG (st.st_mode)
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
{