Compiler masochism compliance.
[exim.git] / src / src / buildconfig.c
index 7e2790bb81a7855310e65a336d8094b142aca935..c012fb7d40a70f106ecccd62ecd56a5312327269 100644 (file)
@@ -42,16 +42,16 @@ normally called independently. */
 #include <grp.h>
 
 typedef struct {
-  char *name;
+  const char *name;
   int *flag;
 } have_item;
 
 typedef struct {
-  char *name;
+  const char *name;
   char *data;
 } save_item;
 
-static char *db_opts[] = { "", "USE_DB", "USE_GDBM", "USE_TDB" };
+static const char *db_opts[] = { "", "USE_DB", "USE_GDBM", "USE_TDB" };
 
 static int have_ipv6 = 0;
 static int have_iconv = 0;
@@ -557,9 +557,9 @@ while (fgets(buffer, sizeof(buffer), base) != NULL)
     int isgroup = name[10] == 'G';
     uid_t uid = 0;
     gid_t gid = 0;
-    char *s;
-    char *username = NULL;
-    char *user = getenv(name);
+    const char *s;
+    const char *username = NULL;
+    const char *user = getenv(name);
 
     if (user == NULL) user = "";
     while (isspace((unsigned char)(*user))) user++;
@@ -600,8 +600,7 @@ while (fgets(buffer, sizeof(buffer), base) != NULL)
       while (isspace(*user)) user++;
       username = user;
       }
-
-    else if (isgroup)
+else if (isgroup)
       {
       struct group *gr = getgrnam(user);
       if (gr == NULL)
@@ -800,11 +799,13 @@ while (fgets(buffer, sizeof(buffer), base) != NULL)
         fprintf(new, "\"%s\"\n", value);
         }
 
-      /* Timezone values HEADERS_CHARSET, and TCP_WRAPPERS_DAEMON_NAME get quoted */
+      /* Timezone values HEADERS_CHARSET, TCP_WRAPPERS_DAEMON_NAME and
+      WHITELIST_D_MACROS get quoted */
 
       else if (strcmp(name, "TIMEZONE_DEFAULT") == 0||
                strcmp(name, "TCP_WRAPPERS_DAEMON_NAME") == 0||
-               strcmp(name, "HEADERS_CHARSET") == 0)
+               strcmp(name, "HEADERS_CHARSET") == 0||
+              strcmp(name, "WHITELIST_D_MACROS") == 0)
         fprintf(new, "\"%s\"\n", value);
 
       /* For others, quote any paths and don't quote anything else */