On 02/23/2011 01:47 AM, Eli Zaretskii wrote in <http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg00995.html>:
An example of what could go wrong with these replacements can be seen in this excerpt from rpl_lstat: + /* This replacement file can blindly check against '/' rather than + using the ISSLASH macro, because all platforms with '\\' either + lack symlinks (mingw) or have working lstat (cygwin) and thus do + not compile this file. 0 len should have already been filtered + out above, with a failure return of ENOENT. */ + len = strlen (file); + if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) + return 0; The assumption stated in the comment is wrong for DJGPP v2.04, which is supported in the DOS build, where there's a working `symlink', but a backslash is a valid directory separator.
I assume that you meant "lstat" when you wrote "symlink". Come to think of it, I don't see a problem here, even if this code were executed under DOS in the proposed Emacs patch (which it's not). The code in question is exercised only on hosts where lstat exists but mishandles file names with trailing slashes, e.g., lstat ("FOO/", ...) incorrectly reports on FOO instead of on the directory that FOO points to. This doesn't apply to DJGPP v2.04, surely, so there could be no bug on DJGPP v2.04. I'll CC: this to bug-gnulib in case someone there is interested in this sort of thing.