aboutsummaryrefslogtreecommitdiff
path: root/gold/configure.ac
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-11-06 15:47:06 +0000
committerIan Lance Taylor <ian@airs.com>2009-11-06 15:47:06 +0000
commit5d329b7db9afec533616070131d7bde5fe4b71fa (patch)
treebd5989a99f82204242b7612863579103c332f219 /gold/configure.ac
parentdec397b2dec7738549bcb998dd64df8946bbd0d1 (diff)
downloadgdb-5d329b7db9afec533616070131d7bde5fe4b71fa.zip
gdb-5d329b7db9afec533616070131d7bde5fe4b71fa.tar.gz
gdb-5d329b7db9afec533616070131d7bde5fe4b71fa.tar.bz2
* configure.ac: Check for (struct stat)::st_mtim
* fileread.cc (File_read::get_mtime): Use st_mtim if available. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index 85e23f9..4307732 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -370,6 +370,18 @@ if test "$gold_cv_template_attribute" = "yes"; then
[Define if attributes work on C++ templates])
fi
+dnl Check if the system has struct stat::st_mtim.
+AC_CACHE_CHECK([for struct stat::st_mtim.],
+[gold_cv_stat_st_mtim],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/stat.h>
+long bar() { struct stat s; return (long)(s.st_mtim.tv_sec + s.st_mtim.tv_sec);}
+]])], [gold_cv_stat_st_mtim=yes], [gold_cv_stat_st_mtim=no])])
+if test "$gold_cv_stat_st_mtim" = "yes"; then
+ AC_DEFINE(HAVE_STAT_ST_MTIM, 1,
+ [Define if struct stat has a field st_mtim with timespec for mtime])
+fi
+
AC_LANG_POP(C++)
AM_MAINTAINER_MODE