aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-14 06:53:48 +0200
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-20 19:14:01 +0200
commit416378f1ae4dde355dec48758045ca7e4e165850 (patch)
treebf531439f2b0193bc8cf08a2927fab01aeccc375
parent1003a90e99874a6ffe44bf1f55dcc7ec3f19e70d (diff)
downloadbusybox-w32-416378f1ae4dde355dec48758045ca7e4e165850.tar.gz
busybox-w32-416378f1ae4dde355dec48758045ca7e4e165850.tar.bz2
busybox-w32-416378f1ae4dde355dec48758045ca7e4e165850.zip
win32: add sleep()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
-rw-r--r--include/mingw.h2
-rw-r--r--win32/mingw.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index aa208cdcb..3b7aa9469 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -262,7 +262,7 @@ NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bu
262NOIMPL(setgid,gid_t gid UNUSED_PARAM); 262NOIMPL(setgid,gid_t gid UNUSED_PARAM);
263NOIMPL(setsid,void); 263NOIMPL(setsid,void);
264NOIMPL(setuid,uid_t gid UNUSED_PARAM); 264NOIMPL(setuid,uid_t gid UNUSED_PARAM);
265NOIMPL(sleep,unsigned int seconds UNUSED_PARAM); 265unsigned int sleep(unsigned int seconds);
266NOIMPL(symlink,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM); 266NOIMPL(symlink,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM);
267static inline void sync(void) {} 267static inline void sync(void) {}
268NOIMPL(vfork,void); 268NOIMPL(vfork,void);
diff --git a/win32/mingw.c b/win32/mingw.c
index a85d81a2c..b92fa82a5 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -1,3 +1,9 @@
1#include "libbb.h" 1#include "libbb.h"
2 2
3unsigned int _CRT_fmode = _O_BINARY; 3unsigned int _CRT_fmode = _O_BINARY;
4
5unsigned int sleep (unsigned int seconds)
6{
7 Sleep(seconds*1000);
8 return 0;
9}