Fix compile (nw)

This commit is contained in:
Miodrag Milanovic 2016-10-07 14:56:47 +02:00
parent 70ba5627a7
commit 31c8b10479
3 changed files with 32 additions and 7 deletions

View File

@ -924,8 +924,10 @@ static struct termios orig_termios; /* in order to restore at exit */
static KillRing killRing; static KillRing killRing;
//static int rawmode = 0; /* for atexit() function to check if restore is needed*/ #ifndef _WIN32
//static int atexit_registered = 0; /* register atexit just 1 time */ static int rawmode = 0; /* for atexit() function to check if restore is needed*/
static int atexit_registered = 0; /* register atexit just 1 time */
#endif
static int historyMaxLen = LINENOISE_DEFAULT_HISTORY_MAX_LEN; static int historyMaxLen = LINENOISE_DEFAULT_HISTORY_MAX_LEN;
static int historyLen = 0; static int historyLen = 0;
static int historyIndex = 0; static int historyIndex = 0;
@ -937,8 +939,9 @@ static char8_t** history = NULL;
// and zero is a valid index (so -1 is a valid "previous index") // and zero is a valid index (so -1 is a valid "previous index")
static int historyPreviousIndex = -2; static int historyPreviousIndex = -2;
static bool historyRecallMostRecent = false; static bool historyRecallMostRecent = false;
#ifndef _WIN32
//static void linenoiseAtExit(void); static void linenoiseAtExit(void);
#endif
static bool isUnsupportedTerm(void) { static bool isUnsupportedTerm(void) {
char* term = getenv("TERM"); char* term = getenv("TERM");
@ -1026,8 +1029,9 @@ static void disableRawMode(void) {
} }
// At exit we'll try to fix the terminal to the initial conditions // At exit we'll try to fix the terminal to the initial conditions
//static void linenoiseAtExit(void) { disableRawMode(); } #ifndef _WIN32
static void linenoiseAtExit(void) { disableRawMode(); }
#endif
static int getScreenColumns(void) { static int getScreenColumns(void) {
int cols; int cols;
#ifdef _WIN32 #ifdef _WIN32
@ -3326,7 +3330,7 @@ void linenoisePrintKeyCodes(void) {
char c; char c;
int nread; int nread;
#if _WIN32 #ifdef _WIN32
nread = _read(STDIN_FILENO, &c, 1); nread = _read(STDIN_FILENO, &c, 1);
#else #else
nread = read(STDIN_FILENO, &c, 1); nread = read(STDIN_FILENO, &c, 1);

View File

@ -1473,3 +1473,23 @@ end
} }
end end
--------------------------------------------------
-- linenoise-ng library
--------------------------------------------------
project "linenoise-ng"
uuid "7320ffc8-2748-4add-8864-ae29b72a8511"
kind (LIBTYPE)
addprojectflags()
includedirs {
MAME_DIR .. "3rdparty/linenoise-ng/include",
}
files {
MAME_DIR .. "3rdparty/linenoise-ng/src/ConvertUTF.cpp",
MAME_DIR .. "3rdparty/linenoise-ng/src/linenoise.cpp",
MAME_DIR .. "3rdparty/linenoise-ng/src/wcwidth.cpp",
}

View File

@ -13,6 +13,7 @@
#pragma clang diagnostic ignored "-Winconsistent-missing-override" #pragma clang diagnostic ignored "-Winconsistent-missing-override"
#elif defined(__GNUC__) #elif defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wsuggest-override" #pragma GCC diagnostic ignored "-Wsuggest-override"
#pragma GCC diagnostic ignored "-Wunused-variable"
#endif #endif
#define ASIO_STANDALONE #define ASIO_STANDALONE