X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fglob.c;h=85419ccfaea8619a1b60f054cc890fefc848ca21;hb=2d540c2cb293bff09a2fe1b1bab9d1775d7e2832;hp=7f0c733255dc2f7b9d045b91a684fac7004450df;hpb=6948250861edce048d7bb3c6b47d13fa3649905e;p=gnulib.git diff --git a/lib/glob.c b/lib/glob.c index 7f0c73325..85419ccfa 100644 --- a/lib/glob.c +++ b/lib/glob.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 - 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 @@ -1283,6 +1282,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; }