getch name conflict on windows platform
authorMarkus Bröker <mbroeker@largo.dyndns.tv>
Thu, 16 Apr 2009 12:49:12 +0200
changeset 52 1fa566e9d13f
parent 51 a03372ef9714
child 53 6b3d7e3418c1
getch name conflict on windows platform * ::getch works for c++ in db_bridge, not here. committer: Markus Bröker <mbroeker@largo.homelinux.org>
libConsole/getch.c
--- 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 ();
 }