octave-maintainers
[Top][All Lists]
Advanced

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

Re: MXE win32 errors "'WIFEXITED' was not declared in this scope"


From: Philip Nienhuis
Subject: Re: MXE win32 errors "'WIFEXITED' was not declared in this scope"
Date: Thu, 26 Jun 2014 11:36:57 -0700 (PDT)

Mike Miller wrote
> On Thu, Jun 26, 2014 at 16:07:06 +0200, Andreas Weber wrote:
>> On 25.06.2014 20:11, Philip Nienhuis wrote:
>>> When trying to build octave-4.1.0+ for windows (MXE-cross-build) I get
>>> error
>>> messages related to mkoctfile, apparently due to changeset 5b7b18d603ae
>>> 'mkoctfile.in.cc: fix return value if subprocess fails (bug #42549).':
>>>
>>> mkoctfile.cc:348:24: error 'WIFEXITED' was not declared in this scope
>>> mkoctfile.cc:349:33: error 'WEXITSTATUS' was not declared in this scope
>>>
>>> Where are these identifiers (macros) declared for win32 systems?
>>
>> After searching I think they are not defined for win32 and system just
>> returns the return value of the command interpreter or -1 on error
>>
>> (from
>> http://msdn.microsoft.com/en-us/library/277bwbdz%28v=VS.100%29.aspx)
>>
>> and I suggest
>>
>> diff -r 47d4b680d0e0 src/mkoctfile.in.cc
>> --- a/src/mkoctfile.in.cc       Fri Jun 20 18:55:38 2014 -0400
>> +++ b/src/mkoctfile.in.cc       Thu Jun 26 16:01:55 2014 +0200
>> @@ -345,8 +345,10 @@
>>    if (debug)
>>      std::cout << cmd << std::endl;
>>    int result = system (cmd.c_str ());
>> +#ifndef __WIN32__
>>    if (WIFEXITED (result))
>>      result = WEXITSTATUS (result);
>> +#endif
>>    return result;
>>  }
> 
> See src/main.in.cc where these macros are already in use and similarly
> conditioned. Should perhaps be
> 
>   #if ! defined (__WIN32__) || defined (__CYGWIN__)
> 
> -- 
> mike

Isn't main.cc compiled as the very last module? i.e., long after WEXITSTATUS
etc. was needed by modules compiled earlier on?

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/MXE-win32-errors-WIFEXITED-was-not-declared-in-this-scope-tp4665058p4665086.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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