diff options
| author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-14 06:55:36 +0200 |
|---|---|---|
| committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-10 18:39:48 +1000 |
| commit | eefbe3a047b640b861f3e78cb036cd70b9c5790e (patch) | |
| tree | ed2f6a78eba2ff0752e3df40a031303ed815cdcb | |
| parent | 96e9babe10af96c6561da220c224b1e94cbfd508 (diff) | |
| download | busybox-w32-eefbe3a047b640b861f3e78cb036cd70b9c5790e.tar.gz busybox-w32-eefbe3a047b640b861f3e78cb036cd70b9c5790e.tar.bz2 busybox-w32-eefbe3a047b640b861f3e78cb036cd70b9c5790e.zip | |
win32: add pipe()
| -rw-r--r-- | include/mingw.h | 2 | ||||
| -rw-r--r-- | win32/mingw.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h index 75f70e5ef..45bd32df1 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
| @@ -256,7 +256,7 @@ IMPL(fsync,int,0,int fd UNUSED_PARAM); | |||
| 256 | NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM); | 256 | NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM); |
| 257 | NOIMPL(link,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM); | 257 | NOIMPL(link,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM); |
| 258 | NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); | 258 | NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); |
| 259 | NOIMPL(pipe,int filedes[2] UNUSED_PARAM); | 259 | int pipe(int filedes[2]); |
| 260 | NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM); | 260 | NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM); |
| 261 | NOIMPL(setgid,gid_t gid UNUSED_PARAM); | 261 | NOIMPL(setgid,gid_t gid UNUSED_PARAM); |
| 262 | NOIMPL(setsid,void); | 262 | NOIMPL(setsid,void); |
diff --git a/win32/mingw.c b/win32/mingw.c index 020e9c420..09d746f21 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
| @@ -55,3 +55,10 @@ int gettimeofday(struct timeval *tv, void *tz) | |||
| 55 | tv->tv_usec = st.wMilliseconds*1000; | 55 | tv->tv_usec = st.wMilliseconds*1000; |
| 56 | return 0; | 56 | return 0; |
| 57 | } | 57 | } |
| 58 | |||
| 59 | int pipe(int filedes[2]) | ||
| 60 | { | ||
| 61 | if (_pipe(filedes, PIPE_BUF, 0) < 0) | ||
| 62 | return -1; | ||
| 63 | return 0; | ||
| 64 | } | ||
