lwip-devel
[Top][All Lists]
Advanced

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

RE: [lwip-devel] opt.h - LWIP_EVENT_API


From: Kieran Mansley
Subject: RE: [lwip-devel] opt.h - LWIP_EVENT_API
Date: Mon, 06 Dec 2010 15:52:30 +0000

On Mon, 2010-12-06 at 10:28 -0500, Bill Auerbach wrote:
> without defining LWIP_EVENT_API it will potentially redefine
> LWIP_CALLBACK_API generating a compiler warning or error.  This is the
> case with the current code as well.  To be thorough we can #undef
> LWIP_CALLBACK_API before the #define of it.

I don't like that.  How about

#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API)
#define LWIP_EVENT_API 0
#define LWIP_CALLBACK_API 1
#endif

(or the other way around, I'm not sure which is the most sensible
default)

otherwise we leave it up to the user to define a consistent pair, or
define just one of them, and check that exactly one of them is 1 in the
compile time assertions.

Kieran




reply via email to

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