public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] m4: Fix warnings
Date: Mon, 24 Jan 2022 18:18:36 +0100	[thread overview]
Message-ID: <Ye7fbKjqzR0Vf3J+@pevik> (raw)
In-Reply-To: <Ye7CwmegfyHXgN2N@yuki>

Hi Cyril,

thx for looking into this.

> Hi!
> > diff --git a/m4/ltp-eventfd.m4 b/m4/ltp-eventfd.m4
> > index 5d729a33d..580df00a3 100644
> > --- a/m4/ltp-eventfd.m4
> > +++ b/m4/ltp-eventfd.m4
> > @@ -12,12 +12,10 @@ AC_DEFUN([LTP_CHECK_SYSCALL_EVENTFD], [
> >  		AC_SUBST(AIO_LIBS, "-laio")

> >  		AC_MSG_CHECKING([io_set_eventfd is defined in aio library or aio header])
> > -		AC_TRY_LINK([#include <stdio.h>
> > +		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
> >                               #include <libaio.h>
> > -		            ],
> > -		            [io_set_eventfd(NULL, 0); return 0;],
> > +		            ]], [[io_set_eventfd(NULL, 0); return 0;]])],
> >  		            [AC_DEFINE(HAVE_IO_SET_EVENTFD, 1, [Define to 1 if you have `io_set_eventfd' function.])
> > -						AC_MSG_RESULT(yes)],
> > -		            [AC_MSG_RESULT(no)])
> > +						AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])

> Shouldn't we convert this bit into AC_CHECK_FUNCS() (in a separte patch)?
Ah, thx for catching this.

> > +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
> > +		#include <linux/perf_event.h>]], [[
> >  			struct perf_event_attr pe;
> > -		],
> > -		AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> > +		]])],[AC_DEFINE(HAVE_PERF_EVENT_ATTR) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])

> And this one with AC_CHECK_TYPES()?
+1

> > -AC_TRY_LINK([#define _GNU_SOURCE
> > -             #include <math.h>],
> > -            [
> > +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
> > +             #include <math.h>]], [[
> >               volatile float val;
> >               exp10(val);
> > -            ],
> > -             AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
> > +            ]])],[AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
> >  LIBS="$backup_ldlibs"
> >  ])

> Similarily here AC_CHECK_FUNCS()?
+1

I'll recheck all of AC_LINK_IFELSE, AC_COMPILE_IFELSE before posting next
version.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-01-24 17:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08  8:26 [LTP] [PATCH 1/1] m4: Fix warnings Petr Vorel
2021-12-09  9:42 ` xuyang2018.jy
2021-12-09 11:19   ` Petr Vorel
2022-01-24 15:11   ` Cyril Hrubis
2022-01-25  1:27     ` xuyang2018.jy
2022-01-24 15:16 ` Cyril Hrubis
2022-01-24 17:18   ` Petr Vorel [this message]
2022-01-25 17:09   ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ye7fbKjqzR0Vf3J+@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox