[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MXE win32 errors "'WIFEXITED' was not declared in this scope"
From: |
Andreas Weber |
Subject: |
Re: MXE win32 errors "'WIFEXITED' was not declared in this scope" |
Date: |
Thu, 26 Jun 2014 16:07:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 |
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;
}
-- Andy