aboutsummaryrefslogtreecommitdiff
path: root/libgo/configure.ac
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-09-10 21:17:00 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-09-10 21:17:00 +0000
commit476013d60bccdca296731062ca8deced5c9c3e3a (patch)
tree0c52b22a5b1c8f42de2137e6e300136297897d88 /libgo/configure.ac
parent9a21c05d8d2a58a23782dbcedb4aa6df62282aa0 (diff)
downloadgcc-476013d60bccdca296731062ca8deced5c9c3e3a.zip
gcc-476013d60bccdca296731062ca8deced5c9c3e3a.tar.gz
gcc-476013d60bccdca296731062ca8deced5c9c3e3a.tar.bz2
libgo: Use stat_atim.go on Solaris 12+
From Rainer Orth. Solaris 12 changes the stat_[amc]tim members of struct stat from timestruc_t to timespec_t for XPG7 compatiblity, thus breaking the libgo build. The following patch checks for this change and uses the common stat_atim.go if appropriate. Reviewed-on: https://go-review.googlesource.com/14495 From-SVN: r227665
Diffstat (limited to 'libgo/configure.ac')
-rw-r--r--libgo/configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 7c403a5..a175d46 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -645,6 +645,12 @@ AC_CACHE_CHECK([epoll_event data.fd offset],
STRUCT_EPOLL_EVENT_FD_OFFSET=${libgo_cv_c_epoll_event_fd_offset}
AC_SUBST(STRUCT_EPOLL_EVENT_FD_OFFSET)
+dnl Check if <sys/stat.h> uses timespec_t for st_?tim members. Introduced
+dnl in Solaris 12 for XPG7 compatibility.
+AC_EGREP_HEADER([timespec_t.*st_atim], [sys/stat.h],
+ [have_stat_timespec=yes], [have_stat_timespec=no])
+AM_CONDITIONAL(HAVE_STAT_TIMESPEC, test $have_stat_timespec = yes)
+
dnl See if struct exception is defined in <math.h>.
AC_CHECK_TYPE([struct exception],
[libgo_has_struct_exception=yes],