diff --git a/hstr.pro b/hstr.pro index e4c3343..350c25a 100644 --- a/hstr.pro +++ b/hstr.pro @@ -60,3 +60,7 @@ hstrdebug { QMAKE_CC = ccache gcc } QMAKE_LINK = gcc + +DEFINES += LINUX_KERNEL_6 + +message(DEFINES of hstr.pro build: $$DEFINES) diff --git a/src/hstr.c b/src/hstr.c index 529dc66..ae56552 100644 --- a/src/hstr.c +++ b/src/hstr.c @@ -137,7 +137,7 @@ // major.minor.revision static const char* VERSION_STRING= - "hstr version \"2.6.0\" (2022-12-11T22:00:00)" + "hstr version \"2.7.0\" (2023-03-11T18:15:00)" "\n"; static const char* HSTR_VIEW_LABELS[]={ @@ -190,7 +190,7 @@ static const char* INSTALL_BASH_STRING= "\n READLINE_POINT=${#READLINE_LINE}" "\n}" "\nif [[ $- =~ .*i.* ]]; then bind -x '\"\\C-r\": \"hstrwsl\"'; fi" -#elif defined(__CYGWIN__) +#elif defined(__CYGWIN__) || defined(LINUX_KERNEL_6) "\nfunction hstrcygwin {" "\n offset=${READLINE_POINT}" "\n READLINE_POINT=0" diff --git a/src/hstr_utils.c b/src/hstr_utils.c index cb3b238..a307498 100644 --- a/src/hstr_utils.c +++ b/src/hstr_utils.c @@ -106,7 +106,7 @@ void hstr_chop(char *s) } } -#if !defined(__MS_WSL__) && !defined(__CYGWIN__) && !defined(DEBUG_NO_TIOCSTI) +#if !defined(__MS_WSL__) && !defined(__CYGWIN__) && !defined(LINUX_KERNEL_6) && !defined(DEBUG_NO_TIOCSTI) void tiocsti() { char buf[] = DEFAULT_COMMAND; @@ -120,7 +120,7 @@ void tiocsti() void fill_terminal_input(char* cmd, bool padding) { if(cmd && strlen(cmd)>0) { -#if defined(__MS_WSL__) || defined(__CYGWIN__) || defined(DEBUG_NO_TIOCSTI) +#if defined(__MS_WSL__) || defined(__CYGWIN__) || defined(LINUX_KERNEL_6) || defined(DEBUG_NO_TIOCSTI) fprintf(stderr, "%s", cmd); if(padding) fprintf(stderr, "%s", "\n"); #else