[rbldnsd] Minor portability (non GCC compiller) enhancements to 0.966a

Michael Tokarev mjt at corpit.ru
Fri Nov 24 19:57:27 MSK 2006


Victor Duchovni wrote:
> On Fri, Nov 24, 2006 at 06:40:57PM +0300, Michael Tokarev wrote:
[]
>>> +#ifndef __GNUC__
>>> +#define inline
>>> +#endif
>> Umm.  I'd not do this.  Especially due to the following routine.
>> Alot of compilers supports `inline' keyword nowadays.  Maybe it
>> should be a configure test instead.  Are there any real issue(s)
>> with using inline?
> 
> I still have some systems whose preferred compiler is not GCC, I don't
> see a reason why they should not be able to compile the code even if the
> result may not be as efficient. Aggressive optimization (if enabled)
> should inline these without the directive.

I mean that other compilers also supports inline keyword.  I've added
a configure test for it, to #define inline as either __inline or empty
in config.h.  Think it's best for all worlds ;)

> 
>>>  #ifndef INCOMPAT_0_99
>>> +#ifdef __GNUC__
>>>  #warning NS record compatibility mode: remove for 1.0 final
>>> +#endif
>> Any compiler out there wich doesn't understand #warning?
>> In any case, this whole stuff is going away soon.
> 
> The same compiler that does not understand "inline".

Ok, so it is going away - like you suggested for now, and completely in
a near future.

>>>    const struct dslist *dsl;
>>>    { /* zone header */
>>>      char name[DNS_MAXDOMAIN+1];
>>> -    const unsigned char **nsdna = z->z_nsdna;
>>> +    const unsigned char * const *nsdna = z->z_nsdna;
>> Good catch.
> 
> The same compiler refuses to compile the code unless I do that...

I wonder which compiler it is... Just curious.

Thanks.

/mjt


More information about the rbldnsd mailing list