diff options
author | Paul Smith <psmith@gnu.org> | 2003-01-30 05:22:52 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2003-01-30 05:22:52 +0000 |
commit | d33ff301454fa1db9919674dbc2a37309bbd529f (patch) | |
tree | b843b352a445c03c8d1f4c2265334ea0e83de046 /read.c | |
parent | d15a484098a52e0784933ba03a98445fdc86ea3f (diff) | |
download | gunmake-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 'read.c')
-rw-r--r-- | read.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -2819,6 +2819,7 @@ construct_include_path (char **arg_dirs) while (*arg_dirs != 0) { char *dir = *arg_dirs++; + int e; if (dir[0] == '~') { @@ -2827,7 +2828,8 @@ construct_include_path (char **arg_dirs) dir = expanded; } - if (stat (dir, &stbuf) == 0 && S_ISDIR (stbuf.st_mode)) + EINTRLOOP (e, stat (dir, &stbuf)); + if (e == 0 && S_ISDIR (stbuf.st_mode)) { if (idx == max - 1) { @@ -2860,9 +2862,13 @@ construct_include_path (char **arg_dirs) #endif for (i = 0; default_include_directories[i] != 0; ++i) - if (stat (default_include_directories[i], &stbuf) == 0 - && S_ISDIR (stbuf.st_mode)) - dirs[idx++] = default_include_directories[i]; + { + int e; + + EINTRLOOP (e, stat (default_include_directories[i], &stbuf)); + if (e == 0 && S_ISDIR (stbuf.st_mode)) + dirs[idx++] = default_include_directories[i]; + } dirs[idx] = 0; |