dnl Check whether the st_ino and st_dev stat fields taken together uniquely dnl identify the file within the system. This is should be true for POSIX dnl systems; it is known to be false on mingw32. AC_DEFUN([LIBGFOR_CHECK_WORKING_STAT], [ AC_CACHE_CHECK([whether the target stat is reliable], libgfor_cv_have_working_stat, [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #include int main () { FILE *f, *g; struct stat st1, st2; f = fopen ("foo", "w"); g = fopen ("bar", "w"); if (stat ("foo", &st1) != 0 || stat ("bar", &st2)) return 1; if (st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino) return 1; fclose(f); fclose(g); return 0; }]])], libgfor_cv_have_working_stat=yes, libgfor_cv_have_working_stat=no, [