Patch to allow FreeRADIUS server 2.1.8 to compile on non-GCC systems

Jeffrey Hutzelman jhutz at cmu.edu
Wed Apr 21 17:20:46 CEST 2010


--On Wednesday, April 21, 2010 08:48:25 AM +0200 Alan DeKok 
<aland at deployingradius.com> wrote:

> Scott Neugroschl wrote:
>> Change Description:
>>    * Allow code to compile on non-GCC systems, by providing const casting
>>      when necessary (command.c, for example)
>>    * Allow code to compile on non-GCC systems, by fixing variable
>>      declarations that are not at the beginning of a block (ltdl.c,
>>      for example)
>
>   Get rid of the /* SAN */ text everywhere.  It's useless and annoying.
>  If you want to track local changes, use 'git'.

Also get rid of the practice of included a commented-out copy of what every 
line you changed looked like before the change.  That's also unnecessary 
and makes the patch much harder to read.

>> +		DICT_VALUE *dv = NULL; /* SAN */
>>  		auth_type = auth_type_pair->vp_integer;
>>  		auth_type_count++;
>> -		DICT_VALUE *dv = dict_valbyattr(auth_type_pair->attribute,
>> +/* SAN		DICT_VALUE *dv = dict_valbyattr(auth_type_pair->attribute,
>> +						auth_type_pair->vp_integer);
>> +*/
>> +		dv = dict_valbyattr(auth_type_pair->attribute,
>>  						auth_type_pair->vp_integer);
>
>   If your C compiler can't handle variable declarations, it's *very* old
> and out of date.

I doubt anyone has a compiler left that can't handle variable declarations 
(did C _ever_ permit that?) or even initialization.  However, the compiler 
is within its rights to complain about a declaration which occurs not at 
the beginning of a block.

Again, this is much harder to read because of the unnecessary 3-line 
commented-out copy of what it looked like before.

-- Jeff



More information about the Freeradius-Devel mailing list