MinGW patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: MinGW patch
Date: 2003-09-07 03:41:47
Message-ID: 200309070341.h873fmB13893@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin pgsql-hackers-win32 pgsql-patches

I have applied the following patch to allow MinGW to again work on CVS.

THe patch makes the following changes:

o allow configure to see include/port/win32 include files
o add matching Win32 accept() prototype
o allow pg_id to compile with native Win32 API
o fix invalide mbvalidate() function calls (existing bug)
o allow /scripts to compile with native Win32 API
o add win32.c to Win32 compiles (already in *.mak files)

Other Win32 compile platforms were going to need some of these fixes
anyway.

These changes allow the first client-level compiles on Win32 using our
existing Makefile system (no *.mak), and not using Cygwin. All
interfaces and client apps work except for pg_resetxlog (no fsync).

With these patches, psql works using CMD.EXE:

U:\>psql -h 172.20.0.1 -U postgres test
Welcome to psql 7.4beta2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

test=# select * from pg_language;
lanname | lanispl | lanpltrusted | lanplcallfoid | lanvalidator | lanacl

----------+---------+--------------+---------------+--------------+---------------
internal | f | f | 0 | 2246 |
c | f | f | 0 | 2247 |
sql | f | t | 0 | 2248 | {=U/postgres}
(3 rows)

test=#

The backend still does not link.

The MinGW command console seems to have some problems with flushing
output to the screen (no prompt, no errors display), but the same binary
runs fine in CMD.EXE. We can look at that later.

I will update the WIN32 branch to match current CVS so all the Win32
fixes will be in that branch.

--
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

Attachment Content-Type Size
unknown_filename text/plain 18.6 KB

Responses

Browse pgsql-cygwin by date

  From Date Subject
Next Message Tom Lane 2003-09-07 04:05:28 Re: [PATCHES] MinGW patch
Previous Message Richard Sydney-Smith 2003-09-06 15:20:32 pOSTGRESSQL dATABASE FILE SIZES

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2003-09-07 04:05:28 Re: [PATCHES] MinGW patch
Previous Message Darko Prenosil 2003-09-06 10:12:25 Re: Fw: For the start

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-09-07 04:05:28 Re: [PATCHES] MinGW patch
Previous Message Tom Lane 2003-09-06 16:52:13 Re: [PATCHES] Warning for missing createlang