>> Date: Mon, 23 Apr 2007 07:45:03 -0700 (PDT) >> From: Aaron Shatters <[EMAIL PROTECTED]> >> Cc: [email protected] >> >> >> Date: Fri, 20 Apr 2007 13:53:31 -0700 (PDT) >> >> From: Aaron Shatters <[EMAIL PROTECTED]> >> >> >> >> What was the reason for rehashing the directory contents for windows if >> >> the file was not found in the directory cache and the directory has been >> >> modified... but not on any other platforms? >> > >> >Could you please point to the code fragment(s) where you see this >> >difference? >> >> In dir.c --> >> >> if (dir->dirstream == 0) >> { >> #ifdef WINDOWS32 >> /* >> * Check to see if directory has changed since last read. FAT >> * filesystems force a rehash always as mtime does not change >> * on directories (ugh!). >> */ >> if (dir->path_key) >> { >> if ((dir->fs_flags & FS_FAT) != 0) >> { >> dir->mtime = time ((time_t *) 0); >> rehash = 1; >> } >> else if (stat(dir->path_key, &st) == 0 && st.st_mtime > dir->mtime) >> { >> /* reset date stamp to show most recent re-process. */ >> dir->mtime = st.st_mtime; >> rehash = 1; >> } >> /* If it has been already read in, all done. */ >> if (!rehash) >> return 0; >> /* make sure directory can still be opened; if not return. */ >> dir->dirstream = opendir(dir->path_key); >> if (!dir->dirstream) >> return 0; >> } >> else >> #endif > vThis fragment handles the problem that inode emulation on Windows >filesystems are not reliable. It replaces the inode check by >`stat'ing the directory whose normalized file name is stored in >dir->path_key. > >Does this code really get run when you invoke $wildcard, and why?
Yes, it does. "func_wildcard" calls "string_glob". "string_glob" calls "file_exists_p". "file_exists_p" calls "dir_file_exists_p". "dir_file_exists_p" calls "dir_contents_file_exists_p"... and there you have it. The code above gets run if the $(wildcard...) argument doesn't contain any wildcard characters (for example: file.o), and the file did not exist when the directory contents was cached. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Make-w32 mailing list [email protected] http://lists.gnu.org/mailman/listinfo/make-w32
