]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/readconf.c
OpenSSL 1.1 - STORE_CTX accessor functions
[user/henk/code/exim.git] / src / src / readconf.c
index a23a57ce86355a912c0e0e11b78fe15e003d4ba3..27a834b3f7234cd21105b0f0a93e86a8f0f54a83 100644 (file)
@@ -445,6 +445,7 @@ static optionlist optionlist_config[] = {
   { "strip_trailing_dot",       opt_bool,        &strip_trailing_dot },
   { "syslog_duplication",       opt_bool,        &syslog_duplication },
   { "syslog_facility",          opt_stringptr,   &syslog_facility_str },
+  { "syslog_pid",               opt_bool,        &syslog_pid },
   { "syslog_processname",       opt_stringptr,   &syslog_processname },
   { "syslog_timestamp",         opt_bool,        &syslog_timestamp },
   { "system_filter",            opt_stringptr,   &system_filter },
@@ -567,6 +568,7 @@ macro_create(const uschar * name, const uschar * val,
 unsigned namelen = Ustrlen(name);
 macro_item * m = store_get(sizeof(macro_item) + namelen);
 
+/* fprintf(stderr, "%s: '%s' '%s'\n", __FUNCTION__, name, val) */
 if (!macros)
   {
   macros = m;
@@ -762,6 +764,9 @@ due to conflicts with other common macros. */
 #ifdef SUPPORT_SOCKS
   macro_create(US"_HAVE_SOCKS", US"y", FALSE, TRUE);
 #endif
+#ifdef TCP_FASTOPEN
+  macro_create(US"_HAVE_TCP_FASTOPEN", US"y", FALSE, TRUE);
+#endif
 #ifdef EXPERIMENTAL_LMDB
   macro_create(US"_HAVE_LMDB", US"y", FALSE, TRUE);
 #endif
@@ -862,8 +867,14 @@ readconf_options_from_list(optionlist * opts, unsigned nopt, uschar * group)
 int i;
 const uschar * s;
 
-/* Walk the array backwards to get substring-conflict names */
-for (i = nopt-1; i >= 0; i--) if (*(s = opts[i].name) && *s != '*')
+/* The 'previously-defined-substring' rule for macros in config file
+lines is done so for these builtin macros: we know that the table
+we source from is in strict alpha order, hence the builtins portion
+of the macros list is in reverse-alpha (we prepend them) - so longer
+macros that have substrings are always discovered first during
+expansion. */
+
+for (i = 0; i < nopt; i++)  if (*(s = opts[i].name) && *s != '*')
   macro_create(string_sprintf("_OPT_%T_%T", group, s), US"y", FALSE, TRUE);
 }
 
@@ -1006,6 +1017,7 @@ for (;;)
     for (t = s; (p = CUstrchr(t, '_')); t = p+1)
       if (c = p[1], c == 'O' || c == 'D' || c == 'H')
        {
+/* fprintf(stderr, "%s: builtins create triggered by '%s'\n", __FUNCTION__, s); */
        macros_create_builtin();
        break;
        }
@@ -1025,6 +1037,7 @@ for (;;)
       int moveby;
       int replen = Ustrlen(m->replacement);
 
+/* fprintf(stderr, "%s: matched '%s' in '%s'\n", __FUNCTION__, m->name, t) */
       /* Expand the buffer if necessary */
 
       while (newlen - m->namelen + replen + 1 > big_buffer_size)