From d33ff301454fa1db9919674dbc2a37309bbd529f Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Thu, 30 Jan 2003 05:22:52 +0000 Subject: 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). --- arscan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arscan.c') diff --git a/arscan.c b/arscan.c index 2c67947..b1e9971 100644 --- a/arscan.c +++ b/arscan.c @@ -781,7 +781,8 @@ ar_member_touch (char *arname, char *memname) if (AR_HDR_SIZE != write (fd, (char *) &ar_hdr, AR_HDR_SIZE)) goto lose; /* The file's mtime is the time we we want. */ - if (fstat (fd, &statbuf) < 0) + EINTRLOOP (i, fstat (fd, &statbuf)); + if (i < 0) goto lose; #if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32) /* Advance member's time to that time */ -- cgit v1.2.3