[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

go.m4 in autoconf-2.69 assumes old os.Open API

From: Adam Sampson
Subject: go.m4 in autoconf-2.69 assumes old os.Open API
Date: Thu, 26 Apr 2012 13:26:37 +0100
User-agent: Mutt/1.5.21 (2010-09-15)


In autoconf-2.69/lib/autoconf/go.m4, two of the test Go programs do the
following to open a file for output:

  f, err := os.Open("conftest.out", os.O_CREATE|os.O_WRONLY, 0777)

However, os.Open has changed in recent versions of Go. In Go 1 as
implemented in GCC 4.7, it only takes one argument. Compare:

So currently autoconf-2.69's testsuite fails on a machine with GCC 4.7:
the go.at test finds gccgo but can't compile anything with it. It works
if you change both of those calls to do:

  f, err := os.Create("conftest.out")

(e.g. with the attached patch) but that then won't work with older
versions of GCC. I'm not sure what the best fix would be here.


Adam Sampson <address@hidden>                         <http://offog.org/>

Attachment: newgo.diff
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]