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-09-10 18:39:48 +1000
commiteefbe3a047b640b861f3e78cb036cd70b9c5790e (patch)
treeed2f6a78eba2ff0752e3df40a031303ed815cdcb
parent96e9babe10af96c6561da220c224b1e94cbfd508 (diff)
downloadbusybox-w32-eefbe3a047b640b861f3e78cb036cd70b9c5790e.tar.gz
busybox-w32-eefbe3a047b640b861f3e78cb036cd70b9c5790e.tar.bz2
busybox-w32-eefbe3a047b640b861f3e78cb036cd70b9c5790e.zip
win32: add pipe()
-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 75f70e5ef..45bd32df1 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -256,7 +256,7 @@ IMPL(fsync,int,0,int fd UNUSED_PARAM);
256NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM); 256NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM);
257NOIMPL(link,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM); 257NOIMPL(link,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM);
258NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); 258NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM);
259NOIMPL(pipe,int filedes[2] UNUSED_PARAM); 259int pipe(int filedes[2]);
260NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM); 260NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM);
261NOIMPL(setgid,gid_t gid UNUSED_PARAM); 261NOIMPL(setgid,gid_t gid UNUSED_PARAM);
262NOIMPL(setsid,void); 262NOIMPL(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}