$NetBSD: patch-ak,v 1.6 2017/05/07 06:49:23 tsutsui Exp $

- use standard headers
- don't declare own errno
- declare external symbols properly

--- src/keyboard.c.orig	1995-02-03 01:21:28.000000000 +0000
+++ src/keyboard.c
@@ -53,6 +53,7 @@ the Free Software Foundation, 675 Mass A
 
 #include <config.h>
 #include <stdio.h>
+#include <stdlib.h>
 #undef NULL
 #include "termchar.h"
 #include "termopts.h"
@@ -63,6 +64,7 @@ the Free Software Foundation, 675 Mass A
 #include "termhooks.h"
 #endif
 #include "macros.h"
+#include "process.h"
 #include "frame.h"
 #include "window.h"
 #include "commands.h"
@@ -100,8 +102,6 @@ the Free Software Foundation, 675 Mass A
 /* Include systime.h after xterm.h to avoid double inclusion of time.h. */
 #include "systime.h"
 
-extern int errno;
-
 /* Variables for blockinput.h: */
 
 /* Non-zero if interrupt input is blocked right now.  */
@@ -301,7 +301,7 @@ Lisp_Object Vlast_event_frame;
 
 /* The timestamp of the last input event we received from the X server.
    X Windows wants this for selection ownership.  */
-unsigned long last_event_timestamp;
+extern unsigned long last_event_timestamp;
 
 Lisp_Object Qself_insert_command;
 Lisp_Object Qforward_char;
@@ -582,8 +582,7 @@ echo_prompt (str)
    C can be a character, which is printed prettily ("M-C-x" and all that
    jazz), or a symbol, whose name is printed.  */
 
-echo_char (c)
-     Lisp_Object c;
+static void echo_char(Lisp_Object c)
 {
   extern char *push_key_description ();
 
@@ -629,7 +628,7 @@ echo_char (c)
 /* Temporarily add a dash to the end of the echo string if it's not
    empty, so that it serves as a mini-prompt for the very next character.  */
 
-echo_dash ()
+static void echo_dash (void)
 {
   if (!immediate_echo && echoptr == echobuf)
     return;
@@ -3570,7 +3569,7 @@ gobble_input (expected)
 /* Put a buffer_switch_event in the buffer
    so that read_key_sequence will notice the new current buffer.  */
 
-record_asynch_buffer_change ()
+void record_asynch_buffer_change(void)
 {
   struct input_event event;
   Lisp_Object tem;
@@ -5633,7 +5632,6 @@ On such systems, Emacs starts a subshell
   int old_height, old_width;
   int width, height;
   struct gcpro gcpro1, gcpro2;
-  extern init_sys_modes ();
 
   if (!NILP (stuffstring))
     CHECK_STRING (stuffstring, 0);
