Win32 path patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Win32 path patch
Date: 2003-04-02 20:15:59
Message-ID: 200304022015.h32KFxR06550@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Here is my first patch toward the native Win32 port. It is taken from
PeerDirect/Jan's Win32 port, with reference to SRA's port.

The patch deals with file path separators '/' vs '\' (Win32 supports
both in C), and Win32 drive letter handling.

The patch is 700 lines, but adds only two WIN32's to the code. The
majority of the work is done in port/path.c. While /port was for
port-specific stuff, in this case, it seems like the best place to put
functions that are used by both the backend and interfaces/clients.

I just hope my other patches are as clean as this one. :-)

Here is a rough outline of the major Win32 item needed:

*file path separators
*root directory
handle \r in COPY
copydir for cp -r
rmdir not recursive for rm -r
rename atomicity
shared memory could map to new address in exec child
compatibility defines
spinlock changes
DWORD in help.c
initdb
fork/exec

--
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 21.1 KB
unknown_filename text/plain 1.7 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-04-03 05:33:33 system() patch for Win32
Previous Message Joe Conway 2003-04-01 23:42:45 Re: array support patch phase 1 patch