Lists: | pgsql-hackers |
---|
From: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_config.h.win32 |
Date: | 2001-11-23 01:39:12 |
Message-ID: | 3BFDA8C0.D0B376E@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi
I examined multibyte psql.exe and libpq.dll Yesterday
according to the bug report from Hiroshi Saito.
At first the compilation didn't work at all and I found
the following in src/win32.mak though it's irrelevant to
the bug report.
ALL:
cd include
if not exist pg_config.h copy pg_config.h.win32 pg_config.h
Currently I'm working under cygwin environment mainly and
the above script doesn't work well after the configure of
cygwin (un??)fortunately. It's pretty painful and risky to
change pg_config.h.win32 and the original pg_config.h.
How about including pg_config.h.win32 in pg_config.h e.g.
#ifdef WIN32
#include "pg_config.h.win32"
#else
.
.
?
Comments ?
regards,
Hiroshi Inoue
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_config.h.win32 |
Date: | 2001-11-23 02:13:41 |
Message-ID: | 2894.1006481621@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> It's pretty painful and risky to
> change pg_config.h.win32 and the original pg_config.h.
> How about including pg_config.h.win32 in pg_config.h e.g.
What? I thought pg_config.h.win32 was a substitute pg_config.h
to use for native-windows builds (where you can't run autoconf).
Under cygwin I think you should just run configure and expect it
to produce a correct pg_config.h by itself. If it doesn't, we
need to fix the configure script.
regards, tom lane
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_config.h.win32 |
Date: | 2001-11-23 02:38:04 |
Message-ID: | 3079.1006483084@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> Must I double the source tree for cygwin and native
> Windows ? I'm using the common source tree for ODBC
> and there's no problem for compilation.
What? I don't quite follow what the problem is.
regards, tom lane
From: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_config.h.win32 |
Date: | 2001-11-23 02:38:43 |
Message-ID: | 3BFDB6B3.4C92A6D1@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
>
> Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> > It's pretty painful and risky to
> > change pg_config.h.win32 and the original pg_config.h.
> > How about including pg_config.h.win32 in pg_config.h e.g.
>
> What? I thought pg_config.h.win32 was a substitute pg_config.h
> to use for native-windows builds (where you can't run autoconf).
> Under cygwin I think you should just run configure and expect it
> to produce a correct pg_config.h by itself. If it doesn't, we
> need to fix the configure script.
Must I double the source tree for cygwin and native
Windows ? I'm using the common source tree for ODBC
and there's no problem for compilation. It seems
pretty absurd to have the whole source tree only
for native-windows clients but it's pretty annoying
to download only necessary files.
regards,
Hiroshi Inoue
From: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_config.h.win32 |
Date: | 2001-11-23 02:48:28 |
Message-ID: | 3BFDB8FC.EF8298FC@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
>
> Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> > Must I double the source tree for cygwin and native
> > Windows ? I'm using the common source tree for ODBC
> > and there's no problem for compilation.
>
> What? I don't quite follow what the problem is.
pg_config.h generated under cygwin doesn't fit
in with native-windows. Of cource pg_config.h.win32
doesn't fit in with cygwin either.
regards,
Hiroshi Inoue
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_config.h.win32 |
Date: | 2001-11-23 02:53:04 |
Message-ID: | 3157.1006483984@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> pg_config.h generated under cygwin doesn't fit
> in with native-windows. Of cource pg_config.h.win32
> doesn't fit in with cygwin either.
Should it? I'm quite content to regard them as separate platforms.
I don't expect LinuxPPC and Mac OSX to share a pg_config.h, even
though I run them on the same box.
I'm also not seeing why #including one file in the other would make
that problem better?
regards, tom lane
From: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_config.h.win32 |
Date: | 2001-11-23 04:15:04 |
Message-ID: | 3BFDCD48.E9787C2C@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
>
> Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> > pg_config.h generated under cygwin doesn't fit
> > in with native-windows. Of cource pg_config.h.win32
> > doesn't fit in with cygwin either.
>
> Should it? I'm quite content to regard them as separate platforms.
> I don't expect LinuxPPC and Mac OSX to share a pg_config.h, even
> though I run them on the same box.
Yes but the current native-windows stuff doesn't seem
valuable to keep a separate source tree.
>
> I'm also not seeing why #including one file in the other would make
> that problem better?
??? I'm changing my pg_config.h locally in reality
like as follows.
#ifdef WIN32
#include "pg_config.h.win32"
#else
.
. (the original content of pg_config.h)
.
#endif /* WIN32 */
There's no problem to compile under both cygwin
and native-windows. It's much safer than replacing
pg_config.h.win32 and the original pg_config.h each
time.
regards,
Hiroshi Inoue
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_config.h.win32 |
Date: | 2001-11-23 19:34:59 |
Message-ID: | 9744.1006544099@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> Tom Lane wrote:
>> I'm also not seeing why #including one file in the other would make
>> that problem better?
> ??? I'm changing my pg_config.h locally in reality
> like as follows.
> #ifdef WIN32
> #include "pg_config.h.win32"
> #else
> .
> . (the original content of pg_config.h)
> .
> #endif /* WIN32 */
Hmm. This would only help if you'd successfully run configure (so that
pg_config.h has been created from pg_config.h.in) and then you wanted to
use that same source tree to compile for native Windows, *without* doing
a "make distclean" which is normally considered a required step before
using a source tree to build for a different platform.
That seems like an ugly way to proceed. Even if it works today, I would
not want to make a commitment that it will continue to work in future.
I'd rather not uglify pg_config.h.in for all platforms in service of
a one-platform-pair hack that I'd call unsupported anyway...
Out of curiosity, how much difference is there between pg_config.h built
on Cygwin/Windows and pg_config.h.win32? Obviously the one is a lot
bigger, but if you simply used the Cygwin pg_config.h to build the stuff
that works on native Windows, how far is it from working?
regards, tom lane
From: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_config.h.win32 |
Date: | 2001-11-26 00:25:14 |
Message-ID: | 3C018BE9.288F3971@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
>
> Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> > Tom Lane wrote:
> >> I'm also not seeing why #including one file in the other would make
> >> that problem better?
>
> > ??? I'm changing my pg_config.h locally in reality
> > like as follows.
>
> > #ifdef WIN32
> > #include "pg_config.h.win32"
> > #else
> > .
> > . (the original content of pg_config.h)
> > .
> > #endif /* WIN32 */
>
> Hmm. This would only help if you'd successfully run configure (so that
> pg_config.h has been created from pg_config.h.in) and then you wanted to
> use that same source tree to compile for native Windows, *without* doing
> a "make distclean" which is normally considered a required step before
> using a source tree to build for a different platform.
>
> That seems like an ugly way to proceed. Even if it works today, I would
> not want to make a commitment that it will continue to work in future.
> I'd rather not uglify pg_config.h.in for all platforms in service of
> a one-platform-pair hack that I'd call unsupported anyway...
I see. I'm not responsible for libpq.dll and psql.exe anyway.
Someone would check it as before.
regards,
Hiroshi Inoue