From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94349 invoked by alias); 26 Aug 2015 11:14:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 94340 invoked by uid 89); 26 Aug 2015 11:14:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp-relay.CeBiTec.Uni-Bielefeld.DE Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Aug 2015 11:14:30 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 739794E3; Wed, 26 Aug 2015 13:14:28 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id e-zLFskwQNkb; Wed, 26 Aug 2015 13:14:26 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 132FD4E2; Wed, 26 Aug 2015 13:14:26 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.1+Sun/8.15.1/Submit) id t7QBEPUj017853; Wed, 26 Aug 2015 13:14:25 +0200 (CEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Ian Lance Taylor Subject: [libgo] Use stat_atim.go on Solaris 12+ Date: Wed, 26 Aug 2015 11:16:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg01591.txt.bz2 --=-=-= Content-Type: text/plain Content-length: 1043 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. Btw., I noticed that go/os/stat_atim.go and stat_dragonfly.go are identical; no idea why that would be useful. Bootstrapped without regressions on i386-pc-solaris2.1[12] and sparc-sun-solaris2.1[12]. I had to regenerate aclocal.m4 since for some reason it had been built with automake 1.11.1 instead of the common 1.11.6, thus inhibiting Makefile.in regeneration. Ok for mainline now and the gcc 5 branch after some soak time? Rainer 2015-02-10 Rainer Orth * configure.ac (have_stat_timespec): Check for timespec_t st_atim in . (HAVE_STAT_TIMESPEC): New conditional. * configure: Regenerate. * Makefile.am [LIBGO_IS_SOLARIS && HAVE_STAT_TIMESPEC] (go_os_stat_file): Use go/os/stat_atim.go. * aclocal.m4: Regenerate. * Makefile.in: Regenerate. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol12-libgo-stat_atim.patch Content-length: 1131 # HG changeset patch # Parent b83d7b91430fc3d2c2f34df34aaf648b178d2cad Use stat_atim.go on Solaris 12+ diff --git a/libgo/Makefile.am b/libgo/Makefile.am --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -880,7 +880,11 @@ endif endif if LIBGO_IS_SOLARIS +if HAVE_STAT_TIMESPEC +go_os_stat_file = go/os/stat_atim.go +else go_os_stat_file = go/os/stat_solaris.go +endif else if LIBGO_IS_LINUX go_os_stat_file = go/os/stat_atim.go diff --git a/libgo/configure.ac b/libgo/configure.ac --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -654,6 +654,12 @@ AC_CACHE_CHECK([epoll_event data.fd offs STRUCT_EPOLL_EVENT_FD_OFFSET=${libgo_cv_c_epoll_event_fd_offset} AC_SUBST(STRUCT_EPOLL_EVENT_FD_OFFSET) +dnl Check if 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 . AC_CHECK_TYPE([struct exception], [libgo_has_struct_exception=yes], --=-=-= Content-Type: text/plain Content-length: 143 -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-=--