From d908ce8eefc436bb4fe61143c66d100c63e06e89 Mon Sep 17 00:00:00 2001 From: Kolja Waschk Date: Tue, 23 Dec 2008 22:14:13 +0000 Subject: [PATCH] Do not define usleep() in sysdep. Include unistd.h with it git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1414 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 6 ++++++ jtag/src/cmd/usleep.c | 2 ++ jtag/sysdep.h | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index eb26a776..72ec4c60 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,9 @@ +2008-12-23 Kolja Waschk + + * src/cmd/usleep.c, sysdep.h: usleep() is declared in + unistd.h, also present in modern MinGW environments. + Defining it in sysdep.h collides with unistd.h. + 2008-12-22 Arnim Laeuger * src/tap/cable/usbblaster.c: diff --git a/jtag/src/cmd/usleep.c b/jtag/src/cmd/usleep.c index 07ff4f44..c2dd8c3e 100644 --- a/jtag/src/cmd/usleep.c +++ b/jtag/src/cmd/usleep.c @@ -24,6 +24,8 @@ #include "sysdep.h" +#include + #include #include diff --git a/jtag/sysdep.h b/jtag/sysdep.h index 52feb74d..f6c6db6d 100644 --- a/jtag/sysdep.h +++ b/jtag/sysdep.h @@ -48,7 +48,6 @@ #include #define geteuid() 0 #define getuid() 0 -#define usleep(x) Sleep(x/1E3) #endif #endif /* SYSDEP_H */