From 416378f1ae4dde355dec48758045ca7e4e165850 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Wed, 14 Apr 2010 06:53:48 +0200 Subject: win32: add sleep() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy --- include/mingw.h | 2 +- win32/mingw.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 NOIMPL(setgid,gid_t gid UNUSED_PARAM); NOIMPL(setsid,void); NOIMPL(setuid,uid_t gid UNUSED_PARAM); -NOIMPL(sleep,unsigned int seconds UNUSED_PARAM); +unsigned int sleep(unsigned int seconds); NOIMPL(symlink,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM); static inline void sync(void) {} NOIMPL(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 @@ #include "libbb.h" unsigned int _CRT_fmode = _O_BINARY; + +unsigned int sleep (unsigned int seconds) +{ + Sleep(seconds*1000); + return 0; +} -- cgit v1.2.3-55-g6feb