Re: win32 readline

Lists: pgsql-patches
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: win32 readline
Date: 2004-07-15 20:14:41
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE34BE7A@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Readline is pretty badly broken under mingw. Basically, it disables the
alt-gr key, which renders psql almost useless on most locales (no way to
type backslash, and a whole lot of other characters, for example).

This patch disables readline on win32. (meaning it's back to working the
way it did in <= 7.4, since msvc compiles have never supported readline)

The patch also contains two definitions for win32/port/security.c that
were for some reason not included when the rest of the win32-admin-check
patch was applied earlier, that I stumbled on while making this patch.

//Magnus

Attachment Content-Type Size
readline_win32.patch application/octet-stream 971 bytes

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: win32 readline
Date: 2004-07-20 20:36:40
Message-ID: 200407202036.i6KKaep22229@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Magnus Hagander wrote:
> Readline is pretty badly broken under mingw. Basically, it disables the
> alt-gr key, which renders psql almost useless on most locales (no way to
> type backslash, and a whole lot of other characters, for example).
>
> This patch disables readline on win32. (meaning it's back to working the
> way it did in <= 7.4, since msvc compiles have never supported readline)
>
>
>
> The patch also contains two definitions for win32/port/security.c that
> were for some reason not included when the rest of the win32-admin-check
> patch was applied earlier, that I stumbled on while making this patch.

I have added the following change to configure.in:

# readline on MinGW has problems with backslashes in psql and other bugs.
# This is particularly a problem with non-US code pages.
# Therefore disable its use until we understand the cause. 2004-07-20
case $host_os in mingw*)
if test "$with_readline" = yes; then
AC_MSG_WARN([*** Readline does not work on MinGW --- disabling])
with_readline=no
fi;;
esac

and will issue this warning during configure run:

configure: WARNING: *** Readline does not work on MinGW --- disabling

You can suppress this warning by running configure using
--without-readline. If we find a fix for this we can remove this code.

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


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: win32 readline
Date: 2004-07-20 21:44:33
Message-ID: 200407202344.33064.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Magnus Hagander wrote:
> Readline is pretty badly broken under mingw. Basically, it disables
> the alt-gr key, which renders psql almost useless on most locales (no
> way to type backslash, and a whole lot of other characters, for
> example).

I can't reproduce that. It works perfectly fine here.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Magnus Hagander <mha(at)sollentuna(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: win32 readline
Date: 2004-07-20 23:03:31
Message-ID: 200407202303.i6KN3VY15966@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Peter Eisentraut wrote:
> Magnus Hagander wrote:
> > Readline is pretty badly broken under mingw. Basically, it disables
> > the alt-gr key, which renders psql almost useless on most locales (no
> > way to type backslash, and a whole lot of other characters, for
> > example).
>
> I can't reproduce that. It works perfectly fine here.

Peter, I have received multiple reports that psql readline doesn't work
on MinGW. Can you get together with Magnus and others to find out why
you aren't seeing the failure and they are. What code page are you
using for testing?

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


From: Mark Kirkwood <markir(at)coretech(dot)co(dot)nz>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Magnus Hagander <mha(at)sollentuna(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: win32 readline
Date: 2004-07-20 23:17:31
Message-ID: 40FDA80B.7020606@coretech.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

To add to the confusion it works for me as well - Windows 2003 with
Mingw 3.1.0

Peter Eisentraut wrote:

>Magnus Hagander wrote:
>
>
>>Readline is pretty badly broken under mingw. Basically, it disables
>>the alt-gr key, which renders psql almost useless on most locales (no
>>way to type backslash, and a whole lot of other characters, for
>>example).
>>
>>
>
>I can't reproduce that. It works perfectly fine here.
>
>
>