Cygwin.
2024-06-08 Bruno Haible
usleep tests: Avoid failure due to known Cygwin 3.5.3 bug.
* modules/usleep-tests (Depends-on): Add test-xfail.
(Makefile.am): Don't test test-usleep on Cygwin.
diff --git a/modules/usleep-tests b/modules/usleep-tests
index 531c685eb5..f77e
In a CI run of libunistring (on GitHub), I see a test failure:
../../tests/test-usleep.c:35: assertion 'start < time (NULL)' failed
FAIL test-usleep.exe (exit status: 134)
This is the failing code:
time_t start = time (NULL);
ASSERT (usleep (100) == 0);
ASSERT (start
The usleep() emulation on MSVC has a resolution of 1 second only.
This patch improves it, to have a resolution of 15 milliseconds.
2019-07-02 Bruno Haible
usleep: Implement with millisecond resolution on native Windows.
* lib/usleep.c (usleep): On native Windows, implement
On Wed, Apr 23, 2014 at 08:38:07PM -0600, Eric Blake wrote:
> On 04/23/2014 04:26 AM, Daniel P. Berrange wrote:
> > The gnulib usleep replacement says
> >
> > /* This file is _intentionally_ light-weight. Rather than using
> > select or nanosleep, both of which
On 04/23/2014 04:26 AM, Daniel P. Berrange wrote:
> The gnulib usleep replacement says
>
> /* This file is _intentionally_ light-weight. Rather than using
> select or nanosleep, both of which drag in external libraries on
> some platforms, this merely rounds up to the
On 04/23/2014 04:26 AM, Daniel P. Berrange wrote:
> The gnulib usleep replacement says
>
> /* This file is _intentionally_ light-weight. Rather than using
> select or nanosleep, both of which drag in external libraries on
> some platforms, this merely rounds up to the
The gnulib usleep replacement says
/* This file is _intentionally_ light-weight. Rather than using
select or nanosleep, both of which drag in external libraries on
some platforms, this merely rounds up to the nearest second if
usleep() does not exist. If sub-second resolution
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Eric Blake on 11/18/2009 10:16 PM:
> At any rate, here's what I'm now testing, it has passed on cygwin, 64-bit
> Linux, and Solaris. The nanosleep code is a complete rewrite, and is
> actually lighter-weight (no need to use clock_gettime)
(limit);
+ if (result)
+return seconds + result;
+}
+ return sleep (seconds);
+}
+
+#else /* !HAVE_SLEEP */
#error "Please port gnulib sleep.c to your platform, possibly using usleep()
or select(), then report this to bug-gnulib."
diff --git a/lib/unistd.in.h b/lib/un
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Ludovic Courtès on 11/18/2009 4:35 PM:
>> +{
>> + seconds -= limit;
>> + unsigned int result = sleep (limit);
>
> This declaration-after-statement is a C99 thing. Isn’t it something
> usually avoided in Gnulib?
Yep. I'll
Hi,
Eric Blake writes:
> +unsigned int
> +rpl_sleep (unsigned int seconds)
> +{
> + const unsigned int limit = 49 * 24 * 60 * 60;
> + while (limit < seconds)
> +{
> + seconds -= limit;
> + unsigned int result = sleep (limit);
This declaration-after-statement is a C99 thing. Isn
Eric Blake byu.net> writes:
> I'm pushing this. Most systems these days still support usleep, even
> though POSIX no longer requires it; even mingw has it; so the few
> platforms where this implementation rounds up to the ceiling of the next
> second should be rare (still co
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Eric Blake on 11/14/2009 6:18 AM:
> I'm also thinking of adding a usleep module to guarantee Linux semantics
> (usleep(100) waits a second, rather than failing instantly with
> EINVAL). That will clean up its use
13 matches
Mail list logo