Re: Please vote: should we fix or drop the usleep() function?

Yongwei Wu <[email protected]> Fri, 21 Nov 2014 14:55:53 +0800
Newsgroups gmane.comp.gnu.mingw.devel
Message-ID <CADs46icOG8n8JM6-E+tyLi8xR-PcT-XFSC_v1crcu+w_AYY4iw@mail.gmail.com>
Why breaking something already working (mostly)? I do not see Cygwin
or Linux is dropping usleep.

We could even leave it as it is, since it is no longer standard
(though fixing something is always good, esp. if it is easy). I guess
no one is actually checking the return value of usleep, anyway.

My 2 cents.

On 21 November 2014 00:41, Keith Marshall
<[email protected]> wrote:
> Guys,
>
> Looking in ChangeLog, I see that (a broken) implementation of usleep()
> was added to mingwrt in 2008, just about the time that POSIX.1003-1
> dropped it, and removed all references to it from the standard.  So...
>
> 1) Should we go along with POSIX, and similarly drop it, or...
> 2) Retain it, but mark it as deprecated?
>
> I'm of two minds, but if we do decide on (2), then we should also fix
> the currently broken error return; those earlier versions of POSIX which
> did specify it said that it *may* fail if the requested delay is
> 1,000,000 microseconds or more, it which case it should set errno to
> EINVAL, and return -1; our implementation does not set errno, but
> returns EINVAL instead of -1.
>
> Furthermore, if we do vote to keep usleep(), it seems kind of anomalous
> that we don't also provide an implementation of sleep(), (which remains
> a mandatory POSIX function today).
>
> Thoughts?
>
> --
> Regards,
> Keith.
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> MinGW-dvlpr mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-dvlpr



-- 
Wu Yongwei
URL: http://wyw.dcweb.cn/

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk