From 5766355051ff8844adf47f34445172eaa9045723 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Wed, 2 Jan 2013 17:01:05 +0100 Subject: [PATCH] go: fix checks for about I/O functions Reference: * lib/autoconf/go.m4 (_AC_LANG_IO_PROGRAM(Go), AC_LANG_INT_SAVE): Here, correctly use 'os.OpenFile()' rather than 'os.Open()' (which has more restricted semantics and incompatible signature). Signed-off-by: Stefano Lattarini --- lib/autoconf/go.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/autoconf/go.m4 b/lib/autoconf/go.m4 index bf215bf6..bf1a4aea 100644 --- a/lib/autoconf/go.m4 +++ b/lib/autoconf/go.m4 @@ -61,7 +61,7 @@ $2 # Produce source that performs I/O. m4_define([_AC_LANG_IO_PROGRAM(Go)], [AC_LANG_PROGRAM([import ( "fmt"; "os" )], -[f, err := os.Open("conftest.out", os.O_CREATE|os.O_WRONLY, 0777) +[f, err := os.OpenFile("conftest.out", os.O_CREATE|os.O_WRONLY, 0777) if err != nil { fmt.Println(err) os.Exit(1) @@ -107,7 +107,7 @@ import ( "os" ) ], -[f, err := os.Open("conftest.val", os.O_CREATE|os.O_WRONLY, 0777) +[f, err := os.OpenFile("conftest.val", os.O_CREATE|os.O_WRONLY, 0777) if err != nil { os.Exit(1) } -- 2.47.2