mirror of
https://github.com/dvorka/hstr.git
synced 2024-11-10 09:03:06 +08:00
Adding LINUX_KERNEL_6 compiler DEFINE to use __CYGWIN__ workaround for missing TIOCSTI #478
This commit is contained in:
parent
88a8496487
commit
65e54153d2
3 changed files with 8 additions and 4 deletions
4
hstr.pro
4
hstr.pro
|
@ -60,3 +60,7 @@ hstrdebug {
|
||||||
QMAKE_CC = ccache gcc
|
QMAKE_CC = ccache gcc
|
||||||
}
|
}
|
||||||
QMAKE_LINK = gcc
|
QMAKE_LINK = gcc
|
||||||
|
|
||||||
|
DEFINES += LINUX_KERNEL_6
|
||||||
|
|
||||||
|
message(DEFINES of hstr.pro build: $$DEFINES)
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
|
|
||||||
// major.minor.revision
|
// major.minor.revision
|
||||||
static const char* VERSION_STRING=
|
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";
|
"\n";
|
||||||
|
|
||||||
static const char* HSTR_VIEW_LABELS[]={
|
static const char* HSTR_VIEW_LABELS[]={
|
||||||
|
@ -190,7 +190,7 @@ static const char* INSTALL_BASH_STRING=
|
||||||
"\n READLINE_POINT=${#READLINE_LINE}"
|
"\n READLINE_POINT=${#READLINE_LINE}"
|
||||||
"\n}"
|
"\n}"
|
||||||
"\nif [[ $- =~ .*i.* ]]; then bind -x '\"\\C-r\": \"hstrwsl\"'; fi"
|
"\nif [[ $- =~ .*i.* ]]; then bind -x '\"\\C-r\": \"hstrwsl\"'; fi"
|
||||||
#elif defined(__CYGWIN__)
|
#elif defined(__CYGWIN__) || defined(LINUX_KERNEL_6)
|
||||||
"\nfunction hstrcygwin {"
|
"\nfunction hstrcygwin {"
|
||||||
"\n offset=${READLINE_POINT}"
|
"\n offset=${READLINE_POINT}"
|
||||||
"\n READLINE_POINT=0"
|
"\n READLINE_POINT=0"
|
||||||
|
|
|
@ -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()
|
void tiocsti()
|
||||||
{
|
{
|
||||||
char buf[] = DEFAULT_COMMAND;
|
char buf[] = DEFAULT_COMMAND;
|
||||||
|
@ -120,7 +120,7 @@ void tiocsti()
|
||||||
void fill_terminal_input(char* cmd, bool padding)
|
void fill_terminal_input(char* cmd, bool padding)
|
||||||
{
|
{
|
||||||
if(cmd && strlen(cmd)>0) {
|
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);
|
fprintf(stderr, "%s", cmd);
|
||||||
if(padding) fprintf(stderr, "%s", "\n");
|
if(padding) fprintf(stderr, "%s", "\n");
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue