lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] htons VS HTONS (Fw: MALLOC vs. malloc: maybe use __builtin


From: Leon Woestenberg
Subject: [lwip-users] htons VS HTONS (Fw: MALLOC vs. malloc: maybe use __builtin_constant_p?)
Date: Tue, 8 Apr 2003 09:20:03 +0200

Hello,

the NetBSD mailing list discussed a similar issue to what we recently
discussed about: The compile-time evaluation of the htons() functions
which would be nice if they evaluate as macro's if the argument is a
constant.

I'll try to see if they found a nice solution for it.

Leon.

----- Original Message ----- 
From: "Jason Thorpe" <address@hidden>
Newsgroups: netbsd.tech.kern
Sent: Tuesday, April 01, 2003 6:21 AM
Subject: Re: MALLOC vs. malloc: maybe use __builtin_constant_p?


> 
> On Monday, March 31, 2003, at 07:14  PM, address@hidden wrote:
> 
> > Maybe "The Right Thing" is to have a single blessed version, which uses
> > __builtin_constant_p() to check whether the arg is a constant, and
> > evaluates into the macro or the fn based on that...
> 
> Yah, that's a pretty good idea...
> 
> I'll take a look while I'm on the plane Wednesday...
> 
>          -- Jason R. Thorpe <address@hidden>
> 





reply via email to

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