Blob Blame History Raw
--- milter-regex-1.9/eval.c
+++ milter-regex-1.9/eval.c
@@ -43,7 +43,7 @@
 #define REG_BASIC	0
 #endif
 
-extern int	 yyerror(char *, ...);
+extern int	 yyerror(const char *, ...);
 extern void	 die(const char *);
 static void	 mutex_lock(void);
 static void	 mutex_unlock(void);
--- milter-regex-1.9/milter-regex.c
+++ milter-regex-1.9/milter-regex.c
@@ -135,6 +135,7 @@
 
 #if __linux__ || __sun__
 #define	ST_MTIME st_mtime
+extern size_t	 strlcat(char *, const char *, size_t);
 extern size_t	 strlcpy(char *, const char *, size_t);
 #else
 #define	ST_MTIME st_mtimespec
@@ -621,7 +622,10 @@
 	cb_body,	/* body block */
 	cb_eom,		/* end of message */
 	NULL,		/* message aborted */
-	cb_close	/* connection cleanup */
+	cb_close,	/* connection cleanup */
+	NULL,		/* unrecognized or unimplemented command filter */
+	NULL,		/* SMTP DATA command filter */
+	NULL		/* negotiation callback */
 };
 
 static void
--- milter-regex-1.9/parse.y
+++ milter-regex-1.9/parse.y
@@ -43,7 +43,7 @@
 
 #include "eval.h"
 
-int			 yyerror(char *, ...);
+int			 yyerror(const char *, ...);
 static int		 yyparse(void);
 static int		 define_macro(const char *, struct expr *);
 static struct expr	*find_macro(const char *);
@@ -254,7 +254,7 @@
 %%
 
 int
-yyerror(char *fmt, ...)
+yyerror(const char *fmt, ...)
 {
 	va_list ap;
 	errors = 1;
@@ -359,7 +359,7 @@
 
 		while ((c = lgetc(fin)) != EOF && c != del) {
 			*p++ = c;
-			if (p - buf >= sizeof(buf) - 1) {
+			if ((size_t)(p - buf) >= sizeof(buf) - 1) {
 				yyerror("yylex: message too long");
 				return (ERROR);
 			}
@@ -379,7 +379,7 @@
 
 		do {
 			*p++ = c;
-			if (p - buf >= sizeof(buf)) {
+			if ((size_t)(p - buf) >= sizeof(buf)) {
 				yyerror("yylex: token too long");
 				return (ERROR);
 			}
@@ -406,7 +406,7 @@
 		*p++ = del;
 		while ((c = lgetc(fin)) != EOF && c != '\n' && c != del) {
 			*p++ = c;
-			if (p - buf >= sizeof(buf) - 1) {
+			if ((size_t)(p - buf) >= sizeof(buf) - 1) {
 				yyerror("yylex: argument too long");
 				return (ERROR);
 			}
@@ -415,7 +415,7 @@
 			*p++ = del;
 			while ((c = lgetc(fin)) != EOF && isalpha(c)) {
 				*p++ = c;
-				if (p - buf >= sizeof(buf)) {
+				if ((size_t)(p - buf) >= sizeof(buf)) {
 					yyerror("yylex: argument too long");
 					return (ERROR);
 				}