[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] htons VS HTONS (Fw: MALLOC vs. malloc: maybe use __bui
From: |
Jani Monoses |
Subject: |
Re: [lwip-users] htons VS HTONS (Fw: MALLOC vs. malloc: maybe use __builtin_constant_p?) |
Date: |
Tue, 8 Apr 2003 10:41:05 +0300 |
But I think they rely on gcc being the compiler which helps a lot.
In lwip there are a lot of valid ANSI C constructs which still bother some
compilers.
> 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>
> >
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/lwip-users