Patch to allow FreeRADIUS server 2.1.8 to compile on non-GCC systems
Alan DeKok
aland at deployingradius.com
Wed Apr 21 08:48:25 CEST 2010
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'.
I used to work with a guy who put /* BOB */ on every line of code he
changed. He lasted about 2 months.
> + 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.
> - cf_section2file(fp, client->cs);
> + cf_section2file(fp, /* SAN */(CONF_SECTION*)client->cs);
> fclose(fp);
This cast will satisfy old compilers. Modern compilers won't be
confused by it. And even for an older compiler, it does nothing more
than get rid of a warning.
Based on this feedback, none of these patches can make it into the server.
Alan DeKok.
More information about the Freeradius-Devel
mailing list