diff options
author | tsi <tsi> | 2006-05-16 14:57:08 +0000 |
---|---|---|
committer | tsi <tsi> | 2006-05-16 14:57:08 +0000 |
commit | 18364d6df4a369440577d78b3c0932bdb840f793 (patch) | |
tree | 3adb0c5537c29e05ac55bf5b6d25675d8c180255 /lib | |
parent | 9305ea57aa170aed8c736b45402078a56ecba9f7 (diff) |
7. Merge in OpenBSD's lndir back in. (An audit for "misused" functions of
the entire tree to be done later.) (Marc La France).
6. Fix misuse of S_IF* stat(2) macros throughout the source tree
(Modeled after X.Org bugzilla #5003).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/X11/XKBCvt.c | 4 | ||||
-rw-r--r-- | lib/Xt/Intrinsic.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/X11/XKBCvt.c b/lib/X11/XKBCvt.c index 4f4ee741d..60907c1a8 100644 --- a/lib/X11/XKBCvt.c +++ b/lib/X11/XKBCvt.c @@ -25,7 +25,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.35 2003/11/17 22:20:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.36tsi Exp $ */ #include <stdio.h> #include <sys/types.h> @@ -270,7 +270,7 @@ _XkbGetCharset() #else char *cf = __XOS2RedirRoot(CHARSET_FILE); #endif - if ( (stat(cf,&sbuf)==0) && (sbuf.st_mode&S_IFREG) && + if ( (stat(cf,&sbuf)==0) && ((sbuf.st_mode&S_IFMT) == S_IFREG) && (file = fopen(cf,"r")) ) { tmp = _XkbAlloc(sbuf.st_size+1); if (tmp!=NULL) { diff --git a/lib/Xt/Intrinsic.c b/lib/Xt/Intrinsic.c index 06a425928..0318a81f0 100644 --- a/lib/Xt/Intrinsic.c +++ b/lib/Xt/Intrinsic.c @@ -30,7 +30,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.25 2005/11/13 21:25:00 dickey Exp $ */ +/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.26tsi Exp $ */ /* @@ -949,7 +949,7 @@ static Boolean TestFile( #ifndef X_NOT_POSIX S_ISDIR(status.st_mode) == 0); /* not a directory */ #else - (status.st_mode & S_IFDIR) == 0); /* not a directory */ + (status.st_mode & S_IFMT) != S_IFDIR); /* not a directory */ #endif /* X_NOT_POSIX else */ #if defined(WIN32) XtStackFree ((XtPointer)bufp, buf); |