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-09-10 18:39:31 +1000
commit828e7cfcf0201d26d8a80110421d7228398079d8 (patch)
treea022237865544490c365722c05b4ad2e0b2de0f9
parent223ad6e57c071645109706ded844e5dc4ffc1672 (diff)
downloadbusybox-w32-828e7cfcf0201d26d8a80110421d7228398079d8.tar.gz
busybox-w32-828e7cfcf0201d26d8a80110421d7228398079d8.tar.bz2
busybox-w32-828e7cfcf0201d26d8a80110421d7228398079d8.zip
win32: add sleep()
-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 44ea2b098..1c923089f 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -261,7 +261,7 @@ NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bu
261NOIMPL(setgid,gid_t gid UNUSED_PARAM); 261NOIMPL(setgid,gid_t gid UNUSED_PARAM);
262NOIMPL(setsid,void); 262NOIMPL(setsid,void);
263NOIMPL(setuid,uid_t gid UNUSED_PARAM); 263NOIMPL(setuid,uid_t gid UNUSED_PARAM);
264NOIMPL(sleep,unsigned int seconds UNUSED_PARAM); 264unsigned int sleep(unsigned int seconds);
265NOIMPL(symlink,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM); 265NOIMPL(symlink,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM);
266static inline void sync(void) {} 266static inline void sync(void) {}
267NOIMPL(vfork,void); 267NOIMPL(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}