On Thursday, January 20, 2011 19:23:17 Karel Zak wrote: > On Thu, Jan 20, 2011 at 06:50:03PM -0500, Mike Frysinger wrote: > > On Thursday, January 20, 2011 18:45:28 Karel Zak wrote: > > > On Tue, Jan 18, 2011 at 05:47:01PM +0100, Fabian Groffen wrote: > > > > +have_dirfd= > > > > +AC_MSG_CHECKING([for dirfd]) > > > > +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ > > > > +#include <dirent.h> > > > > +]],[[ > > > > + DIR *dir = 0; > > > > + if (dirfd(dir)) ; > > > > +]])], [have_dirfd=yes], [have_dirfd=no]) > > > > +AC_MSG_RESULT([$have_dirfd]) > > > > > > What about: > > > > > > AC_CHECK_FUNCS(dirfd) > > > AC_CHECK_DECLS([dirfd], , , > > > > > > [#include <sys/types.h> > > > > > > #include <dirent.h>]) > > > > i think macros would confuse these checks ? > > AC_CHECK_DECLS generates: > > int > main () > { > #ifndef dirfd > #ifdef __cplusplus > (void) dirfd; > #else > (void) dirfd; > #endif > #endif > } ah, so it should be OK > BTW gnulib has dirfd.m4, but it seems like overkill for us. if it were just the .m4, i'd be for it, but importing the whole module does seem like overkill -mike
Attachment:
signature.asc
Description: This is a digitally signed message part.