Created attachment 64218 [details] [review] patch for rename bug on CIFS mounted shares. When a filesystem is mounted with 'smbfs', or as a shared folder in VirtualBox, and the filesystem host is a Windows system, 'makedepend' will fail when it tries to rename the target makefile. It's been recognized that this operation doesn't work, for there is conditional code to handle it when the target OS is WIN32, UNIXOS2, or CYGWIN. The problem is that if the program has opened the 'makefile', and has an active file descriptor to the file, the 'rename()' function won't work. A modest rewrite of the code will allow it to work for all OS's, and avoid the conditional code. The check for file exists can be made by handing the return from 'stat()' in the case when "-f" has specified the 'makefile'. Please see attached patch.
Thanks. I've tweaked the patch a little, so that if the file isn't readable we don't leave it under the backup name but move it back to the original name, and posted it to xorg-devel for review: http://patchwork.freedesktop.org/patch/12843/
Thanks, revised patch has been pushed to git master for the next release: http://cgit.freedesktop.org/xorg/util/makedepend/commit/?id=059e9be5a7321974b190d786d426b2ae27be8c56
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.