3 # Copyright (C) 2009 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 AC_DEFUN([gl_FUNC_STAT],
11 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
12 AC_REQUIRE([gl_AC_DOS])
13 AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
14 dnl mingw is the only known platform where stat(".") and stat("./") differ
15 AC_CACHE_CHECK([whether stat handles trailing slashes],
16 [gl_cv_func_stat_works],
19 [[#include <sys/stat.h>
20 ]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])],
21 [gl_cv_func_stat_works=yes], [gl_cv_func_stat_works=no],
23 mingw*) gl_cv_func_stat_works="guessing no";;
24 *) gl_cv_func_stat_works="guessing yes";;
26 case $gl_cv_func_stat_works in