In GCC 3.0, printf is a macro, so the mid- printf() CPP directives had to be
authorcmiller <cmiller>
Mon, 18 Jun 2001 22:53:52 +0000 (22:53 +0000)
committercmiller <cmiller>
Mon, 18 Jun 2001 22:53:52 +0000 (22:53 +0000)
moved out a level.

debian/changelog
src/main/radwho.c

index 4c09313..5166af4 100644 (file)
@@ -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 <cmiller@debian.org>  [TBA]
 
index 08bbf26..d02da1b 100644 (file)
@@ -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