[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] redefining LWIP_PLATFORM_DIAG(x)
From: |
Sylvain Rochet |
Subject: |
Re: [lwip-users] redefining LWIP_PLATFORM_DIAG(x) |
Date: |
Mon, 24 Jun 2013 18:55:55 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Joe,
On Tue, Jun 25, 2013 at 12:49:31AM +1000, Joe Bloggs84 wrote:
> Hi All,
>
> I am interested in whether there is already a way to do this and I
> am missing something or whether a change like I am proposing would
> be useful to others.
>
> cc.h defines LWIP_PLATFORM_DIAG(x)
> as
> #define LWIP_PLATFORM_DIAG(x) printf x;
>
> I have a situation where I have to call a function other than printf
> for any diagnostic output (to support logging).
>
> So I had to modify cc.h and now I have to keep making the patch each
> time I jump to a new version of lwip.
>
> What about declaring LWIP_PLATFORM_DIAG and LWIP_PLATFORM_ASSERT
> only if they are not already declared.
>
> So something trivial like:
> #ifndef LWIP_PLATFORM_DIAG
> #define LWIP_PLATFORM_DIAG(x) printf x;
> #endif
>
> #ifndef LWIP_PLATFORM_ASSERT
> #define LWIP_PLATFORM_ASSERT(x) do { printf("Assertion \"%s\" failed
> at line %d in %s\n", \
> x, __LINE__, __FILE__);
> fflush(NULL); /* abort(); */ } while (0)
> #endif
>
> Or is there already a way of achieving this without having to patch
> the lwip source?
Humm... cc.h is part of your lwip port which is actually not, strictly
speaking, part of the lwip source.
Sylvain
signature.asc
Description: Digital signature
- Re: [lwip-users] ARP Request breaking Telnet traffic, (continued)
- Re: [lwip-users] ARP Request breaking Telnet traffic, Ueli Niederer, 2013/06/24
- Re: [lwip-users] ARP Request breaking Telnet traffic, Daniel, 2013/06/24
- Re: [lwip-users] ARP Request breaking Telnet traffic, Daniel, 2013/06/24
- Re: [lwip-users] ARP Request breaking Telnet traffic, Ueli Niederer, 2013/06/24
- Re: [lwip-users] ARP Request breaking Telnet traffic, Daniel, 2013/06/24
- [lwip-users] redefining LWIP_PLATFORM_DIAG(x), Joe Bloggs84, 2013/06/24
- Re: [lwip-users] redefining LWIP_PLATFORM_DIAG(x),
Sylvain Rochet <=
- Re: [lwip-users] redefining LWIP_PLATFORM_DIAG(x), address@hidden, 2013/06/24