getch name conflict on windows platform
* ::getch works for c++ in db_bridge, not here.
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- a/libConsole/getch.c
+++ b/libConsole/getch.c
@@ -5,12 +5,12 @@
#ifdef WIN32
#include <conio.h>
-int getch ()
+int cross_getch ()
{
int ch = -1;
while (!kbhit ()) {
- ch =::getch ();
+ ch = getch ();
}
return ch;
@@ -19,7 +19,7 @@
#else
#include <termios.h>
-int getch ()
+int cross_getch ()
{
int ch = -1, fd = 0;
struct termios neu, alt;
@@ -37,5 +37,5 @@
JNIEXPORT jint JNICALL Java_Console_getch (JNIEnv * env, jclass lass)
{
- return getch ();
+ return cross_getch ();
}