mirror of
https://github.com/golang/go
synced 2024-11-21 15:24:45 -07:00
libcgo: fix NaCl build.
R=r, rsc, nigeltao CC=golang-dev https://golang.org/cl/2110046
This commit is contained in:
parent
25c8d4e932
commit
86b821f92b
@ -16,9 +16,10 @@ OFILES=\
|
||||
HOST_CFLAGS_386=-m32
|
||||
HOST_CFLAGS_amd64=-m64
|
||||
|
||||
LDFLAGS_linux=-shared -lpthread -lm
|
||||
LDFLAGS_darwin=-dynamiclib -Wl,-undefined,dynamic_lookup /usr/lib/libpthread.dylib
|
||||
LDFLAGS_freebsd=-pthread -shared -lm
|
||||
LDFLAGS_freebsd=-shared -lm -pthread
|
||||
LDFLAGS_linux=-shared -lm -lpthread
|
||||
LDFLAGS_nacl=-shared -lm -lpthread
|
||||
LDFLAGS_windows=-shared -lm -mthreads
|
||||
|
||||
%.o: %.c
|
||||
|
@ -1 +1,17 @@
|
||||
/* unimplemented */
|
||||
// Copyright 2010 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 "libcgo.h"
|
||||
|
||||
void
|
||||
initcgo(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
libcgo_sys_thread_start(ThreadStart *ts)
|
||||
{
|
||||
// unimplemented
|
||||
*(int*)0 = 0;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ func (file *File) Readdirnames(count int) (names []string, err Error) {
|
||||
continue
|
||||
}
|
||||
bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
|
||||
var name = string(bytes[0:clen(bytes)])
|
||||
var name = string(bytes[0:clen(bytes[0:])])
|
||||
if name == "." || name == ".." { // Useless names
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user