aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-03-01 01:09:16 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-03-01 01:09:16 +0000
commit94581b716c64295af55fd800274327e57cd8d887 (patch)
treedb5afe593071290b306945c49ac7e3ed09bde3d6
parentacb622bd1cbefd11d908a764fafcd064719daf5e (diff)
downloadmailfromd-94581b716c64295af55fd800274327e57cd8d887.tar.gz
mailfromd-94581b716c64295af55fd800274327e57cd8d887.tar.bz2
* src/prog.c, src/prog.h (advance_pc): Fix type of the 2nd
argument. * configure.ac: Use AC_TRY_LINK to check for libresolve. git-svn-id: file:///svnroot/mailfromd/branches/release_4_3_patches@1619 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r--ChangeLog6
-rw-r--r--THANKS3
-rw-r--r--configure.ac10
-rw-r--r--src/prog.c2
-rw-r--r--src/prog.h4
5 files changed, 20 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 84f14b2f..f1ecc135 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-01 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ * src/prog.c, src/prog.h (advance_pc): Fix type of the 2nd
+ argument.
+ * configure.ac: Use AC_TRY_LINK to check for libresolve.
+
2008-02-21 Sergey Poznyakoff <gray@gnu.org.ua>
* src/main.c (cb_milter_timeout): Fix format.
diff --git a/THANKS b/THANKS
index bbaf5a11..5a7bbe5a 100644
--- a/THANKS
+++ b/THANKS
@@ -11,8 +11,9 @@ Jan Rafaj <jr-mailfromd --AT-- cedric --DOT-- unob --DOT-- cz>
Jeff Ballard <ballard --AT-- engr --DOT-- wisc --DOT-- edu>
Nacho González López <nacho --AT-- es --DOT-- gnu --DOT-- org>
Peter Markeloff <magic --AT-- farlep --DOT-- net>
-Tom Lynch <tlynch --AT-- primate --DOT-- wisc --DOT-- edu>
+Phil Miller <pmiller --AT-- hmc --DOT-- edu>
Sergey Afonin <a_s_y --AT-- sama --DOT-- ru>
+Tom Lynch <tlynch --AT-- primate --DOT-- wisc --DOT-- edu>
Zeus Panchenko <zeus --AT-- dn --DOT-- farlep --DOT-- net>
diff --git a/configure.ac b/configure.ac
index 3ec336c7..aa5ae92e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,15 @@ AC_PROG_YACC
AC_PROG_LEX
# Checks for libraries.
-AC_CHECK_LIB(resolv, res_query)
+dnl Cannot use AC_CHECK_LIB to check for libresolv, because res_query
+dnl can be a macro, so resolv.h needs to be included.
+saved_LIBS=$LIBS
+LIBS="$LIBS -lresolv"
+AC_TRY_LINK([#include <resolv.h>],
+ [res_query ();],
+ [:],
+ [LIB=$saved_LIBS])
+dnl AC_CHECK_LIB(resolv, res_query)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, gethostbyaddr)
AC_CHECK_LIB(rt, nanosleep)
diff --git a/src/prog.c b/src/prog.c
index abb9ce8a..50185f9f 100644
--- a/src/prog.c
+++ b/src/prog.c
@@ -284,7 +284,7 @@ struct eval_environ {
};
void
-advance_pc(eval_environ_t env, unsigned cnt)
+advance_pc(eval_environ_t env, long cnt)
{
env->pc += cnt;
}
diff --git a/src/prog.h b/src/prog.h
index 955f54da..c18ab87c 100644
--- a/src/prog.h
+++ b/src/prog.h
@@ -1,5 +1,5 @@
/* This file is part of mailfromd.
- Copyright (C) 2006, 2007 Sergey Poznyakoff
+ Copyright (C) 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
@@ -43,7 +43,7 @@ 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 advance_pc(eval_environ_t env, unsigned cnt);
+void advance_pc(eval_environ_t env, long cnt);
void adjust_stack(eval_environ_t env, unsigned cnt);
void unroll_stack(eval_environ_t env, unsigned cnt);
void prog_trace(eval_environ_t env, const char *fmt, ...);

Return to:

Send suggestions and report system problems to the System administrator.