$NetBSD: patch-am,v 1.3 2008/12/17 02:19:59 christos Exp $

--- icb/readlineinit.c.orig	1995-02-24 16:20:25.000000000 -0500
+++ icb/readlineinit.c	2008-12-16 20:18:01.000000000 -0500
@@ -1,4 +1,6 @@
 #include <readline.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include "icb.h"
 #include "externs.h"
 
@@ -21,12 +23,12 @@
 rl_vi_editing_mode(); /* default to vi, dammit. */
 gv.editmode = "vi";
 
-editor = (char *)getenv("EDITOR");
+editor = getenv("EDITOR");
 if (!editor)
-	editor = (char *)getenv("VISUAL");
+	editor = getenv("VISUAL");
 
 if (editor != NULL)
-   if (strcmp((char *)basename(editor),"emacs")==0)
+   if (strcmp(basename(editor),"emacs")==0)
    {
 	rl_emacs_editing_mode();
 	gv.editmode = "emacs";
