aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-14 06:55:36 +0200
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-20 19:14:02 +0200
commit5963dfebf78dfb59bcb3914bd34ba78113537c4a (patch)
tree02b42502185a257d0c19cdbe96f56220c8b236ba
parent95715408fd5020d0fa63fac3e2c338c7c8dc7c31 (diff)
downloadbusybox-w32-5963dfebf78dfb59bcb3914bd34ba78113537c4a.tar.gz
busybox-w32-5963dfebf78dfb59bcb3914bd34ba78113537c4a.tar.bz2
busybox-w32-5963dfebf78dfb59bcb3914bd34ba78113537c4a.zip
win32: add pipe()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
-rw-r--r--include/mingw.h2
-rw-r--r--win32/mingw.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index ccf3060e7..b946d3d81 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -257,7 +257,7 @@ IMPL(fsync,int,0,int fd UNUSED_PARAM);
257NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM); 257NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM);
258NOIMPL(link,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM); 258NOIMPL(link,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM);
259NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); 259NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM);
260NOIMPL(pipe,int filedes[2] UNUSED_PARAM); 260int pipe(int filedes[2]);
261NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM); 261NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM);
262NOIMPL(setgid,gid_t gid UNUSED_PARAM); 262NOIMPL(setgid,gid_t gid UNUSED_PARAM);
263NOIMPL(setsid,void); 263NOIMPL(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
59int pipe(int filedes[2])
60{
61 if (_pipe(filedes, PIPE_BUF, 0) < 0)
62 return -1;
63 return 0;
64}