Index: fbsd-6/sys/dev/aic7xxx/aicasm/aicasm_scan.l
===================================================================
--- fbsd-6.orig/sys/dev/aic7xxx/aicasm/aicasm_scan.l
+++ fbsd-6/sys/dev/aic7xxx/aicasm/aicasm_scan.l
@@ -528,7 +528,7 @@ expand_macro(struct symbol *macro_symbol
 
 		/* Put back everything up until the replacement. */
 		while (body_pos > next_match)
-			unput(*--body_pos);
+			yyunput(*--body_pos, body_head);
 
 		/* Perform the replacement. */
 		if (match_marg != NULL) {
@@ -537,7 +537,7 @@ expand_macro(struct symbol *macro_symbol
 			next_match = match_marg->replacement_text;
 			strp = next_match + strlen(next_match);
 			while (strp > next_match)
-				unput(*--strp);
+				yyunput(*--strp, next_match);
 
 			/* Skip past the unexpanded macro arg. */
 			body_pos -= match.rm_eo - match.rm_so;
