lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] How do I define the LWIP_PLATFORM_DIAG


From: narke
Subject: Re: [lwip-users] How do I define the LWIP_PLATFORM_DIAG
Date: Thu, 25 Aug 2011 09:48:40 +0800

On 25 August 2011 01:40, address@hidden <address@hidden> wrote:
> narke wrote:
>>
>> #define LWIP_PLATFORM_DIAG(message) do { printf(message); } while(0)
>
> Have you bothered looking at the example ports in contrib? Seems like I
> can't repeat often enough that these ports are meant to be an example for
> people creating new ports :-)
>
> Both the unix and the win32 ports use this (note there are no brackets
> around the parameter to printf - these are already included in the macro
> parameter):
>
> #define LWIP_PLATFORM_DIAG(x)    do {printf x;} while(0)
>
> Simon
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>

Simon & Andrew,

Thanks!  I did refer the unix port, but I am so careless to ignore the
non-brackets around the argument of the 'printf'.

Now it works fine!

-- 
Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

narke
public key at http://subkeys.pgp.net:11371 (address@hidden)



reply via email to

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