On 11/07/13 23:02, Konstantin Gorskov wrote:
> Hi! When I compile application with mingw under msys, I get:
> Storage size of "some_struct" isn't know;
> The culprit is :
> struct sigaction xcpu_action;
A facet of the POSIX process signals API, which is not supported on
MS-Windows, (and hence, not supported by MinGW).
> I've traced some google info about it, like here:
This is relevant to Debian (Linux), and possibly other Linux distros; it
has zero relevance for MS-Windows, for which MSDN is the definitive
> Seems like it has something to do with c99?
Nope. It's not a feature of ISO-C, at any level; it's POSIX.
> Also, I've tried following some googled suggestions like:
> make --ansi
Don't know where you got this from; it's an invalid command, not just
for MinGW/MS-Windows, but on the POSIX systems too, so ...
> but mingw can't recognize this command.
... naturally; no other system in common use would recognize it either.
> Any idea what should I do? Application I'm trying to compile is rather old,
> probably that is why I've stumbled upon this odd problem.
You need to port the application, so that it no longer relies on POSIX
APIs, which are unsupported on your host platform -- MS-Windows in this
case, so you need to identify suitable alternatives, as documented on MSDN.
> Google also adviced that root of the problem is that, for some reason, '
> bits/sigaction.h ' is not included (has something to do
> with ANSI), but I couldn't figure out what should I do.
Nope. The root of the problem is a naive expectation that a program
written for a POSIX system can be compiled and run on a host which does
not support, nor claim to support POSIX features, without (possibly
significant) modification. If that's too much for you, you might
consider cygwin, (for POSIX emulation on MS-Windows), or move to any of
the GNU/Linux hosts, which are natively POSIX.