diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-02-02 15:53:01 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-02-02 15:53:01 +0000 |
| commit | 8e6a6312552343aec7f5cde795ef0a11ef83b8ff (patch) | |
| tree | a79bdb0b79518ae065bc762f06f28d9eb742d5f6 /include | |
| parent | 74ee6e70c9a4f7822e7461069579c4e6ef0a2f04 (diff) | |
| download | busybox-w32-8e6a6312552343aec7f5cde795ef0a11ef83b8ff.tar.gz busybox-w32-8e6a6312552343aec7f5cde795ef0a11ef83b8ff.tar.bz2 busybox-w32-8e6a6312552343aec7f5cde795ef0a11ef83b8ff.zip | |
win32: add support for /dev/std{in,out,err}
Allow applets to open the "files" /dev/stdin, /dev/stdout and
/dev/stderr. The 'stat' and 'ls' applets pretend they exist.
Adds 48-56 bytes.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mingw.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/mingw.h b/include/mingw.h index 1dcaabbe1..93b57ea29 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
| @@ -514,8 +514,12 @@ int fsync(int fd); | |||
| 514 | int kill(pid_t pid, int sig); | 514 | int kill(pid_t pid, int sig); |
| 515 | int link(const char *oldpath, const char *newpath); | 515 | int link(const char *oldpath, const char *newpath); |
| 516 | NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); | 516 | NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); |
| 517 | /* order of devices must match that in get_dev_type */ | 517 | /* Order of devices must match that in get_dev_type and stdin, |
| 518 | enum {DEV_NULL, DEV_TTY, DEV_ZERO, DEV_URANDOM, NOT_DEVICE = -1}; | 518 | * stdout and stderr must match their file descriptors. */ |
| 519 | enum { | ||
| 520 | DEV_STDIN, DEV_STDOUT, DEV_STDERR, DEV_NULL, DEV_TTY, | ||
| 521 | DEV_ZERO, DEV_URANDOM, NOT_DEVICE = -1 | ||
| 522 | }; | ||
| 519 | int get_dev_type(const char *filename); | 523 | int get_dev_type(const char *filename); |
| 520 | void update_special_fd(int dev, int fd); | 524 | void update_special_fd(int dev, int fd); |
| 521 | int mingw_open (const char *filename, int oflags, ...); | 525 | int mingw_open (const char *filename, int oflags, ...); |
