# HG changeset patch # User Markus Bröker # Date 1239878952 -7200 # Node ID 1fa566e9d13f19076abb3359f7622273dae8b88c # Parent a03372ef97141e0420add6b9434ce945b9055bdd getch name conflict on windows platform * ::getch works for c++ in db_bridge, not here. committer: Markus Bröker diff --git a/libConsole/getch.c b/libConsole/getch.c --- a/libConsole/getch.c +++ b/libConsole/getch.c @@ -5,12 +5,12 @@ #ifdef WIN32 #include -int getch () +int cross_getch () { int ch = -1; while (!kbhit ()) { - ch =::getch (); + ch = getch (); } return ch; @@ -19,7 +19,7 @@ #else #include -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 (); }