Bruno Haible <br...@clisp.org> writes: >> The relevant code is: >> >> /* Cannot create directory. */ >> errno = 0; >> ASSERT (func ("nonexist.ent/", O_CREAT | O_RDONLY, 0600) == -1); >> >> Open returns 3 for me, and it has created a file 'nonexist.ent'. > > This must be a bug in Wine, then. Please report it.
Yes, already done see my followup post and http://bugs.winehq.org/show_bug.cgi?id=21292 in particular. >> I see there is some code for this in lib/open.c, however it is not used >> because: >> >> /* Define to 1 if open() fails to recognize a trailing slash. */ >> /* #undef OPEN_TRAILING_SLASH_BUG */ >> >> Defining it makes the self-test work, which argues there is a bug in the >> open.m4 detection code, indeed it is not run at all for MinGW: >> >> case "$host_os" in >> mingw* | pw*) >> gl_REPLACE_OPEN >> ;; >> *) >> >> A simple fix to the problem is attached. > > Hmm, you and Paolo explained to me on 2009-08-21 that Wine should be > considered as a platform of its own. But I still don't fully agree. Can > you first report the bug to the Wine people and come back to patching > gnulib only if they are not fixing it within two months? We'll see what happens. For a rationale for supporting Wine as a separate platform, see my other post in this thread. >> I wonder if the code is correct for the 'pw*' system though, it will not >> trigger the trailing slash test on it. I don't know what pw* is, and >> can't test it, so I'll leave that to others. > > 'pw32' is Paul Sokolovsky's "POSIX over Win32" package [1], which was > developed in 2000-2001 and appears to be abandoned now [2]. Thanks for pointers. /Simon