From: cmiller Date: Mon, 18 Jun 2001 22:53:52 +0000 (+0000) Subject: In GCC 3.0, printf is a macro, so the mid- printf() CPP directives had to be X-Git-Tag: release_0_2_0~63 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=593996cc4c0646d61edcb9cee48de49789883407;p=freeradius.git In GCC 3.0, printf is a macro, so the mid- printf() CPP directives had to be moved out a level. --- diff --git a/debian/changelog b/debian/changelog index 4c09313..5166af4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ radiusd-freeradius (?) unstable; urgency=low * Integer values are printed as unsigned numbers, to comply with RFC2866. * Fixed broken/reversed auth comparisons in SQL module. + * Sucked out CPPness from inside a printf, as printf is a macro in newer + compilers (gcc3.0, e.g.). (closes: Bug#100889) -- Chad Miller [TBA] diff --git a/src/main/radwho.c b/src/main/radwho.c index 08bbf26..d02da1b 100644 --- a/src/main/radwho.c +++ b/src/main/radwho.c @@ -453,17 +453,19 @@ int main(int argc, char **argv) if (ut.ut_user[0] && ut.ut_line[0]) { #endif #ifdef UT_HOSTSIZE + +#ifdef HAVE_UTMPX_H +# define UT_TIME ut_xtime +#else +# define UT_TIME ut_time +#endif if (showname) printf((rawoutput == 0? ufmt1: ufmt1r), ut.ut_name, fullname(ut.ut_name), "shell", ttyshort(ut.ut_line), -#ifdef HAVE_UTMPX_H - dotime(ut.ut_xtime), -#else - dotime(ut.ut_time), -#endif + dotime(ut.UT_TIME), ut.ut_host, myname, eol); else @@ -471,11 +473,7 @@ int main(int argc, char **argv) ut.ut_name, ttyshort(ut.ut_line), "shell", -#ifdef HAVE_UTMPX_H - dotime(ut.ut_xtime), -#else - dotime(ut.ut_time), -#endif + dotime(ut.UT_TIME), ut.ut_host, myname, eol); #endif