tech-userlevel archive

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

Re: macro directives inside macro arguments undefined



In article <alpine.NEB.2.00.1102241453010.14913%galant.ukfsn.org@localhost>,
Iain Hibbert  <plunky%rya-online.net@localhost> wrote:
>-=-=-=-=-=-
>
>On Thu, 24 Feb 2011, Christos Zoulas wrote:
>> >The patch attached fixes building this with pcc (for which the behaviour
>> >is to error out with a syntax error), by moving the directives away from
>> >the arguments, any objections to commit?
>>
>> I don't like this patch much. I think it is better to do:
>>
>>      static const char fmt[] = .....;
>>
>>      sprintf(str, fmt, ...
>
>like the attached?  (I'm not sure its any better :)

Yes, I committed a similar one already (one that takes fmt out of the ifdefs).

>Well, I agree that snprintf() would have been better, though:
>
>- the output line buffer is 2048 bytes

Yes.

>- fixing all the sprint->snprint in IPF would be a lot of work

Yes.

>- this is external sources and I'm not sure if its worth diverging from
>  upstream (we don't have the latest version installed, in any case)

I agree.

>- does IPF have a future? (I don't mean to diss it, I understand the main
>  developer is now employed by a company that is not open-source friendly)

Right.

>- is NPF intended to (eventually) replace IPF in base?

I believe so.

christos



Home | Main Index | Thread Index | Old Index