mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
[input] windows: don't try to make a pipe
This commit is contained in:
parent
f6b06c3bfd
commit
05635aa60d
12
src/lib/in.c
12
src/lib/in.c
@ -439,8 +439,12 @@ prep_special_keys(inputctx* ictx){
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
endpipes(int pipes[static 2]){
|
endpipes(int pipes[static 2]){
|
||||||
close(pipes[0]);
|
if(pipes[0] >= 0){
|
||||||
close(pipes[1]);
|
close(pipes[0]);
|
||||||
|
}
|
||||||
|
if(pipes[1] >= 0){
|
||||||
|
close(pipes[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -454,6 +458,7 @@ mark_pipe_ready(int pipes[static 2]){
|
|||||||
// only linux and freebsd13+ have eventfd(), so we'll fall back to pipes sigh.
|
// only linux and freebsd13+ have eventfd(), so we'll fall back to pipes sigh.
|
||||||
static int
|
static int
|
||||||
getpipes(int pipes[static 2]){
|
getpipes(int pipes[static 2]){
|
||||||
|
#ifndef __MINGW64__
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
if(pipe2(pipes, O_CLOEXEC | O_NONBLOCK)){
|
if(pipe2(pipes, O_CLOEXEC | O_NONBLOCK)){
|
||||||
logerror("couldn't get pipes (%s)\n", strerror(errno));
|
logerror("couldn't get pipes (%s)\n", strerror(errno));
|
||||||
@ -475,6 +480,9 @@ getpipes(int pipes[static 2]){
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// FIXME what to do on windows?
|
// FIXME what to do on windows?
|
||||||
|
#endif
|
||||||
|
#else // windows
|
||||||
|
pipes[0] = pipes[1] = -1;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user