bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Gawk compile error Mingw32


From: Vincent Belaïche
Subject: Re: [bug-gawk] Gawk compile error Mingw32
Date: Wed, 21 Dec 2016 17:13:45 +0100

Hello Eli,

Sorry to dwell on it again. Not sure whether this is a problem or not:

--8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
 $ c:/Users/Vincent/Downloads/gawk-4.1.4-w32-bin/bin/gawk.exe 'END{exit(-1);}' 
dummy_file.txt; echo $?
-| 0
 $ c:/Users/Vincent/Downloads/gawk-4.1.4-w32-bin/bin/gawk.exe 'END{exit(1);}' 
dummy_file.txt; echo $?
-| 1
 $ /bin/gawk-3.1.7.exe 'END{exit(-1);}' dummy_file.txt; echo $?
-| 255
 $ /bin/gawk-3.1.7.exe 'END{exit(1);}' dummy_file.txt; echo $?
-| 1
--8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----

Eli's port gawk.exe version 4.1.4 give exit status 0 when meeting

--8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
END{ exit(-1); }
--8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----

while MSYS gawk version 3.1.7 gives 255 in that case.

OK, this is *not* a bug because info node "(gawk) Exit Statement" says:

     NOTE: For full portability, exit values should be between zero and
     126, inclusive.  Negative values, and values of 127 or greater, may
     not produce consistent results across different operating systems.

Not consistent, meaning that you won't have the same thing in all
systems if you are outside [0 126] is one thing I definitely can buy,
however, I tend to think that it is a bit strange to exit a zero value
when exit is called with a non-zero argument the 8 least significant
bits of which comprising at least one non zero bit. Maybe there should
be some test whether the exit value is outside the standard range [0
126] and exit some non-zero reserved value in that case.

VBR,
        Vincent Belaïche

Le 27/10/2016 à 17:29, Eli Zaretskii a écrit :
>> From: address@hidden (Vincent Belaïche)
>> Cc: Vincent Belaïche <address@hidden>,
>>  address@hidden, address@hidden
>> Date: Thu, 27 Oct 2016 14:38:40 +0200
>>
>>> Can you use the MinGW binary that Eli builds?  Do you have to
>>> compile gawk yourself?  (See https://sourceforge.net/projects/ezwinports/)
>>>
>>
>> No, I don't have to compile gawk myself, I would be quite happy to have
>> a binary. I have downloaded Eli's gawk binary, but it is a native MSW
>> application, not an MSYS application.
>
> If you are after an MSYS build of Gawk, you are in the wrong place:
> that build is not officially supported by the Gawk developers.  You
> could probably find a newer MSYS Gawk in the MSYS2 project, but that
> would require you to switch your entire MSYS installation to MSYS2, as
> they are not really compatible.


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus




reply via email to

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