git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement -D filtering, first pass.
[exim.git]
/
src
/
src
/
buildconfig.c
diff --git
a/src/src/buildconfig.c
b/src/src/buildconfig.c
index 3cd9b2924d5fbdfa03be3b4fc8a538bdda1d827d..49d8c411ac1cbd904a82ecad8c2f164d0e335d09 100644
(file)
--- a/
src/src/buildconfig.c
+++ b/
src/src/buildconfig.c
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/buildconfig.c,v 1.
18 2010/06/07 18:09:07
pdp Exp $ */
+/* $Cambridge: exim/src/src/buildconfig.c,v 1.
21 2010/06/13 08:26:40
pdp Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-34,7
+34,6
@@
normally called independently. */
#include <ctype.h>
#include <ctype.h>
-#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-104,10
+103,8
@@
main(int argc, char **argv)
{
off_t test_off_t = 0;
time_t test_time_t = 0;
{
off_t test_off_t = 0;
time_t test_time_t = 0;
-#if !(__STDC_VERSION__ >= 199901L) && !defined(PRIdMAX)
size_t test_size_t = 0;
unsigned long test_ulong_t = 0L;
size_t test_size_t = 0;
unsigned long test_ulong_t = 0L;
-#endif
long test_long_t = 0;
FILE *base;
FILE *new;
long test_long_t = 0;
FILE *base;
FILE *new;
@@
-187,14
+184,10
@@
with C99 not being ubiquitous yet. Unfortunately. */
#if __STDC_VERSION__ >= 199901L
fprintf(new, "#define SIZE_T_FMT \"%%zu\"\n");
#else
#if __STDC_VERSION__ >= 199901L
fprintf(new, "#define SIZE_T_FMT \"%%zu\"\n");
#else
-# ifdef PRIdMAX
-fprintf(new, "#define SIZE_T_FMT \"%%" PRIdMAX "\"\n");
-# else
if (sizeof(test_size_t) > sizeof (test_ulong_t))
fprintf(new, "#define SIZE_T_FMT \"%%llu\"\n");
else
fprintf(new, "#define SIZE_T_FMT \"%%lu\"\n");
if (sizeof(test_size_t) > sizeof (test_ulong_t))
fprintf(new, "#define SIZE_T_FMT \"%%llu\"\n");
else
fprintf(new, "#define SIZE_T_FMT \"%%lu\"\n");
-# endif
#endif
/* Now search the makefile for certain settings */
#endif
/* Now search the makefile for certain settings */
@@
-532,8
+525,9
@@
while (fgets(buffer, sizeof(buffer), base) != NULL)
steps to filter out the most obvious ones. */
if ((!uid_not_set && uid == 0) ||
steps to filter out the most obvious ones. */
if ((!uid_not_set && uid == 0) ||
- (strcmp(username, "root") == 0) ||
- (strcmp(username, "toor") == 0) )
+ ((username != NULL) && (
+ (strcmp(username, "root") == 0) ||
+ (strcmp(username, "toor") == 0) )))
{
printf("\n*** Exim's internal user must not be root.\n\n");
return 1;
{
printf("\n*** Exim's internal user must not be root.\n\n");
return 1;
@@
-806,10
+800,13
@@
while (fgets(buffer, sizeof(buffer), base) != NULL)
fprintf(new, "\"%s\"\n", value);
}
fprintf(new, "\"%s\"\n", value);
}
- /* Timezone values and HEADERS_CHARSET get quoted */
+ /* Timezone values HEADERS_CHARSET, TCP_WRAPPERS_DAEMON_NAME and
+ WHITELIST_D_MACROS get quoted */
else if (strcmp(name, "TIMEZONE_DEFAULT") == 0||
else if (strcmp(name, "TIMEZONE_DEFAULT") == 0||
- strcmp(name, "HEADERS_CHARSET") == 0)
+ strcmp(name, "TCP_WRAPPERS_DAEMON_NAME") == 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 */
fprintf(new, "\"%s\"\n", value);
/* For others, quote any paths and don't quote anything else */