On Sun, Sep 28, 2008 at 11:10:48AM +0200, Johannes Sixt wrote: > On Samstag, 27. September 2008, Dmitry Potapov wrote: > > win32_to_errno was the first thing that implemented but then released > > that translation of Win32 errors to errno cannot be in general case. > > For instance, ERROR_BUFFER_OVERFLOW means ENAMETOOLONG here, but it > > can be translated to ETOOSMALL in other cases. How do you propose to > > deal with that? > > We deal with that when the need arises, in an evolutionary manner. The first > step is to *have* an error code translation routine. Step to what? IMHO, the idea of win32_to_errno is deeply flawed, and, in any case, refactoring handling of Win32 error in MinGW is not the purpose of my series. If you want to introduce win32_to_errno in mingw, you can send your own patch to that effect, and we can discuss that separately. So far, I am not convinced that it will improve anything in the existing code. As to avoiding duplication of Win32 specific code, get_file_attr() fits better. So, let's proceed step-wise, and first finish one thing, namely, speed-up of Cygwin version of Git and then discuss adding win32_to_errno to MinGW. Dmitry -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html