Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-cygwinpgsql-hackers-win32pgsql-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

Responses

pgsql-cygwin by date

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

pgsql-patches by date

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

pgsql-hackers-win32 by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group