[cairo] [PATCH 3/4] test: Only use alarm() when SIGALRM is also defined
chris at chris-wilson.co.uk
Tue Apr 10 04:11:22 PDT 2012
On Tue, 10 Apr 2012 10:02:10 +0200, Uli Schlachter <psychon at znc.in> wrote:
> 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))
> > #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 Wilson, Intel Open Source Technology Centre
More information about the cairo