Patch looks fine beside one nit.  The behavior above 4294967 seconds
seems to be pretty unexpected, isn't it?

Cheers,
Kai

2018-02-22 22:17 GMT+01:00 Martin Storsjö <mar...@martin.st>:
> Even though the POSIX spec of usleep says that the argument shall
> be less than one million. Most unixes allow it and sleeps for over a
> second if requested (in practice, at least on Linux/glibc and macOS).
>
> Prefer matching other actual implementations (which ignore this
> aspect of the POSIX spec) instead of following the spec strictly.
>
> Signed-off-by: Martin Storsjö <mar...@martin.st>
> ---
>  mingw-w64-crt/misc/mingw_usleep.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/mingw-w64-crt/misc/mingw_usleep.c 
> b/mingw-w64-crt/misc/mingw_usleep.c
> index 2b2dc32..8246e0b 100644
> --- a/mingw-w64-crt/misc/mingw_usleep.c
> +++ b/mingw-w64-crt/misc/mingw_usleep.c
> @@ -10,9 +10,7 @@ int __cdecl usleep (useconds_t);
>  int __cdecl
>  usleep (useconds_t us)
>  {
> -  if (us >= 1000000)
> -    return EINVAL;
> -  else if (us != 0)
> +  if (us != 0)
>      Sleep (us / 1000);
>
>    return 0;
> --
> 2.7.4
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to