git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/4] mingw: move common functionality to win32.h

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Sep 29, 2008, 18:37 UTC
Message-ID
<20080929183722.GJ21650@dpotapov.dyndns.org>
In-Reply-To
<200809281110.48256.johannes.sixt@telecom.at>
On Sun, Sep 28, 2008 at 11:10:48AM +0200, Johannes Sixt wrote:
Show 9 quoted lines
> 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
Previous: Johannes Sixt
Message 5 of 5 in “mingw: move common functionality to win32.h”
  1. 3/4 mingw: move common functionality to win32.hDmitry Potapov, Sep 27, 2008
  2. Johannes SixtSep 27, 2008
  3. Dmitry PotapovSep 27, 2008
  4. Johannes SixtSep 28, 2008
  5. Dmitry PotapovSep 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.