]> Pileus Git - ~andy/fetchmail/commitdiff
Define temporary variable with #ifdefs rather than using these inside a macro expansi...
authorMatthias Andree <matthias.andree@gmx.de>
Mon, 1 Aug 2005 20:43:31 +0000 (20:43 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Mon, 1 Aug 2005 20:43:31 +0000 (20:43 -0000)
svn path=/trunk/; revision=4211

conf.c
fetchmail.c

diff --git a/conf.c b/conf.c
index d046902be1b769b6fb6a236d0d61ff98f7fff3c7..355cc7ca8a71f289a83298d3477e6cb33f938007 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -123,6 +123,7 @@ void dump_config(struct runctl *runp, struct query *querylist)
 {
     struct query *ctl;
     struct idlist *idp;
+    const char *features;
 
     indent_level = 0;
 
@@ -149,7 +150,7 @@ void dump_config(struct runctl *runp, struct query *querylist)
      * This should be approximately in sync with the -V option dumping 
      * in fetchmail.c.
      */
-    printf("feature_options = ("
+    features = "feature_options = ("
 #ifdef POP2_ENABLE
     "'pop2',"
 #endif /* POP2_ENABLE */
@@ -186,7 +187,8 @@ void dump_config(struct runctl *runp, struct query *querylist)
 #ifdef INET6_ENABLE
     "'inet6',"
 #endif /* INET6_ENABLE */
-    ")\n");
+    ")\n";
+    fputs(features, stdout);
 
     fputs("# Start of configuration initializer\n", stdout);
     fputs("fetchmailrc = ", stdout);
index 0d237213c2e34e296cedb7dea181160bba8a782a..54ba2a81c7e0fc495abf7e1965d83c18cdcf6f60 100644 (file)
@@ -199,8 +199,7 @@ int main(int argc, char **argv)
 
     if (versioninfo)
     {
-       printf(GT_("This is fetchmail release %s"), VERSION);
-       printf(
+       const char *features = 
 #ifdef POP2_ENABLE
        "+POP2"
 #endif /* POP2_ENABLE */
@@ -246,7 +245,9 @@ int main(int argc, char **argv)
 #ifdef ENABLE_NLS
        "+NLS"
 #endif /* ENABLE_NLS */
-       "\n");
+       "\n";
+       printf(GT_("This is fetchmail release %s"), VERSION);
+       fputs(features, stdout);
        fputs("Fallback MDA: ", stdout);
 #ifdef FALLBACK_MDA
        fputs(FALLBACK_MDA, stdout);