X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fglob.c;h=fddd02d1e954f6db2b2994cfdc9f18adc0a50dea;hb=e6f2518067b058e204ed70679dcf1eaafd32325e;hp=03b55df28da1356b72fd97407f87c83b09b5933a;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/lib/glob.c b/lib/glob.c index 03b55df28..fddd02d1e 100644 --- a/lib/glob.c +++ b/lib/glob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2010 Free Software Foundation, Inc. +/* Copyright (C) 1991-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -145,10 +145,8 @@ # define __stat64(fname, buf) stat (fname, buf) # define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag) # define struct_stat64 struct stat -# define __stat(fname, buf) stat (fname, buf) # define __alloca alloca # define __readdir readdir -# define __readdir64 readdir64 # define __glob_pattern_p glob_pattern_p #endif /* _LIBC */ @@ -1282,6 +1280,8 @@ link_exists_p (int dfd, const char *dir, size_t dirlen, const char *fname, return link_exists2_p (dir, dirlen, fname, pglob); else { + /* dfd cannot be -1 here, because dirfd never returns -1 on + glibc, or on hosts that have fstatat. */ struct_stat64 st64; return __fxstatat64 (_STAT_VER, dfd, fname, &st64, 0) == 0; }