Re: [PATCH 3/4] test: Only use alarm() when SIGALRM is also defined
Chris Wilson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <1334056286_344116@CP5-2952> |
On Tue, 10 Apr 2012 10:02:10 +0200, Uli Schlachter <[email protected]> wrote: > Hi, > > On 09.04.2012 21:33, Maarten Bosmans wrote: > > On some platforms (mingw) the alarm() configure check succeeds, but the > > alarm function doesn't actually work. > > --- > > test/cairo-test.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/test/cairo-test.c b/test/cairo-test.c > > index c5ef843..3f37147 100644 > > --- a/test/cairo-test.c > > +++ b/test/cairo-test.c > > @@ -90,7 +90,7 @@ > > #define ARRAY_SIZE(A) (sizeof(A) / sizeof (A[0])) > > #endif > > > > -#if ! HAVE_ALARM > > +#if ! HAVE_ALARM || ! defined(SIGALRM) > > #define alarm(X); > > #endif > > What exactly does "doesn't actually work" mean? If no SIGALRM is raised (in > other words: alarm() doesn't actually work and is a no-op), then what is the > problem that this patch solves? > > Besides that, this series looks good to me. Looks fine to me, no point in setting an alarm if we don't hook into the signal as well. The worst that could happen is the program aborts. -Chris -- Chris Wilson, Intel Open Source Technology Centre -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo