diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-01-13 18:23:10 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-01-13 18:23:10 +0000 |
commit | 4e51bccdd6bbfe1a80313a24fe7e30118ac65bfd (patch) | |
tree | 4ba824fa556e57c631f59d3f44c735f455ef8c36 | |
parent | 815aa54b792dc3a5d76feda5f607751800947089 (diff) | |
download | mailfromd-4e51bccdd6bbfe1a80313a24fe7e30118ac65bfd.tar.gz mailfromd-4e51bccdd6bbfe1a80313a24fe7e30118ac65bfd.tar.bz2 |
* src/lex.l, src/mailfromd.h (parse_warning, parse_warning_locus)
(parse_error,parse_error_locus): fmt is const.
* src/gram.y (dbg_dict_getsym): Auxiliary function.
* src/prog.c, src/prog.h (pushs): 2nd argument is const.
* src/bi_gettext.m4 (bindtextdomain): Minor fix.
* pies/Makefile.am, smap/Makefile.am,
pmult/Makefile.am (LDADD): Place libgnu.a after
MAILUTILS_LIBS.
* pmult/pmult.c: Fix indentation.
* lib/libmf.h: Include stdio.h
* lib/userprivs.c: Include libmf.h.
* lib/parsetime.c: Includestring.h and time.h
git-svn-id: file:///svnroot/mailfromd/branches/gmach@1562 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | lib/libmf.h | 1 | ||||
-rw-r--r-- | lib/parsetime.c | 2 | ||||
-rw-r--r-- | lib/userprivs.c | 1 | ||||
-rw-r--r-- | pies/Makefile.am | 4 | ||||
-rw-r--r-- | pmult/Makefile.am | 2 | ||||
-rw-r--r-- | pmult/pmult.c | 12 | ||||
-rw-r--r-- | smap/Makefile.am | 2 | ||||
-rw-r--r-- | src/bi_gettext.m4 | 2 | ||||
-rw-r--r-- | src/gram.y | 8 | ||||
-rw-r--r-- | src/lex.l | 8 | ||||
-rw-r--r-- | src/mailfromd.h | 8 | ||||
-rw-r--r-- | src/prog.c | 2 | ||||
-rw-r--r-- | src/prog.h | 2 |
14 files changed, 45 insertions, 22 deletions
@@ -1,5 +1,18 @@ 2008-01-13 Sergey Poznyakoff <gray@gnu.org.ua> + * src/lex.l, src/mailfromd.h (parse_warning, parse_warning_locus) + (parse_error,parse_error_locus): fmt is const. + * src/gram.y (dbg_dict_getsym): Auxiliary function. + * src/prog.c, src/prog.h (pushs): 2nd argument is const. + * src/bi_gettext.m4 (bindtextdomain): Minor fix. + * pies/Makefile.am, smap/Makefile.am, + pmult/Makefile.am (LDADD): Place libgnu.a after + MAILUTILS_LIBS. + * pmult/pmult.c: Fix indentation. + * lib/libmf.h: Include stdio.h + * lib/userprivs.c: Include libmf.h. + * lib/parsetime.c: Includestring.h and time.h + * pies: New directory. * pies/Makefile.am: New file. * pies/pies.c, pies/progman.c, pies/pies.h, pies/pies.rcin: New diff --git a/lib/libmf.h b/lib/libmf.h index 2ec0bcbd..5b036e85 100644 --- a/lib/libmf.h +++ b/lib/libmf.h @@ -14,6 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <stdio.h> #include <gettext.h> #include <mailutils/types.h> #include <unistd.h> diff --git a/lib/parsetime.c b/lib/parsetime.c index d449e0c3..58a840bf 100644 --- a/lib/parsetime.c +++ b/lib/parsetime.c @@ -18,6 +18,8 @@ # include <config.h> #endif #include <stdlib.h> +#include <string.h> +#include <time.h> #include <ctype.h> static int diff --git a/lib/userprivs.c b/lib/userprivs.c index 125210e4..db352702 100644 --- a/lib/userprivs.c +++ b/lib/userprivs.c @@ -30,6 +30,7 @@ #include <mailutils/list.h> #include <mailutils/iterator.h> #include <xalloc.h> +#include "libmf.h" /* Switch to the given UID/GID */ int diff --git a/pies/Makefile.am b/pies/Makefile.am index 34f6232e..03c780c3 100644 --- a/pies/Makefile.am +++ b/pies/Makefile.am @@ -32,8 +32,8 @@ INCLUDES = \ LDADD = \ ../lib/libmf.a\ - ../gnu/libgnu.a\ - $(MAILUTILS_LIBS) + $(MAILUTILS_LIBS)\ + ../gnu/libgnu.a AM_CPPFLAGS=-DSYSCONFDIR=\"$(sysconfdir)\"\ -DSTATEDIR=\"$(localstatedir)\" diff --git a/pmult/Makefile.am b/pmult/Makefile.am index 2b409374..1aaff256 100644 --- a/pmult/Makefile.am +++ b/pmult/Makefile.am @@ -30,7 +30,7 @@ INCLUDES = \ pmult_SOURCES = pmult.c LDADD = \ ../lib/libmf.a\ - ../gnu/libgnu.a\ $(MAILUTILS_LIBS)\ + ../gnu/libgnu.a\ $(MILTER)\ @META1_LIBS@ @PTHREAD_LIBRARIES@ diff --git a/pmult/pmult.c b/pmult/pmult.c index 43064f5f..ac9a5f3c 100644 --- a/pmult/pmult.c +++ b/pmult/pmult.c @@ -133,11 +133,11 @@ log_setup (int want_stderr) static int stderr_closed_p() { - int fd = dup(0); - if (fd < 0) - return 1; - close(fd); - return fd <= 2; + int fd = dup(0); + if (fd < 0) + return 1; + close(fd); + return fd <= 2; } @@ -711,7 +711,7 @@ pmult_runlist (struct pmult_priv_data *p, pmult_runfun_t runfun, pmse_ctx_P pmse_ctx, void *data, char **macros) { sfsistat_T rc; - mu_iterator_t itr; + mu_iterator_t itr = NULL; protect (); mu_list_get_iterator (p->srvlist, &itr); diff --git a/smap/Makefile.am b/smap/Makefile.am index 82f90284..8edb7b1a 100644 --- a/smap/Makefile.am +++ b/smap/Makefile.am @@ -24,4 +24,4 @@ INCLUDES = \ -I$(top_srcdir)/gnu\ -I../gnu -LDADD = ../lib/libmf.a ../gnu/libgnu.a $(MAILUTILS_LIBS) +LDADD = ../lib/libmf.a $(MAILUTILS_LIBS) ../gnu/libgnu.a diff --git a/src/bi_gettext.m4 b/src/bi_gettext.m4 index aeb008cb..2a28d466 100644 --- a/src/bi_gettext.m4 +++ b/src/bi_gettext.m4 @@ -16,7 +16,7 @@ MF_DEFUN(bindtextdomain, STRING, STRING domain, STRING dirname) { - char *s = bindtextdomain(domain[0] ? domain : NULL, dirname); + const char *s = bindtextdomain(domain[0] ? domain : NULL, dirname); MF_ASSERT(s != NULL, mf_failure, "bindtextdomain failed: %s", mu_strerror(errno)); @@ -2835,6 +2835,12 @@ dbg_setheader(void *data, struct old_header_node *hdr) hdr->value); } +static char * +dbg_dict_getsym (void *data, char *str) +{ + return dict_getsym ((mu_assoc_t)data, str); +} + void mailfromd_test(int argc, char **argv) { @@ -2848,7 +2854,7 @@ mailfromd_test(int argc, char **argv) dict_init(&dict); env = create_environment(NULL, - dict_getsym, dbg_setreply, dbg_setheader, + dbg_dict_getsym, dbg_setreply, dbg_setheader, dict); xeval(env, smtp_state_begin); @@ -657,7 +657,7 @@ print_parse_message(const struct locus *locus, } void -parse_warning(char *fmt, ...) +parse_warning(const char *fmt, ...) { va_list ap; @@ -667,7 +667,7 @@ parse_warning(char *fmt, ...) } void -parse_warning_locus(const struct locus *loc, char *fmt, ...) +parse_warning_locus(const struct locus *loc, const char *fmt, ...) { va_list ap; @@ -677,7 +677,7 @@ parse_warning_locus(const struct locus *loc, char *fmt, ...) } void -parse_error(char *fmt, ...) +parse_error(const char *fmt, ...) { va_list ap; @@ -688,7 +688,7 @@ parse_error(char *fmt, ...) } void -parse_error_locus(const struct locus *loc, char *fmt, ...) +parse_error_locus(const struct locus *loc, const char *fmt, ...) { va_list ap; diff --git a/src/mailfromd.h b/src/mailfromd.h index f1162ec9..476c3894 100644 --- a/src/mailfromd.h +++ b/src/mailfromd.h @@ -641,10 +641,10 @@ const char *storage_class_str(storage_class_t sc); int string_to_stat(const char *str, mf_status *status); enum smtp_state string_to_state(const char *name); const char *state_to_string(enum smtp_state state); -void parse_error(char *fmt, ...); -void parse_error_locus(const struct locus *loc, char *fmt, ...); -void parse_warning(char *fmt, ...); -void parse_warning_locus(const struct locus *loc, char *fmt, ...); +void parse_error(const char *fmt, ...); +void parse_error_locus(const struct locus *loc, const char *fmt, ...); +void parse_warning(const char *fmt, ...); +void parse_warning_locus(const struct locus *loc, const char *fmt, ...); void print_syntax_tree(void); void print_macros(void); const char *function_name(void); @@ -579,7 +579,7 @@ env_data_ref(eval_environ_t env, size_t off) } void -pushs(eval_environ_t env, char *s) +pushs(eval_environ_t env, const char *s) { size_t off = heap_reserve(env, strlen(s) + 1); strcpy((char*) env_data_ref(env, off), s); @@ -42,7 +42,7 @@ STKVAL heap_tempspace(eval_environ_t env, size_t size); void heap_obstack_begin(eval_environ_t env); STKVAL heap_obstack_finish(eval_environ_t env); void *heap_obstack_grow(eval_environ_t env, void *ptr, size_t size); -void pushs(eval_environ_t env, char *s); +void pushs(eval_environ_t env, const char *s); void advance_pc(eval_environ_t env, unsigned cnt); void adjust_stack(eval_environ_t env, unsigned cnt); void unroll_stack(eval_environ_t env, unsigned cnt); |