compat/terminal: header-fixup
authorErik Faye-Lund <kusmabite@gmail.com>
Mon, 25 Jun 2012 14:13:59 +0000 (25 16:13 +0200)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Mon, 22 Oct 2012 12:31:43 +0000 (22 13:31 +0100)
getch is declared in conio.h, which was only included from
compat/mingw.c and compat/msvc.c.

Fix this, by moving the inclusion of getch to git-compat-util.h
instead.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
compat/mingw.c
compat/msvc.c
git-compat-util.h

index ecbfa6e..1eb974f 100644 (file)
@@ -1,6 +1,5 @@
 #include "../git-compat-util.h"
 #include "win32.h"
-#include <conio.h>
 #include <wchar.h>
 #include "../strbuf.h"
 #include "../run-command.h"
index 71843d7..a3a4e0e 100644 (file)
@@ -1,6 +1,5 @@
 #include "../git-compat-util.h"
 #include "win32.h"
-#include <conio.h>
 #include "../strbuf.h"
 
 #include "mingw.c"
index e6f12cc..6429352 100644 (file)
@@ -90,6 +90,7 @@
 #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */
 #include <winsock2.h>
 #include <windows.h>
+#include <conio.h>
 #endif
 
 #include <unistd.h>