mirror of
https://github.com/golang/go
synced 2024-11-21 13:34:39 -07:00
missing files; cleaned up g4 nothave output.
fixes 386 build. R=r DELTA=56 (56 added, 0 deleted, 0 changed) OCL=34979 CL=34981
This commit is contained in:
parent
89a881dce4
commit
285b6021e9
6
src/cmd/8l/elf.c
Normal file
6
src/cmd/8l/elf.c
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#include "l.h"
|
||||
#include "../ld/elf.c"
|
27
src/pkg/runtime/nacl/defs.c
Normal file
27
src/pkg/runtime/nacl/defs.c
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Input to godefs.
|
||||
|
||||
godefs -f-m32 -f-I/home/rsc/pub/nacl/native_client/src/third_party/nacl_sdk/linux/sdk/nacl-sdk/nacl/include -f-I/home/rsc/pub/nacl/native_client defs.c >386/defs.h
|
||||
*/
|
||||
|
||||
#define __native_client__ 1
|
||||
|
||||
#define suseconds_t nacl_suseconds_t_1
|
||||
#include <sys/types.h>
|
||||
#undef suseconds_t
|
||||
|
||||
#include <sys/mman.h>
|
||||
|
||||
enum {
|
||||
$PROT_NONE = PROT_NONE,
|
||||
$PROT_READ = PROT_READ,
|
||||
$PROT_WRITE = PROT_WRITE,
|
||||
$PROT_EXEC = PROT_EXEC,
|
||||
|
||||
$MAP_ANON = MAP_ANONYMOUS,
|
||||
$MAP_PRIVATE = MAP_PRIVATE,
|
||||
};
|
23
test/compos.go
Normal file
23
test/compos.go
Normal file
@ -0,0 +1,23 @@
|
||||
// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: compos
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
type T struct {
|
||||
int;
|
||||
}
|
||||
|
||||
func f() *T {
|
||||
return &T{1}
|
||||
}
|
||||
|
||||
func main() {
|
||||
x := f();
|
||||
y := f();
|
||||
if x == y {
|
||||
panic("not allocating & composite literals");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user