Re: pg_config --pgxs on Win32 - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: pg_config --pgxs on Win32
Date
Msg-id 20051013200645.GE6080@svana.org
Whole thread Raw
In response to Re: pg_config --pgxs on Win32  ("Dave Page" <dpage@vale-housing.co.uk>)
Responses Re: pg_config --pgxs on Win32
List pgsql-hackers
On Thu, Oct 13, 2005 at 08:36:39PM +0100, Dave Page wrote:
> When we first discussed this I posted a very simple example 'cd /'
> which does absolutely nothing unlike 'cd \' or 'cd \\' which work as
> expected, quite possibly for the reason you suggest. Although the /
> is accepted, I don't believe it can be called reliable as it
> obviously doesn't work in all situations.

Indeed, what you are seeing there is cmd.exe (or whatever it's called)
command-line parsing. The same issue applies to any builtin commands
such as echo. Once you start executing external commands, they are
responsible for their own command-line parsing.

So, we need examples of other programs that behave differently when
given complete paths with forward slashes (such as c:/windows/system).
For example, the Visual C++ compiler explicitly states it takes
filenames with either forward or backslashes. Commands built into
cmd.exe tend to be strange in this way, although programs ported from
UNIX will probably work fine.

I don't see an easy way out. Half the system thinks backslashes are
special and need expansion, the other half thinks forward slashes are
option markers. This is really just a variation on the "space in
filenames" issue in UNIX.

Unfortunatly, Windows never had a getopt and so there is no standard
way of dealing with options. Every program does it differently. For
example, there is no "end of options" marker, which is how you would
deal with this issue in UNIX.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Robert Creager
Date:
Subject: Re: auto vacuum lock on 8.1beta1
Next
From: Bruce Momjian
Date:
Subject: Re: Bug 1473, pthread python on FreeBSD