diff mbox

libgo patch committed: Update to weekly.2012-02-07 release

Message ID yddehu4qaqt.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Feb. 9, 2012, 3:36 p.m. UTC
Ian Lance Taylor <iant@google.com> writes:

> I have patched libgo to the weekly.2012-02-07 release.  As usual this
> message only contains changes to files specific to gccgo.  Bootstrapped
> and ran Go testsuite on x86_64-unknown-linux-gnu.  Committed to
> mainline.

I needed the following patch to have it compile on Solaris.

	Rainer

Comments

Ian Lance Taylor Feb. 9, 2012, 6:07 p.m. UTC | #1
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> I needed the following patch to have it compile on Solaris.

Thanks.  I completely forgot about that file.  Committed to mainline.

Ian
diff mbox

Patch

diff --git a/libgo/go/os/stat_solaris.go b/libgo/go/os/stat_solaris.go
--- a/libgo/go/os/stat_solaris.go
+++ b/libgo/go/os/stat_solaris.go
@@ -9,18 +9,18 @@  import (
 	"time"
 )
 
-func sameFile(fs1, fs2 *FileStat) bool {
-	sys1 := fs1.Sys.(*syscall.Stat_t)
-	sys2 := fs2.Sys.(*syscall.Stat_t)
-	return sys1.Dev == sys2.Dev && sys1.Ino == sys2.Ino
+func sameFile(sys1, sys2 interface{}) bool {
+     	stat1 := sys1.(*syscall.Stat_t)
+	stat2 := sys2.(*syscall.Stat_t)
+	return stat1.Dev == stat2.Dev && stat1.Ino == stat2.Ino
 }
 
 func fileInfoFromStat(st *syscall.Stat_t, name string) FileInfo {
-	fs := &FileStat{
+	fs := &fileStat{
 		name:    basename(name),
 		size:    int64(st.Size),
 		modTime: timestrucToTime(st.Mtime),
-		Sys:     st,
+		sys:     st,
 	}
 	fs.mode = FileMode(st.Mode & 0777)
 	switch st.Mode & syscall.S_IFMT {
@@ -52,5 +52,5 @@  func timestrucToTime(ts syscall.Timestru
 
 // For testing.
 func atime(fi FileInfo) time.Time {
-	return timestrucToTime(fi.(*FileStat).Sys.(*syscall.Stat_t).Atime)
+	return timestrucToTime(fi.(*fileStat).Sys().(*syscall.Stat_t).Atime)
 }