lwip-members
[Top][All Lists]
Advanced

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

Re: [lwip-members] debug and assert


From: Kieran Mansley
Subject: Re: [lwip-members] debug and assert
Date: Thu, 6 Feb 2003 17:44:15 +0000 (GMT)

On Thu, 6 Feb 2003, Jani Monoses wrote:

> Hi I thought of adding LWIP_ prefixes to ASSERT and DEBUGF to avoid
> namespace clashes. Also to make debug.h platform independent have the
> archs define LWIP_PLATFORM_{DEBUGF,ASSERT} so no more stdio.h fflush()
> and abort() in generic code.

Sounds good, if it's causing a problem, that should fix it without any
difficulty.  I also have a companion to DEBUGF which is ERRORF.  It has
exactly the same syntax, but always results in output rather than
examining the flag.  This is useful if you just want a one off message to
appear rather than having to enable all the messages for that type, and
for when you want an error message regardless of the debug.h settings.
(ie. when it really is an error that is being reported, not just
information).

> Thinking about where these macros will be provided by platforms I think
> there are already too many header files per arch.I can think of a
> smaller and more managable organization if noone opposes changing the
> current layout.For instance having a separate header just for #define
> BYTE_ORDER is ridiculous.These are not headers exported to apps with
> well defined scope and interface; they are platform specific thingies
> and would better stay in one or two headers instead. lwip being small
> there's no problem with large compilation times due to including
> irrelevant data. a sys_arch.h file is no more than a couple of pages.
> thoughts?

I don't have any objections to that either.

Kieran





reply via email to

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