Re: MinGW patch - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: MinGW patch
Date
Msg-id 200309071540.h87FeEe05623@candle.pha.pa.us
Whole thread Raw
In response to Re: MinGW patch  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: MinGW patch  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> In mbprint.c:
>
> + #ifndef PGSCRIPTS
> + #include "settings.h"
> + #endif
>
> Why is this needed, considering that the rest of the code was not changed
> to make use of any setting?  The print modules in psql should not make use
> of psql-specific settings.  That's why there are extensive separate
> structures to pass this information.

The problem is that mbvalidate() has this code:

        if (GetVariableBool(pset.vars, "WIN32_CONSOLE"))
            CharToOem(pwcs, pwcs);

That's why I needed the #ifdef so it only tests from psql.  This code
was just broken without that test, and because no one else has done
Win32 compiles since it was added, no one saw it.

> Also, I'm beginning to feel that there are too many places where the lack
> of getpwuid() is being worked around.  That needs to be centralized.

Yep.  Let me add that to my list for 7.5.

> Lastly, since there is not going to be a Windows port in 7.4, why was this
> committed to the head branch?

Yes, I knew someone would ask, and debated it myself.  Having these
patches in 7.4 allows us to have full-functional interfaces and client
binaries for MinGW.  This allows us to show progress on the Win32 port,
and for folks to start using MinGW in client applications.  Also, many
of these fixes will be needed for Cygwin and other Win32 platforms, so
it seemed best to fix them in head and just patch them back to the WIN32
branch.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: MinGW patch
Next
From: Bruce Momjian
Date:
Subject: Re: MinGW patch