mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibCore: Implement System::isatty on Windows
Also fixes a bug introduced in 642b7b6a5e
: Core::System functions
expect a handle now, so we have to use _get_osfhandle in STD*_FILENO.
This commit is contained in:
parent
c286d38765
commit
2ac53794c3
Notes:
github-actions[bot]
2025-04-13 16:20:27 +00:00
Author: https://github.com/stasoid
Commit: 2ac53794c3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3588
Reviewed-by: https://github.com/ADKaster ✅
3 changed files with 10 additions and 5 deletions
|
@ -33,7 +33,11 @@
|
|||
# include <utime.h>
|
||||
#else
|
||||
# include "SocketAddressWindows.h"
|
||||
# include <io.h>
|
||||
# define O_CLOEXEC O_NOINHERIT
|
||||
# define STDIN_FILENO _get_osfhandle(_fileno(stdin))
|
||||
# define STDOUT_FILENO _get_osfhandle(_fileno(stdout))
|
||||
# define STDERR_FILENO _get_osfhandle(_fileno(stderr))
|
||||
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
||||
using sighandler_t = void (*)(int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue