Compiler masochism compliance.
[exim.git] / src / src / buildconfig.c
index 49d8c411ac1cbd904a82ecad8c2f164d0e335d09..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)