Fixes: debbugs:17865
[bpt/emacs.git] / src / w32select.c
index 66f9f7a..2ae2585 100644 (file)
@@ -1,6 +1,6 @@
 /* Selection processing for Emacs on the Microsoft Windows API.
 
-Copyright (C) 1993-1994, 2001-201 Free Software Foundation, Inc.
+Copyright (C) 1993-1994, 2001-2014 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -74,13 +74,19 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include "lisp.h"
+#include "w32common.h" /* os_subtype */
 #include "w32term.h"   /* for all of the w32 includes */
-#include "w32heap.h"   /* os_subtype */
+#include "keyboard.h"
 #include "blockinput.h"
 #include "charset.h"
 #include "coding.h"
 #include "composite.h"
 
+#ifdef CYGWIN
+#include <string.h>
+#include <stdio.h>
+#define _memccpy memccpy
+#endif
 
 static HGLOBAL convert_to_handle_as_ascii (void);
 static HGLOBAL convert_to_handle_as_coded (Lisp_Object coding_system);
@@ -388,7 +394,6 @@ run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg)
      with global variables and calling strange looking functions.  Is
      this really the right way to run Lisp callbacks?  */
 
-  extern int waiting_for_input; /* from keyboard.c */
   int owfi;
 
   block_input ();