| Date | Thu, 10 Oct 2013 08:43:21 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH 28/52] tools/perf/build: Split out feature check: 'on-exit' |
| |
* Namhyung Kim <namhyung@kernel.org> wrote:
> > diff --git a/tools/perf/config/feature-checks/test-on-exit.c b/tools/perf/config/feature-checks/test-on-exit.c > > new file mode 100644 > > index 0000000..473f1de > > --- /dev/null > > +++ b/tools/perf/config/feature-checks/test-on-exit.c > > @@ -0,0 +1,6 @@ > > +#include <stdio.h> > > + > > +int main(void) > > +{ > > + return on_exit(NULL, NULL); > > +} > > Just a nitpick. The manpage says the on_exit() requires <stdlib.h> > header rather than <stdio.h> and _BSD_SOURCE or _SVID_SOURCE defined. So > I think we can define _GNU_SOURCE before the header file or pass it > through make command line - it'd probably be better for synthesized > test-all.c checking.
This was inherited from the original feature-tests.mak:
define SOURCE_ON_EXIT #include <stdio.h>
int main(void) { return on_exit(NULL, NULL); } endef
So it appears to work in practice, but yes, I agree that this could be cleaned up.
Thanks,
Ingo
|