5 dnl Check whether struct dirent has a member named d_ino.
8 # Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2011 Free Software
11 # This file is free software; the Free Software Foundation
12 # gives unlimited permission to copy and/or distribute it,
13 # with or without modifications, as long as this notice is preserved.
15 AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
16 [AC_CACHE_CHECK([for d_ino member in directory struct],
17 gl_cv_struct_dirent_d_ino,
20 [[#include <sys/types.h>
24 [[DIR *dp = opendir (".");
32 if (stat (e->d_name, &st) != 0)
34 if (e->d_ino != st.st_ino)
38 [gl_cv_struct_dirent_d_ino=yes],
39 [gl_cv_struct_dirent_d_ino=no],
40 [gl_cv_struct_dirent_d_ino=no])])
41 if test $gl_cv_struct_dirent_d_ino = yes; then
42 AC_DEFINE([D_INO_IN_DIRENT], [1],
43 [Define if struct dirent has a member d_ino that actually works.])