summaryrefslogtreecommitdiff
path: root/usr/src/tools/cscope-fast
diff options
context:
space:
mode:
authorcasper <none@none>2005-11-09 11:19:56 -0800
committercasper <none@none>2005-11-09 11:19:56 -0800
commit4bc0a2ef2b7ba50a7a717e7ddbf31472ad28e358 (patch)
tree8076ef765d7019096fce872c8359a5345dee3160 /usr/src/tools/cscope-fast
parent205d86ae4bc9e661871ff365f59324d8c9b0108a (diff)
downloadillumos-joyent-4bc0a2ef2b7ba50a7a717e7ddbf31472ad28e358.tar.gz
6346636 expunge readdir_r uses from Solaris
6346809 S_IFxxx is not a bitmask but our programmers don't know
Diffstat (limited to 'usr/src/tools/cscope-fast')
-rw-r--r--usr/src/tools/cscope-fast/dir.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/tools/cscope-fast/dir.c b/usr/src/tools/cscope-fast/dir.c
index d1c463293a..8d12ba56c0 100644
--- a/usr/src/tools/cscope-fast/dir.c
+++ b/usr/src/tools/cscope-fast/dir.c
@@ -24,8 +24,8 @@
/*
- * Copyright (c) 1999 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -86,7 +86,7 @@ sourcedir(char *dirlist)
* view path node)
*/
if (stat(compath(dir), &statstruct) == 0 &&
- (statstruct.st_mode & S_IFDIR)) {
+ S_ISDIR(statstruct.st_mode)) {
if (srcdirs == NULL) {
srcdirs = mymalloc(msrcdirs * sizeof (char *));
} else if (nsrcdirs == msrcdirs) {
@@ -120,7 +120,7 @@ includedir(char *dirlist)
* view path node)
*/
if (stat(compath(dir), &statstruct) == 0 &&
- (statstruct.st_mode & S_IFDIR)) {
+ S_ISDIR(statstruct.st_mode)) {
if (incdirs == NULL) {
incdirs = mymalloc(mincdirs * sizeof (char *));
} else if (nincdirs == mincdirs) {
@@ -253,7 +253,7 @@ makefilelist(void)
/* make sure it is a directory */
if (stat(compath(dir), &statstruct) == 0 &&
- (statstruct.st_mode & S_IFDIR)) {
+ S_ISDIR(statstruct.st_mode)) {
getsrcfiles(dir, s);
}
}
@@ -330,7 +330,7 @@ issrcfile(char *file)
* suffixes so make sure it is a file
*/
if (vpstat(file, &statstruct) == 0 &&
- (statstruct.st_mode & S_IFREG)) {
+ S_ISREG(statstruct.st_mode)) {
return (YES);
}
}