aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-01-15 13:44:11 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-01-15 13:44:11 +0000
commit1e1e0552e60b1ebbcefeb6f90335643fc5f3d1b5 (patch)
tree17b8970a68d2e0dbbf27087ea40e8a3f7fc65ff0 /src
parentfa13b14de5288220b8d02a331b6fa6d54269f38a (diff)
downloadmailfromd-1e1e0552e60b1ebbcefeb6f90335643fc5f3d1b5.tar.gz
mailfromd-1e1e0552e60b1ebbcefeb6f90335643fc5f3d1b5.tar.bz2
Ported r1556 from branches/gmach.
* src/gram.y (DELETE string): Initialize hdr.value. * src/drivers.c (code_type_header): Value can be NULL. Fix compatibility with MU CVS: * src/main.c: Use mu_log_facility. * src/mtasim.c [MAILUTILS_VERSION_NUMBER > 1290]: Include gettext.h, define _ and N_. * configure.ac: Check for mu_log_facility. git-svn-id: file:///svnroot/mailfromd/trunk@1569 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'src')
-rw-r--r--src/drivers.c9
-rw-r--r--src/gram.y1
-rw-r--r--src/main.c9
-rw-r--r--src/mtasim.c6
4 files changed, 20 insertions, 5 deletions
diff --git a/src/drivers.c b/src/drivers.c
index 278dbb60..56290b80 100644
--- a/src/drivers.c
+++ b/src/drivers.c
@@ -1,5 +1,5 @@
/* This file is part of mailfromd.
- Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff
+ Copyright (C) 2005, 2006, 2007, 2008 Sergey Poznyakoff
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -977,7 +977,12 @@ void
code_type_header(NODE *node, struct locus **old_locus)
{
MARK_LOCUS();
- code_node(node->v.hdr.value);
+ if (node->v.hdr.value)
+ code_node(node->v.hdr.value);
+ else {
+ code_op(opcode_push);
+ code_immediate(0);
+ }
code_op(opcode_header);
code_immediate((void*)node->v.hdr.opcode);
code_immediate((void*)node->v.hdr.name->off);
diff --git a/src/gram.y b/src/gram.y
index cbb763a5..7732007f 100644
--- a/src/gram.y
+++ b/src/gram.y
@@ -860,6 +860,7 @@ header_action:
$$ = alloc_node(node_type_header, &$1);
$$->v.hdr.opcode = header_delete;
$$->v.hdr.name = $2;
+ $$->v.hdr.value = NULL;
}
;
diff --git a/src/main.c b/src/main.c
index 23df6e54..4741dba4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -40,6 +40,9 @@
#else
# include <mailutils/libargp.h>
#endif
+#ifdef HAVE_MAILUTILS_SYSLOG_H
+# include <mailutils/syslog.h>
+#endif
#include "mailfromd.h"
@@ -2056,12 +2059,12 @@ log_setup(int want_stderr)
if (!want_stderr) {
#ifdef USE_SYSLOG_ASYNC
if (use_syslog_async) {
- openlog_async(syslog_tag, LOG_PID, log_facility);
+ openlog_async(syslog_tag, LOG_PID, mu_log_facility);
gacopyz_set_logger(mf_gacopyz_syslog_async_log_printer);
} else
#endif
{
- openlog(syslog_tag, LOG_PID, log_facility);
+ openlog(syslog_tag, LOG_PID, mu_log_facility);
gacopyz_set_logger(gacopyz_syslog_log_printer);
}
mu_error_set_print(syslog_error_printer);
@@ -2109,7 +2112,7 @@ main(int argc, char **argv)
yy_flex_debug = 0;
/* Set default logging */
- log_facility = DEFAULT_LOG_FACILITY;
+ mu_log_facility = DEFAULT_LOG_FACILITY;
log_setup(!stderr_closed_p());
init_names();
diff --git a/src/mtasim.c b/src/mtasim.c
index 3f6b398a..2a12a436 100644
--- a/src/mtasim.c
+++ b/src/mtasim.c
@@ -44,6 +44,12 @@
#include <netinet/in.h>
#include <mailutils/mailutils.h>
+#if MAILUTILS_VERSION_NUMBER > 1290
+# include <gettext.h>
+# define _(string) gettext(string)
+# define N_(string) string
+#endif
+
#include <gacopyz.h>
#define obstack_chunk_alloc malloc
#define obstack_chunk_free free

Return to:

Send suggestions and report system problems to the System administrator.