Re: Suggestion for MSVC build

From: "Chuck McDevitt" <cmcdevitt(at)greenplum(dot)com>
To: "Chuck McDevitt" <cmcdevitt(at)greenplum(dot)com>, "Magnus Hagander" <magnus(at)hagander(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Suggestion for MSVC build
Date: 2007-09-24 18:08:01
Message-ID: EB48EBF3B239E948AC1E3F3780CF8F8802A1B3EF@MI8NYCMAIL02.Mi8.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Also, I think I told you the wrong file to link to. I think it is the
.a files, not the .lib files.
Let me check on that.

> -----Original Message-----
> From: Chuck McDevitt
> Sent: Monday, September 24, 2007 10:34 AM
> To: 'Magnus Hagander'
> Cc: pgsql-hackers(at)postgresql(dot)org
> Subject: RE: [HACKERS] Suggestion for MSVC build
>
> Sorry, completion_matches hasn't existed in readline for a long time.
>
> You need to define:
>
> #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
> #define HAVE_RL_COMPLETION_MATCHES 1
> #define HAVE_RL_FILENAME_COMPLETION_FUNCTION 1
>
> Just like we do on Linux.
>
>
> > -----Original Message-----
> > From: Magnus Hagander [mailto:magnus(at)hagander(dot)net]
> > Sent: Monday, September 24, 2007 1:30 AM
> > To: Chuck McDevitt
> > Cc: pgsql-hackers(at)postgresql(dot)org
> > Subject: Re: [HACKERS] Suggestion for MSVC build
> >
> > What version readline are you using?
> >
> > I tried with the latest download, and I get about 200 warnings like:
> > 1>.\src\bin\psql\tab-complete.c(600) : warning C4013:
> > 'completion_matches'
> > undef
> > ined; assuming extern returning int
> > 1>.\src\bin\psql\tab-complete.c(600) : warning C4047: '=' : 'char
**'
> > differs in
> > levels of indirection from 'int'
> >
> >
> > And also, 12 linker errors - pretty much all the readline stuff. A
> > quick
> > look at the files seem to show that the readline.lib and history.lib
> > files
> > that ship with gnuwin32 are empty of symbols. The .def files are
also
> > empty. Are yours different?
> >
> >
> > Also, do you know if this version of readline actually works on non-
> US
> > locales, or if it's still broken there? (I'd test it myself if I
> could
> > just
> > build it :-P)
> >
> > //Magnus
> >
> > On Sun, Sep 23, 2007 at 10:03:09PM -0400, Chuck McDevitt wrote:
> > > It seems like there isn't any good reason the perl scripts for the
> > MSVC
> > > build don't support readline
> > >
> > >
> > >
> > > Readline for windows is available as part of the GnuWin32 project.
> > >
> > >
> > >
> > > http://gnuwin32.sourceforge.net/packages/readline.htm
> > >
> > >
> > >
> > > It normally installs to "c:\Program Files\GnuWin32"
> > >
> > >
> > >
> > > I'd update the scripts myself, but I'm not a PERL programmer.
> > >
> > > From what I can see, you'd add another line to config.pl for
> > readline,
> > > and then add some stuff to mkvcbuild.pm for psql to do something
> > like:
> > >
> > >
> > >
> > > if ($solution->{options}->{readline})
> > >
> > > {
> > >
> > >
> > > $psql->AddIncludeDir($solution->{options}->{readline} .
> '\include');
> > >
> > >
> > > $psql->AddLibrary($solution->{options}->{readline} .
> > > '\lib\readline.lib');
> > >
> > >
> > > $psql->AddLibrary($solution->{options}->{readline} .
> > > '\lib\history.lib');
> > >
> > > }
> > >
> > >
> > >
> > > And something to solution.pm in the part that builds pg_config.h
> that
> > > looks something like:
> > >
> > >
> > >
> > > if ($self->{options}->{readline})
> > >
> > > {
> > >
> > > print O "#define
> > > HAVE_LIBREADLINE 1\n";
> > >
> > > print O "#define
> > > HAVE_READLINE_READLINE_H 1\n";
> > >
> > > print O "#define
> > > HAVE_READLINE_HISTORY_H 1\n";
> > >
> > > print O "#define
> > > USE_READLINE 1\n";
> > >
> > > print O "#define
> > > USE_READLINE_STATIC 1\n";
> > >
> > > }
> > >
> > > (Not sure about the last line).
> > >
> > >
> > >
> > > I don't know if this is a good idea, but I would think this would
> > make
> > > psql more "user-friendly" on windows.
> > >
> > >
> > >
> > > Perhaps someone who understands readline and perl better than me
> > might
> > > want to take this on?
> > >
> > >
> > >

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chuck McDevitt 2007-09-24 21:16:30 Re: Suggestion for MSVC build
Previous Message Joshua D. Drake 2007-09-24 17:55:40 Re: GUC variable renaming, redux