bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#19111: 25.0.50; 32 bits temacs.exe is linked with wrong image-base w


From: Dani Moncayo
Subject: bug#19111: 25.0.50; 32 bits temacs.exe is linked with wrong image-base when built on 64 bit Windows host
Date: Fri, 21 Nov 2014 17:06:30 +0100

>> >> +      t=${t#Target: }
>> >
>> > Is this portable to Unix shells?  If not, perhaps use the 'eval' trick
>> > here.
>>
>> This code is never meant to be executed on other than MSYS(2)/Cygwin.
>> Does the shell complain if an error is present inside an `if' that it
>> doesn't enter? In other words, does the shell perform syntactic checks
>> on code that it doesn't execute?
>
> It does, sometimes.

Someone reported an error related to parameter expansion:

   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18612

So, it seems that, on some (rare) systems, the shell may complain
about sentences which will not be actually executed.

But in the example above the error was related to parameter expansion
of the form "${var:n:m}", which is different from the parameter
expansion you've used ("${var#foo}"), and the latter seems to be more
portable, according to this test I've just made (on Cygwin):

$ a=hello dash -c 'echo ${a:0:1}'
dash: 1: Bad substitution
$ a=hello dash -c 'echo ${a#he}'
llo

So, I'd go ahead with the patch.  If someone complains, we can apply
the same fix: indirect execution of the offending sentence through
"eval".

-- 
Dani Moncayo





reply via email to

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