schmorp at schmorp.de
Fri Mar 20 20:09:50 CET 2015
On Fri, Mar 20, 2015 at 02:28:02PM -0400, Jamal Hadi Salim <jhs at mojatatu.com> wrote:
> clang with c11 enforcement (clang -Wall -g -O -std=c11) pukes on:
Can you tell us more about your environment, e.g. do you embed libev, do
you use the standalone version, does it compile without specifying extra
flags, how do you configure it etc.?
From what I see so far, I can only say that libev is not written in c11
(c11 doesn't support file descriptors, event handling etc., so libev can't
be written in c11, it needs platform-specific extensions, for example
POSIX, but POSIX would be a bad choice on most platforms).
I can't find a good description of what -std=c11 really does in the clang
docs, but since libev doesn't select "c11 enforcement" mode itself, this
looks like a user error - when you specify compiler flags, you have to
select the correct compilation environment, and c11 simply isn't good
As such, failure is to be expected, and correct, i.e. it's a configuration
> It is trivial to pick one of the above and #define in ev.c but i dont
> want to diverge on a private tree.
> Is there some compile option perhaps i should be passing to make this go
Have you tried simply compiling in default mode for clang (i.e. no
-std=c11)? That would probably fix it. Most likely, this problem is simply
caused by -std=c11, as that likely tries to go into strict c11 mode, which
is not enough to support libev (or any code trying to use it).
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
More information about the libev