emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs vista build failures


From: David Kastrup
Subject: Re: Emacs vista build failures
Date: Tue, 22 Jul 2008 15:24:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: David Kastrup <address@hidden>
>> Cc: Johannes Weiner <address@hidden>,  address@hidden
>> Date: Tue, 22 Jul 2008 01:11:26 +0200
>> 
>> There is no reliable way to quote stuff you want to pass into a "system"
>> call.
>
> Of course, there is.  Assuming you know what shell will interpret the
> arguments, that is.

Yes, since COMMAND.COM and CMD.EXE behave quite differently, and also
differently on different versions of Windows.

So tell me: How to you quote the word (written as Lisp string) 
"\"goof\" " to the typical Windows shell?

>> In fact, it is not even guaranteed that calling "exec" will not mesh
>> up arguments or add or remove quoting.
>
> `exec' is not a Windows system call.  Squeezing one OS into emulation
> of another should be expected to be problematic.
>
>> There are consequences: for example, call-process and its ilk don't work
>> reliably.  You can't expect the arguments given to them to actually make
>> it unmolested to the argc/argv of the called program's "main".
>
> Only because the surrounding code expects a Posix-compliant set of
> functions and syscalls.  It was not written with portability in mind
> from the ground up.

I often doubt it was written with anything in mind.  As it stands, it is
a half-baked pseudo-Posix wrappery about CP/M calling conventions.

When looking at design and implementation of first DOS and later
Windows, I often had the feeling "this is so stupid and braindead that I
can hardly believe it".  With UNIX, the feeling was more often "I wish I
would have thought of that".

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]