]> Cypherpunks repositories - gostls13.git/commitdiff
all: remove the nacl port (part 1)
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 8 Oct 2019 19:19:13 +0000 (19:19 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 9 Oct 2019 06:14:44 +0000 (06:14 +0000)
You were a useful port and you've served your purpose.
Thanks for all the play.

A subsequent CL will remove amd64p32 (including assembly files and
toolchain bits) and remaining bits. The amd64p32 removal will be
separated into its own CL in case we want to support the Linux x32 ABI
in the future and want our old amd64p32 support as a starting point.

Updates #30439

Change-Id: Ia3a0c7d49804adc87bf52a4dea7e3d3007f2b1cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/199499
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

211 files changed:
misc/nacl/README [deleted file]
misc/nacl/go_nacl_386_exec [deleted file]
misc/nacl/go_nacl_amd64p32_exec [deleted file]
misc/nacl/go_nacl_arm_exec [deleted file]
misc/nacl/mkzip.go [deleted file]
misc/nacl/testdata/bin/placeholder [deleted file]
misc/nacl/testdata/empty [deleted file]
misc/nacl/testdata/group [deleted file]
misc/nacl/testdata/hosts [deleted file]
misc/nacl/testdata/mime.types [deleted file]
misc/nacl/testzip.proto [deleted file]
src/buildall.bash
src/cmd/compile/internal/gc/inl_test.go
src/cmd/compile/internal/gc/sizeof_test.go
src/cmd/compile/internal/ssa/sizeof_test.go
src/cmd/compile/internal/types/sizeof_test.go
src/cmd/dist/build.go
src/cmd/dist/test.go
src/cmd/dist/util.go
src/cmd/doc/doc_test.go
src/cmd/go/alldocs.go
src/cmd/go/go_test.go
src/cmd/go/help_test.go
src/cmd/go/internal/base/signal_unix.go
src/cmd/go/internal/lockedfile/internal/filelock/filelock_test.go
src/cmd/go/internal/lockedfile/lockedfile_test.go
src/cmd/go/internal/renameio/umask_test.go
src/cmd/go/internal/run/run.go
src/cmd/go/internal/work/build_test.go
src/cmd/go/testdata/src/testcache/testcache_test.go
src/cmd/internal/obj/sizeof_test.go
src/cmd/link/internal/sym/sizeof_test.go
src/crypto/rand/eagain.go
src/crypto/rand/rand_unix.go
src/crypto/x509/root_nacl.go [deleted file]
src/crypto/x509/root_unix.go
src/debug/elf/file_test.go
src/go/build/deps_test.go
src/go/internal/gccgoimporter/importer_test.go
src/go/internal/gcimporter/gcimporter_test.go
src/go/types/example_test.go
src/internal/cpu/cpu_x86.s
src/internal/poll/export_posix_test.go
src/internal/poll/fd_fsync_posix.go
src/internal/poll/fd_poll_js.go [moved from src/internal/poll/fd_poll_nacljs.go with 99% similarity]
src/internal/poll/fd_posix.go
src/internal/poll/fd_posix_test.go
src/internal/poll/fd_unix.go
src/internal/poll/hook_unix.go
src/internal/poll/sys_cloexec.go
src/internal/syscall/unix/nonblocking_nacl.go [deleted file]
src/internal/testenv/testenv.go
src/internal/testenv/testenv_notwin.go
src/log/syslog/doc.go
src/log/syslog/example_test.go
src/log/syslog/syslog.go
src/log/syslog/syslog_test.go
src/log/syslog/syslog_unix.go
src/mime/type_unix.go
src/naclmake.bash [deleted file]
src/nacltest.bash [deleted file]
src/net/dial_test.go
src/net/error_nacl.go [deleted file]
src/net/error_posix.go
src/net/error_test.go
src/net/fd_unix.go
src/net/file.go
src/net/file_stub.go
src/net/file_test.go
src/net/hook_unix.go
src/net/interface.go
src/net/interface_stub.go
src/net/interface_test.go
src/net/internal/socktest/switch_unix.go
src/net/internal/socktest/sys_unix.go
src/net/iprawsock.go
src/net/iprawsock_posix.go
src/net/ipsock_posix.go
src/net/listen_test.go
src/net/lookup.go
src/net/lookup_fake.go
src/net/lookup_test.go
src/net/main_conf_test.go
src/net/main_noconf_test.go
src/net/main_unix_test.go
src/net/net_test.go
src/net/platform_test.go
src/net/port_unix.go
src/net/rawconn.go
src/net/rawconn_stub_test.go
src/net/rawconn_test.go
src/net/sendfile_stub.go
src/net/sendfile_test.go
src/net/sock_posix.go
src/net/sock_stub.go
src/net/sockaddr_posix.go
src/net/sockopt_stub.go
src/net/sockoptip_stub.go
src/net/sys_cloexec.go
src/net/tcpsock.go
src/net/tcpsock_posix.go
src/net/tcpsock_test.go
src/net/tcpsockopt_stub.go
src/net/timeout_test.go
src/net/udpsock.go
src/net/udpsock_posix.go
src/net/udpsock_test.go
src/net/unixsock.go
src/net/unixsock_posix.go
src/net/unixsock_test.go
src/os/dir_unix.go
src/os/error_posix.go
src/os/error_unix_test.go
src/os/exec/lp_unix.go
src/os/exec_posix.go
src/os/exec_unix.go
src/os/executable.go
src/os/executable_procfs.go
src/os/executable_test.go
src/os/export_unix_test.go
src/os/file.go
src/os/file_posix.go
src/os/file_unix.go
src/os/os_test.go
src/os/path_unix.go
src/os/pipe_bsd.go
src/os/pipe_test.go
src/os/rawconn_test.go
src/os/removeall_test.go
src/os/signal/signal_unix.go
src/os/stat_js.go [moved from src/os/stat_nacljs.go with 98% similarity]
src/os/stat_unix.go
src/os/sys_bsd.go
src/os/sys_nacl.go [deleted file]
src/os/timeout_test.go
src/os/user/lookup_stubs.go
src/os/user/lookup_unix.go
src/os/user/lookup_unix_test.go
src/os/wait_unimp.go
src/path/filepath/path_unix.go
src/plugin/plugin_test.go
src/reflect/all_test.go
src/runtime/alg.go
src/runtime/asm_386.s
src/runtime/asm_arm.s
src/runtime/crash_nonunix_test.go
src/runtime/debug/heapdump_test.go
src/runtime/defs_nacl_386.go [deleted file]
src/runtime/defs_nacl_arm.go [deleted file]
src/runtime/env_posix.go
src/runtime/export_mmap_test.go
src/runtime/internal/sys/arch_386.go
src/runtime/internal/sys/zgoos_nacl.go [deleted file]
src/runtime/lfstack_32bit.go
src/runtime/lock_sema.go
src/runtime/mem_bsd.go
src/runtime/mknacl.sh [deleted file]
src/runtime/mmap.go
src/runtime/netpoll.go
src/runtime/netpoll_fake.go
src/runtime/os2_nacl.go [deleted file]
src/runtime/os_nacl.go [deleted file]
src/runtime/os_nacl_arm.go [deleted file]
src/runtime/pprof/pprof_test.go
src/runtime/rt0_nacl_386.s [deleted file]
src/runtime/rt0_nacl_arm.s [deleted file]
src/runtime/runtime_mmap_test.go
src/runtime/runtime_test.go
src/runtime/semasleep_test.go
src/runtime/signal_386.go
src/runtime/signal_amd64x.go
src/runtime/signal_arm.go
src/runtime/signal_nacl.go [deleted file]
src/runtime/signal_nacl_386.go [deleted file]
src/runtime/signal_nacl_arm.go [deleted file]
src/runtime/signal_sighandler.go
src/runtime/sizeof_test.go
src/runtime/stubs2.go
src/runtime/stubs3.go
src/runtime/sys_nacl_386.s [deleted file]
src/runtime/sys_nacl_arm.s [deleted file]
src/runtime/syscall_nacl.h [deleted file]
src/runtime/testdata/testprog/signal.go
src/runtime/testdata/testprognet/signal.go
src/runtime/time.go
src/runtime/time_fake.go
src/runtime/time_nofake.go
src/runtime/tls_arm.s
src/runtime/vlop_arm.s
src/syscall/asm_nacl_386.s [deleted file]
src/syscall/asm_nacl_arm.s [deleted file]
src/syscall/dirent.go
src/syscall/env_unix.go
src/syscall/fd_nacl.go [deleted file]
src/syscall/fs_nacl.go [deleted file]
src/syscall/mkall.sh
src/syscall/net_js.go
src/syscall/net_nacl.go [deleted file]
src/syscall/syscall_nacl.go [deleted file]
src/syscall/syscall_nacl_386.go [deleted file]
src/syscall/syscall_nacl_arm.go [deleted file]
src/syscall/syscall_test.go
src/syscall/tables_js.go [moved from src/syscall/tables_nacljs.go with 99% similarity]
src/syscall/time_nacl_386.s [deleted file]
src/syscall/time_nacl_arm.s [deleted file]
src/syscall/timestruct.go
src/syscall/unzip_nacl.go [deleted file]
src/syscall/zsyscall_nacl_386.go [deleted file]
src/syscall/zsyscall_nacl_arm.go [deleted file]
src/time/sys_unix.go
src/time/zoneinfo_unix.go

diff --git a/misc/nacl/README b/misc/nacl/README
deleted file mode 100644 (file)
index 179e526..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-Native Client
-=============
-
-This document outlines the basics of building and developing the Go runtime and
-programs in the Native Client (NaCl) environment.
-
-Go 1.3 supports three architectures
-
- * nacl/386 which is standard 386.
- * nacl/amd64p32 which is a 64 bit architecture, where the address space is
-   limited to a 4gb window.
- * nacl/arm which is 32-bit ARMv7A architecture with 1GB address space.
-
-For background it is recommended that you read https://golang.org/s/go13nacl.
-
-Prerequisites
--------------
-
-Native Client programs are executed inside a sandbox, the NaCl runtime. This
-runtime must be installed before you can use NaCl programs.
-
-The NaCl distribution comes with an installer which ensures you have access to
-the latest version of the runtime. The version tracks the Chrome numbering
-scheme.
-
-# Download NaCl
-
-Download nacl_sdk.zip file from
-       https://developer.chrome.com/native-client/sdk/download
-and unpack it. I chose /opt/nacl_sdk.
-
-# Update
-
-The zip file contains a small skeleton that can be used to download the correct
-sdk. These are released every 6-8 weeks, in line with Chrome releases.
-       
-       % cd /opt/nacl_sdk
-       % ./naclsdk update
-
-At this time pepper_49 is the stable version. The NaCl port needs at least pepper_39
-to work. If naclsdk downloads a later version, please adjust accordingly.
-
-The cmd/go helper scripts expect that the loaders sel_ldr_{x86_{32,64},arm} and
-nacl_helper_bootstrap_arm are in your path. I find it easiest to make a symlink
-from the NaCl distribution to my $GOPATH/bin directory.
-
-       % ln -nfs /opt/nacl_sdk/pepper_39/tools/sel_ldr_x86_32 $GOPATH/bin/sel_ldr_x86_32
-       % ln -nfs /opt/nacl_sdk/pepper_39/tools/sel_ldr_x86_64 $GOPATH/bin/sel_ldr_x86_64
-       % ln -nfs /opt/nacl_sdk/pepper_39/tools/sel_ldr_arm $GOPATH/bin/sel_ldr_arm
-
-Additionally, for NaCl/ARM only:
-
-       % ln -nfs /opt/nacl_sdk/pepper_39/tools/nacl_helper_bootstrap_arm $GOPATH/bin/nacl_helper_bootstrap_arm
-
-Support scripts
----------------
-
-Symlink the two scripts in this directory into your $PATH, just as you did with
-NaCl sdk above.
-
-       % ln -nfs $GOROOT/misc/nacl/go_nacl_amd64p32_exec $GOPATH/bin/go_nacl_amd64p32_exec
-       % ln -nfs $GOROOT/misc/nacl/go_nacl_386_exec $GOPATH/bin/go_nacl_386_exec
-       % ln -nfs $GOROOT/misc/nacl/go_nacl_arm_exec $GOPATH/bin/go_nacl_arm_exec
-
-Building and testing
---------------------
-
-Building for NaCl is similar to cross compiling for other platforms. However,
-as it is not possible to ever build in a `native` NaCl environment, the cmd/go
-tool has been enhanced to allow the full build, all.bash, to be executed,
-rather than just the compile stage, make.bash.
-
-The cmd/go tool knows that if GOOS is set to `nacl` it should not try to
-execute any binaries itself. Instead it passes their execution to a support
-script which sets up a Native Client environment and invokes the NaCl sandbox.
-
-The script's name has a special format, go_$GOOS_$GOARCH_exec, so cmd/go can
-find it.
-
-In short, if the support scripts are in place, the cmd/go tool can be used as
-per normal.
-
-# Build and test Go for NaCl
-
-NaCl does not permit direct file system access. Instead, package syscall
-provides a simulated file system served by in-memory data. The script
-nacltest.bash is the NaCl equivalent of all.bash. It builds NaCl with an
-in-memory file system containing files needed for tests, and then it runs the
-tests.
-
-       % cd go/src
-       % env GOARCH=amd64p32 ./nacltest.bash
-
-Debugging
----------
-
-Assuming that you have built nacl/amd64p32 binary ./mybin and can run as:
-
-       % sel_ldr_x86_64 -l /dev/null -S -e ./mybin
-
-Create the nacl manifest file mybin.manifest with the following contents:
-
-       { "program": { "x86-64": { "url": "mybin" } } }
-
-url is the path to the binary relative to the manifest file.
-Then, run the program as:
-
-       % sel_ldr_x86_64 -g -l /dev/null -S -e ./mybin
-
-The -g flag instructs the loader to stop at startup. Then, in another console:
-
-       % /opt/nacl_sdk/pepper_39/toolchain/linux_x86_glibc/bin/x86_64-nacl-gdb
-       % nacl-manifest mybin.manifest
-       % target remote :4014
-
-If you see that the program is stopped in _rt0_amd64p32_nacl, then symbols are
-loaded successfully and you can type 'c' to start the program.
-Next time you can automate it as:
-
-       % /opt/nacl_sdk/pepper_39/toolchain/linux_x86_glibc/bin/x86_64-nacl-gdb \
-               -ex 'nacl-manifest mybin.manifest' -ex 'target remote :4014'
diff --git a/misc/nacl/go_nacl_386_exec b/misc/nacl/go_nacl_386_exec
deleted file mode 100755 (executable)
index 9cff635..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-eval $(go env)
-
-export NACLENV_GOARCH=$GOARCH
-export NACLENV_GOOS=$GOOS
-export NACLENV_GOROOT=/go
-export NACLENV_NACLPWD=$(pwd | sed "s;$GOROOT;/go;")
-exec sel_ldr_x86_32 -l /dev/null -S -e "$@"
diff --git a/misc/nacl/go_nacl_amd64p32_exec b/misc/nacl/go_nacl_amd64p32_exec
deleted file mode 100755 (executable)
index 0a5ed65..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-eval $(go env)
-
-export NACLENV_GOARCH=$GOARCH
-export NACLENV_GOOS=$GOOS
-export NACLENV_GOROOT=/go
-export NACLENV_NACLPWD=$(pwd | sed "s;$GOROOT;/go;")
-
-exec sel_ldr_x86_64 -l /dev/null -S -e "$@"
diff --git a/misc/nacl/go_nacl_arm_exec b/misc/nacl/go_nacl_arm_exec
deleted file mode 100755 (executable)
index 4275cb1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-eval $(go env)
-
-export NACLENV_GOARCH=$GOARCH
-export NACLENV_GOOS=$GOOS
-export NACLENV_GOROOT=/go
-export NACLENV_NACLPWD=$(pwd | sed "s;$GOROOT;/go;")
-
-exec nacl_helper_bootstrap_arm $(which sel_ldr_arm) --reserved_at_zero=0xXXXXXXXXXXXXXXXX -l /dev/null -S -e "$@"
diff --git a/misc/nacl/mkzip.go b/misc/nacl/mkzip.go
deleted file mode 100644 (file)
index 5ec241e..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright 2014 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.
-
-// Mkzip creates a zip file from a 'proto' file describing the contents.
-//
-// The proto file is inspired by the Plan 9 mkfs prototype file format.
-// It describes a file tree, one directory per line, with leading tab
-// indentation marking the tree structure. Each line contains a leading
-// name field giving the name of the file to copy into the zip file,
-// and then a sequence of optional key=value attributes to control
-// the copy. The only known attribute is src=foo, meaning copy the
-// actual data for the file (or directory) from an alternate location.
-package main
-
-import (
-       "archive/zip"
-       "bufio"
-       "flag"
-       "fmt"
-       "io"
-       "io/ioutil"
-       "log"
-       "os"
-       "path"
-       "path/filepath"
-       "strings"
-)
-
-func usage() {
-       fmt.Fprintf(os.Stderr, "usage: mkzip [-r root] src.proto out.zip\n")
-       os.Exit(2)
-}
-
-func sysfatal(format string, args ...interface{}) {
-       fmt.Fprintf(os.Stderr, "mkzip: %s\n", fmt.Sprintf(format, args...))
-       os.Exit(2)
-}
-
-var (
-       root      = flag.String("r", ".", "interpret source paths relative to this directory")
-       gopackage = flag.String("p", "", "write Go source file in this package")
-)
-
-type stack struct {
-       name  string
-       src   string
-       depth int
-}
-
-func main() {
-       log.SetFlags(0)
-       flag.Usage = usage
-       flag.Parse()
-
-       args := flag.Args()
-       if len(args) != 2 {
-               usage()
-       }
-
-       rf, err := os.Open(args[0])
-       if err != nil {
-               sysfatal("%v", err)
-       }
-       r := bufio.NewScanner(rf)
-
-       zf, err := os.Create(args[1])
-       if err != nil {
-               sysfatal("%v", err)
-       }
-
-       var w io.Writer = zf
-       if *gopackage != "" {
-               fmt.Fprintf(zf, `package %s
-import "sync"
-func init() {
-       var once sync.Once
-       fsinit = func() {
-               once.Do(func() {
-                       unzip("`, *gopackage)
-               gw := &goWriter{b: bufio.NewWriter(w)}
-               defer func() {
-                       if err := gw.Close(); err != nil {
-                               sysfatal("finishing Go output: %v", err)
-                       }
-               }()
-               w = gw
-       }
-       z := zip.NewWriter(w)
-
-       lineno := 0
-
-       addfile := func(info os.FileInfo, dst string, src string) {
-               zh, err := zip.FileInfoHeader(info)
-               if err != nil {
-                       sysfatal("%s:%d: %s: %v", args[0], lineno, src, err)
-               }
-               zh.Name = dst
-               zh.Method = zip.Deflate
-               if info.IsDir() && !strings.HasSuffix(dst, "/") {
-                       zh.Name += "/"
-               }
-               w, err := z.CreateHeader(zh)
-               if err != nil {
-                       sysfatal("%s:%d: %s: %v", args[0], lineno, src, err)
-               }
-               if info.IsDir() {
-                       return
-               }
-               r, err := os.Open(src)
-               if err != nil {
-                       sysfatal("%s:%d: %s: %v", args[0], lineno, src, err)
-               }
-               defer r.Close()
-               if _, err := io.Copy(w, r); err != nil {
-                       sysfatal("%s:%d: %s: %v", args[0], lineno, src, err)
-               }
-       }
-
-       var stk []stack
-
-       for r.Scan() {
-               line := r.Text()
-               lineno++
-               s := strings.TrimLeft(line, "\t")
-               prefix, line := line[:len(line)-len(s)], s
-               if i := strings.Index(line, "#"); i >= 0 {
-                       line = line[:i]
-               }
-               f := strings.Fields(line)
-               if len(f) == 0 {
-                       continue
-               }
-               if strings.HasPrefix(line, " ") {
-                       sysfatal("%s:%d: must use tabs for indentation", args[0], lineno)
-               }
-               depth := len(prefix)
-               for len(stk) > 0 && depth <= stk[len(stk)-1].depth {
-                       stk = stk[:len(stk)-1]
-               }
-               parent := ""
-               psrc := *root
-               if len(stk) > 0 {
-                       parent = stk[len(stk)-1].name
-                       psrc = stk[len(stk)-1].src
-               }
-               if strings.Contains(f[0], "/") {
-                       sysfatal("%s:%d: destination name cannot contain slash", args[0], lineno)
-               }
-               name := path.Join(parent, f[0])
-               src := filepath.Join(psrc, f[0])
-               for _, attr := range f[1:] {
-                       i := strings.Index(attr, "=")
-                       if i < 0 {
-                               sysfatal("%s:%d: malformed attribute %q", args[0], lineno, attr)
-                       }
-                       key, val := attr[:i], attr[i+1:]
-                       switch key {
-                       case "src":
-                               src = val
-                       default:
-                               sysfatal("%s:%d: unknown attribute %q", args[0], lineno, attr)
-                       }
-               }
-
-               stk = append(stk, stack{name: name, src: src, depth: depth})
-
-               if f[0] == "*" || f[0] == "+" {
-                       if f[0] == "*" {
-                               dir, err := ioutil.ReadDir(psrc)
-                               if err != nil {
-                                       sysfatal("%s:%d: %v", args[0], lineno, err)
-                               }
-                               for _, d := range dir {
-                                       addfile(d, path.Join(parent, d.Name()), filepath.Join(psrc, d.Name()))
-                               }
-                       } else {
-                               err := filepath.Walk(psrc, func(src string, info os.FileInfo, err error) error {
-                                       if err != nil {
-                                               return err
-                                       }
-                                       if src == psrc {
-                                               return nil
-                                       }
-                                       if psrc == "." {
-                                               psrc = ""
-                                       }
-                                       name := path.Join(parent, filepath.ToSlash(src[len(psrc):]))
-                                       addfile(info, name, src)
-                                       return nil
-                               })
-                               if err != nil {
-                                       sysfatal("%s:%d: %v", args[0], lineno, err)
-                               }
-                       }
-                       continue
-               }
-
-               fi, err := os.Stat(src)
-               if err != nil {
-                       sysfatal("%s:%d: %v", args[0], lineno, err)
-               }
-               addfile(fi, name, src)
-       }
-
-       if err := z.Close(); err != nil {
-               sysfatal("finishing zip file: %v", err)
-       }
-}
-
-type goWriter struct {
-       b *bufio.Writer
-}
-
-func (w *goWriter) Write(b []byte) (int, error) {
-       for _, c := range b {
-               fmt.Fprintf(w.b, "\\x%02x", c)
-       }
-       return len(b), nil
-}
-
-func (w *goWriter) Close() error {
-       fmt.Fprintf(w.b, "\")\n\t\t})\n\t}\n}")
-       w.b.Flush()
-       return nil
-}
diff --git a/misc/nacl/testdata/bin/placeholder b/misc/nacl/testdata/bin/placeholder
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/misc/nacl/testdata/empty b/misc/nacl/testdata/empty
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/misc/nacl/testdata/group b/misc/nacl/testdata/group
deleted file mode 100644 (file)
index eb7f9a3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-nobody:*:-2:
-nogroup:*:-1:
-wheel:*:0:root
-daemon:*:1:root
-kmem:*:2:root
-sys:*:3:root
-tty:*:4:root
-operator:*:5:root
diff --git a/misc/nacl/testdata/hosts b/misc/nacl/testdata/hosts
deleted file mode 100644 (file)
index 75721cd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-127.0.0.1 localhost
diff --git a/misc/nacl/testdata/mime.types b/misc/nacl/testdata/mime.types
deleted file mode 100644 (file)
index ba678d5..0000000
+++ /dev/null
@@ -1,1596 +0,0 @@
-# This file maps Internet media types to unique file extension(s).
-# Although created for httpd, this file is used by many software systems
-# and has been placed in the public domain for unlimited redistribution.
-#
-# The table below contains both registered and (common) unregistered types.
-# A type that has no unique extension can be ignored -- they are listed
-# here to guide configurations toward known types and to make it easier to
-# identify "new" types.  File extensions are also commonly used to indicate
-# content languages and encodings, so choose them carefully.
-#
-# Internet media types should be registered as described in RFC 4288.
-# The registry is at <https://www.iana.org/assignments/media-types/>.
-#
-# MIME type (lowercased)                       Extensions
-# ============================================ ==========
-# application/1d-interleaved-parityfec
-# application/3gpp-ims+xml
-# application/activemessage
-application/andrew-inset                       ez
-# application/applefile
-application/applixware                         aw
-application/atom+xml                           atom
-application/atomcat+xml                                atomcat
-# application/atomicmail
-application/atomsvc+xml                                atomsvc
-# application/auth-policy+xml
-# application/batch-smtp
-# application/beep+xml
-# application/calendar+xml
-# application/cals-1840
-# application/ccmp+xml
-application/ccxml+xml                          ccxml
-application/cdmi-capability                    cdmia
-application/cdmi-container                     cdmic
-application/cdmi-domain                                cdmid
-application/cdmi-object                                cdmio
-application/cdmi-queue                         cdmiq
-# application/cea-2018+xml
-# application/cellml+xml
-# application/cfw
-# application/cnrp+xml
-# application/commonground
-# application/conference-info+xml
-# application/cpl+xml
-# application/csta+xml
-# application/cstadata+xml
-application/cu-seeme                           cu
-# application/cybercash
-application/davmount+xml                       davmount
-# application/dca-rft
-# application/dec-dx
-# application/dialog-info+xml
-# application/dicom
-# application/dns
-application/docbook+xml                                dbk
-# application/dskpp+xml
-application/dssc+der                           dssc
-application/dssc+xml                           xdssc
-# application/dvcs
-application/ecmascript                         ecma
-# application/edi-consent
-# application/edi-x12
-# application/edifact
-application/emma+xml                           emma
-# application/epp+xml
-application/epub+zip                           epub
-# application/eshop
-# application/example
-application/exi                                        exi
-# application/fastinfoset
-# application/fastsoap
-# application/fits
-application/font-tdpfr                         pfr
-# application/framework-attributes+xml
-application/gml+xml                            gml
-application/gpx+xml                            gpx
-application/gxf                                        gxf
-# application/h224
-# application/held+xml
-# application/http
-application/hyperstudio                                stk
-# application/ibe-key-request+xml
-# application/ibe-pkg-reply+xml
-# application/ibe-pp-data
-# application/iges
-# application/im-iscomposing+xml
-# application/index
-# application/index.cmd
-# application/index.obj
-# application/index.response
-# application/index.vnd
-application/inkml+xml                          ink inkml
-# application/iotp
-application/ipfix                              ipfix
-# application/ipp
-# application/isup
-application/java-archive                       jar
-application/java-serialized-object             ser
-application/java-vm                            class
-application/javascript                         js
-application/json                               json
-application/jsonml+json                                jsonml
-# application/kpml-request+xml
-# application/kpml-response+xml
-application/lost+xml                           lostxml
-application/mac-binhex40                       hqx
-application/mac-compactpro                     cpt
-# application/macwriteii
-application/mads+xml                           mads
-application/marc                               mrc
-application/marcxml+xml                                mrcx
-application/mathematica                                ma nb mb
-# application/mathml-content+xml
-# application/mathml-presentation+xml
-application/mathml+xml                         mathml
-# application/mbms-associated-procedure-description+xml
-# application/mbms-deregister+xml
-# application/mbms-envelope+xml
-# application/mbms-msk+xml
-# application/mbms-msk-response+xml
-# application/mbms-protection-description+xml
-# application/mbms-reception-report+xml
-# application/mbms-register+xml
-# application/mbms-register-response+xml
-# application/mbms-user-service-description+xml
-application/mbox                               mbox
-# application/media_control+xml
-application/mediaservercontrol+xml             mscml
-application/metalink+xml                       metalink
-application/metalink4+xml                      meta4
-application/mets+xml                           mets
-# application/mikey
-application/mods+xml                           mods
-# application/moss-keys
-# application/moss-signature
-# application/mosskey-data
-# application/mosskey-request
-application/mp21                               m21 mp21
-application/mp4                                        mp4s
-# application/mpeg4-generic
-# application/mpeg4-iod
-# application/mpeg4-iod-xmt
-# application/msc-ivr+xml
-# application/msc-mixer+xml
-application/msword                             doc dot
-application/mxf                                        mxf
-# application/nasdata
-# application/news-checkgroups
-# application/news-groupinfo
-# application/news-transmission
-# application/nss
-# application/ocsp-request
-# application/ocsp-response
-application/octet-stream       bin dms lrf mar so dist distz pkg bpk dump elc deploy mobipocket-ebook
-application/oda                                        oda
-application/oebps-package+xml                  opf
-application/ogg                                        ogx
-application/omdoc+xml                          omdoc
-application/onenote                            onetoc onetoc2 onetmp onepkg
-application/oxps                               oxps
-# application/parityfec
-application/patch-ops-error+xml                        xer
-application/pdf                                        pdf
-application/pgp-encrypted                      pgp
-# application/pgp-keys
-application/pgp-signature                      asc sig
-application/pics-rules                         prf
-# application/pidf+xml
-# application/pidf-diff+xml
-application/pkcs10                             p10
-application/pkcs7-mime                         p7m p7c
-application/pkcs7-signature                    p7s
-application/pkcs8                              p8
-application/pkix-attr-cert                     ac
-application/pkix-cert                          cer
-application/pkix-crl                           crl
-application/pkix-pkipath                       pkipath
-application/pkixcmp                            pki
-application/pls+xml                            pls
-# application/poc-settings+xml
-application/postscript                         ai eps ps
-# application/prs.alvestrand.titrax-sheet
-application/prs.cww                            cww
-# application/prs.nprend
-# application/prs.plucker
-# application/prs.rdf-xml-crypt
-# application/prs.xsf+xml
-application/pskc+xml                           pskcxml
-# application/qsig
-application/rdf+xml                            rdf
-application/reginfo+xml                                rif
-application/relax-ng-compact-syntax            rnc
-# application/remote-printing
-application/resource-lists+xml                 rl
-application/resource-lists-diff+xml            rld
-# application/riscos
-# application/rlmi+xml
-application/rls-services+xml                   rs
-application/rpki-ghostbusters                  gbr
-application/rpki-manifest                      mft
-application/rpki-roa                           roa
-# application/rpki-updown
-application/rsd+xml                            rsd
-application/rss+xml                            rss
-application/rtf                                        rtf
-# application/rtx
-# application/samlassertion+xml
-# application/samlmetadata+xml
-application/sbml+xml                           sbml
-application/scvp-cv-request                    scq
-application/scvp-cv-response                   scs
-application/scvp-vp-request                    spq
-application/scvp-vp-response                   spp
-application/sdp                                        sdp
-# application/set-payment
-application/set-payment-initiation             setpay
-# application/set-registration
-application/set-registration-initiation                setreg
-# application/sgml
-# application/sgml-open-catalog
-application/shf+xml                            shf
-# application/sieve
-# application/simple-filter+xml
-# application/simple-message-summary
-# application/simplesymbolcontainer
-# application/slate
-# application/smil
-application/smil+xml                           smi smil
-# application/soap+fastinfoset
-# application/soap+xml
-application/sparql-query                       rq
-application/sparql-results+xml                 srx
-# application/spirits-event+xml
-application/srgs                               gram
-application/srgs+xml                           grxml
-application/sru+xml                            sru
-application/ssdl+xml                           ssdl
-application/ssml+xml                           ssml
-# application/tamp-apex-update
-# application/tamp-apex-update-confirm
-# application/tamp-community-update
-# application/tamp-community-update-confirm
-# application/tamp-error
-# application/tamp-sequence-adjust
-# application/tamp-sequence-adjust-confirm
-# application/tamp-status-query
-# application/tamp-status-response
-# application/tamp-update
-# application/tamp-update-confirm
-application/tei+xml                            tei teicorpus
-application/thraud+xml                         tfi
-# application/timestamp-query
-# application/timestamp-reply
-application/timestamped-data                   tsd
-# application/tve-trigger
-# application/ulpfec
-# application/vcard+xml
-# application/vemmi
-# application/vividence.scriptfile
-# application/vnd.3gpp.bsf+xml
-application/vnd.3gpp.pic-bw-large              plb
-application/vnd.3gpp.pic-bw-small              psb
-application/vnd.3gpp.pic-bw-var                        pvb
-# application/vnd.3gpp.sms
-# application/vnd.3gpp2.bcmcsinfo+xml
-# application/vnd.3gpp2.sms
-application/vnd.3gpp2.tcap                     tcap
-application/vnd.3m.post-it-notes               pwn
-application/vnd.accpac.simply.aso              aso
-application/vnd.accpac.simply.imp              imp
-application/vnd.acucobol                       acu
-application/vnd.acucorp                                atc acutc
-application/vnd.adobe.air-application-installer-package+zip    air
-application/vnd.adobe.formscentral.fcdt                fcdt
-application/vnd.adobe.fxp                      fxp fxpl
-# application/vnd.adobe.partial-upload
-application/vnd.adobe.xdp+xml                  xdp
-application/vnd.adobe.xfdf                     xfdf
-# application/vnd.aether.imp
-# application/vnd.ah-barcode
-application/vnd.ahead.space                    ahead
-application/vnd.airzip.filesecure.azf          azf
-application/vnd.airzip.filesecure.azs          azs
-application/vnd.amazon.ebook                   azw
-application/vnd.americandynamics.acc           acc
-application/vnd.amiga.ami                      ami
-# application/vnd.amundsen.maze+xml
-application/vnd.android.package-archive                apk
-application/vnd.anser-web-certificate-issue-initiation cii
-application/vnd.anser-web-funds-transfer-initiation    fti
-application/vnd.antix.game-component           atx
-application/vnd.apple.installer+xml            mpkg
-application/vnd.apple.mpegurl                  m3u8
-# application/vnd.arastra.swi
-application/vnd.aristanetworks.swi             swi
-application/vnd.astraea-software.iota          iota
-application/vnd.audiograph                     aep
-# application/vnd.autopackage
-# application/vnd.avistar+xml
-application/vnd.blueice.multipass              mpm
-# application/vnd.bluetooth.ep.oob
-application/vnd.bmi                            bmi
-application/vnd.businessobjects                        rep
-# application/vnd.cab-jscript
-# application/vnd.canon-cpdl
-# application/vnd.canon-lips
-# application/vnd.cendio.thinlinc.clientconf
-application/vnd.chemdraw+xml                   cdxml
-application/vnd.chipnuts.karaoke-mmd           mmd
-application/vnd.cinderella                     cdy
-# application/vnd.cirpack.isdn-ext
-application/vnd.claymore                       cla
-application/vnd.cloanto.rp9                    rp9
-application/vnd.clonk.c4group                  c4g c4d c4f c4p c4u
-application/vnd.cluetrust.cartomobile-config           c11amc
-application/vnd.cluetrust.cartomobile-config-pkg       c11amz
-# application/vnd.collection+json
-# application/vnd.commerce-battelle
-application/vnd.commonspace                    csp
-application/vnd.contact.cmsg                   cdbcmsg
-application/vnd.cosmocaller                    cmc
-application/vnd.crick.clicker                  clkx
-application/vnd.crick.clicker.keyboard         clkk
-application/vnd.crick.clicker.palette          clkp
-application/vnd.crick.clicker.template         clkt
-application/vnd.crick.clicker.wordbank         clkw
-application/vnd.criticaltools.wbs+xml          wbs
-application/vnd.ctc-posml                      pml
-# application/vnd.ctct.ws+xml
-# application/vnd.cups-pdf
-# application/vnd.cups-postscript
-application/vnd.cups-ppd                       ppd
-# application/vnd.cups-raster
-# application/vnd.cups-raw
-# application/vnd.curl
-application/vnd.curl.car                       car
-application/vnd.curl.pcurl                     pcurl
-# application/vnd.cybank
-application/vnd.dart                           dart
-application/vnd.data-vision.rdz                        rdz
-application/vnd.dece.data                      uvf uvvf uvd uvvd
-application/vnd.dece.ttml+xml                  uvt uvvt
-application/vnd.dece.unspecified               uvx uvvx
-application/vnd.dece.zip                       uvz uvvz
-application/vnd.denovo.fcselayout-link         fe_launch
-# application/vnd.dir-bi.plate-dl-nosuffix
-application/vnd.dna                            dna
-application/vnd.dolby.mlp                      mlp
-# application/vnd.dolby.mobile.1
-# application/vnd.dolby.mobile.2
-application/vnd.dpgraph                                dpg
-application/vnd.dreamfactory                   dfac
-application/vnd.ds-keypoint                    kpxx
-application/vnd.dvb.ait                                ait
-# application/vnd.dvb.dvbj
-# application/vnd.dvb.esgcontainer
-# application/vnd.dvb.ipdcdftnotifaccess
-# application/vnd.dvb.ipdcesgaccess
-# application/vnd.dvb.ipdcesgaccess2
-# application/vnd.dvb.ipdcesgpdd
-# application/vnd.dvb.ipdcroaming
-# application/vnd.dvb.iptv.alfec-base
-# application/vnd.dvb.iptv.alfec-enhancement
-# application/vnd.dvb.notif-aggregate-root+xml
-# application/vnd.dvb.notif-container+xml
-# application/vnd.dvb.notif-generic+xml
-# application/vnd.dvb.notif-ia-msglist+xml
-# application/vnd.dvb.notif-ia-registration-request+xml
-# application/vnd.dvb.notif-ia-registration-response+xml
-# application/vnd.dvb.notif-init+xml
-# application/vnd.dvb.pfr
-application/vnd.dvb.service                    svc
-# application/vnd.dxr
-application/vnd.dynageo                                geo
-# application/vnd.easykaraoke.cdgdownload
-# application/vnd.ecdis-update
-application/vnd.ecowin.chart                   mag
-# application/vnd.ecowin.filerequest
-# application/vnd.ecowin.fileupdate
-# application/vnd.ecowin.series
-# application/vnd.ecowin.seriesrequest
-# application/vnd.ecowin.seriesupdate
-# application/vnd.emclient.accessrequest+xml
-application/vnd.enliven                                nml
-# application/vnd.eprints.data+xml
-application/vnd.epson.esf                      esf
-application/vnd.epson.msf                      msf
-application/vnd.epson.quickanime               qam
-application/vnd.epson.salt                     slt
-application/vnd.epson.ssf                      ssf
-# application/vnd.ericsson.quickcall
-application/vnd.eszigno3+xml                   es3 et3
-# application/vnd.etsi.aoc+xml
-# application/vnd.etsi.cug+xml
-# application/vnd.etsi.iptvcommand+xml
-# application/vnd.etsi.iptvdiscovery+xml
-# application/vnd.etsi.iptvprofile+xml
-# application/vnd.etsi.iptvsad-bc+xml
-# application/vnd.etsi.iptvsad-cod+xml
-# application/vnd.etsi.iptvsad-npvr+xml
-# application/vnd.etsi.iptvservice+xml
-# application/vnd.etsi.iptvsync+xml
-# application/vnd.etsi.iptvueprofile+xml
-# application/vnd.etsi.mcid+xml
-# application/vnd.etsi.overload-control-policy-dataset+xml
-# application/vnd.etsi.sci+xml
-# application/vnd.etsi.simservs+xml
-# application/vnd.etsi.tsl+xml
-# application/vnd.etsi.tsl.der
-# application/vnd.eudora.data
-application/vnd.ezpix-album                    ez2
-application/vnd.ezpix-package                  ez3
-# application/vnd.f-secure.mobile
-application/vnd.fdf                            fdf
-application/vnd.fdsn.mseed                     mseed
-application/vnd.fdsn.seed                      seed dataless
-# application/vnd.ffsns
-# application/vnd.fints
-application/vnd.flographit                     gph
-application/vnd.fluxtime.clip                  ftc
-# application/vnd.font-fontforge-sfd
-application/vnd.framemaker                     fm frame maker book
-application/vnd.frogans.fnc                    fnc
-application/vnd.frogans.ltf                    ltf
-application/vnd.fsc.weblaunch                  fsc
-application/vnd.fujitsu.oasys                  oas
-application/vnd.fujitsu.oasys2                 oa2
-application/vnd.fujitsu.oasys3                 oa3
-application/vnd.fujitsu.oasysgp                        fg5
-application/vnd.fujitsu.oasysprs               bh2
-# application/vnd.fujixerox.art-ex
-# application/vnd.fujixerox.art4
-# application/vnd.fujixerox.hbpl
-application/vnd.fujixerox.ddd                  ddd
-application/vnd.fujixerox.docuworks            xdw
-application/vnd.fujixerox.docuworks.binder     xbd
-# application/vnd.fut-misnet
-application/vnd.fuzzysheet                     fzs
-application/vnd.genomatix.tuxedo               txd
-# application/vnd.geocube+xml
-application/vnd.geogebra.file                  ggb
-application/vnd.geogebra.tool                  ggt
-application/vnd.geometry-explorer              gex gre
-application/vnd.geonext                                gxt
-application/vnd.geoplan                                g2w
-application/vnd.geospace                       g3w
-# application/vnd.globalplatform.card-content-mgt
-# application/vnd.globalplatform.card-content-mgt-response
-application/vnd.gmx                            gmx
-application/vnd.google-earth.kml+xml           kml
-application/vnd.google-earth.kmz               kmz
-application/vnd.grafeq                         gqf gqs
-# application/vnd.gridmp
-application/vnd.groove-account                 gac
-application/vnd.groove-help                    ghf
-application/vnd.groove-identity-message                gim
-application/vnd.groove-injector                        grv
-application/vnd.groove-tool-message            gtm
-application/vnd.groove-tool-template           tpl
-application/vnd.groove-vcard                   vcg
-# application/vnd.hal+json
-application/vnd.hal+xml                                hal
-application/vnd.handheld-entertainment+xml     zmm
-application/vnd.hbci                           hbci
-# application/vnd.hcl-bireports
-application/vnd.hhe.lesson-player              les
-application/vnd.hp-hpgl                                hpgl
-application/vnd.hp-hpid                                hpid
-application/vnd.hp-hps                         hps
-application/vnd.hp-jlyt                                jlt
-application/vnd.hp-pcl                         pcl
-application/vnd.hp-pclxl                       pclxl
-# application/vnd.httphone
-application/vnd.hydrostatix.sof-data           sfd-hdstx
-# application/vnd.hzn-3d-crossword
-# application/vnd.ibm.afplinedata
-# application/vnd.ibm.electronic-media
-application/vnd.ibm.minipay                    mpy
-application/vnd.ibm.modcap                     afp listafp list3820
-application/vnd.ibm.rights-management          irm
-application/vnd.ibm.secure-container           sc
-application/vnd.iccprofile                     icc icm
-application/vnd.igloader                       igl
-application/vnd.immervision-ivp                        ivp
-application/vnd.immervision-ivu                        ivu
-# application/vnd.informedcontrol.rms+xml
-# application/vnd.informix-visionary
-# application/vnd.infotech.project
-# application/vnd.infotech.project+xml
-# application/vnd.innopath.wamp.notification
-application/vnd.insors.igm                     igm
-application/vnd.intercon.formnet               xpw xpx
-application/vnd.intergeo                       i2g
-# application/vnd.intertrust.digibox
-# application/vnd.intertrust.nncp
-application/vnd.intu.qbo                       qbo
-application/vnd.intu.qfx                       qfx
-# application/vnd.iptc.g2.conceptitem+xml
-# application/vnd.iptc.g2.knowledgeitem+xml
-# application/vnd.iptc.g2.newsitem+xml
-# application/vnd.iptc.g2.newsmessage+xml
-# application/vnd.iptc.g2.packageitem+xml
-# application/vnd.iptc.g2.planningitem+xml
-application/vnd.ipunplugged.rcprofile          rcprofile
-application/vnd.irepository.package+xml                irp
-application/vnd.is-xpr                         xpr
-application/vnd.isac.fcs                       fcs
-application/vnd.jam                            jam
-# application/vnd.japannet-directory-service
-# application/vnd.japannet-jpnstore-wakeup
-# application/vnd.japannet-payment-wakeup
-# application/vnd.japannet-registration
-# application/vnd.japannet-registration-wakeup
-# application/vnd.japannet-setstore-wakeup
-# application/vnd.japannet-verification
-# application/vnd.japannet-verification-wakeup
-application/vnd.jcp.javame.midlet-rms          rms
-application/vnd.jisp                           jisp
-application/vnd.joost.joda-archive             joda
-application/vnd.kahootz                                ktz ktr
-application/vnd.kde.karbon                     karbon
-application/vnd.kde.kchart                     chrt
-application/vnd.kde.kformula                   kfo
-application/vnd.kde.kivio                      flw
-application/vnd.kde.kontour                    kon
-application/vnd.kde.kpresenter                 kpr kpt
-application/vnd.kde.kspread                    ksp
-application/vnd.kde.kword                      kwd kwt
-application/vnd.kenameaapp                     htke
-application/vnd.kidspiration                   kia
-application/vnd.kinar                          kne knp
-application/vnd.koan                           skp skd skt skm
-application/vnd.kodak-descriptor               sse
-application/vnd.las.las+xml                    lasxml
-# application/vnd.liberty-request+xml
-application/vnd.llamagraphics.life-balance.desktop     lbd
-application/vnd.llamagraphics.life-balance.exchange+xml        lbe
-application/vnd.lotus-1-2-3                    123
-application/vnd.lotus-approach                 apr
-application/vnd.lotus-freelance                        pre
-application/vnd.lotus-notes                    nsf
-application/vnd.lotus-organizer                        org
-application/vnd.lotus-screencam                        scm
-application/vnd.lotus-wordpro                  lwp
-application/vnd.macports.portpkg               portpkg
-# application/vnd.marlin.drm.actiontoken+xml
-# application/vnd.marlin.drm.conftoken+xml
-# application/vnd.marlin.drm.license+xml
-# application/vnd.marlin.drm.mdcf
-application/vnd.mcd                            mcd
-application/vnd.medcalcdata                    mc1
-application/vnd.mediastation.cdkey             cdkey
-# application/vnd.meridian-slingshot
-application/vnd.mfer                           mwf
-application/vnd.mfmp                           mfm
-application/vnd.micrografx.flo                 flo
-application/vnd.micrografx.igx                 igx
-application/vnd.mif                            mif
-# application/vnd.minisoft-hp3000-save
-# application/vnd.mitsubishi.misty-guard.trustweb
-application/vnd.mobius.daf                     daf
-application/vnd.mobius.dis                     dis
-application/vnd.mobius.mbk                     mbk
-application/vnd.mobius.mqy                     mqy
-application/vnd.mobius.msl                     msl
-application/vnd.mobius.plc                     plc
-application/vnd.mobius.txf                     txf
-application/vnd.mophun.application             mpn
-application/vnd.mophun.certificate             mpc
-# application/vnd.motorola.flexsuite
-# application/vnd.motorola.flexsuite.adsi
-# application/vnd.motorola.flexsuite.fis
-# application/vnd.motorola.flexsuite.gotap
-# application/vnd.motorola.flexsuite.kmr
-# application/vnd.motorola.flexsuite.ttc
-# application/vnd.motorola.flexsuite.wem
-# application/vnd.motorola.iprm
-application/vnd.mozilla.xul+xml                        xul
-application/vnd.ms-artgalry                    cil
-# application/vnd.ms-asf
-application/vnd.ms-cab-compressed              cab
-# application/vnd.ms-color.iccprofile
-application/vnd.ms-excel                       xls xlm xla xlc xlt xlw
-application/vnd.ms-excel.addin.macroenabled.12         xlam
-application/vnd.ms-excel.sheet.binary.macroenabled.12  xlsb
-application/vnd.ms-excel.sheet.macroenabled.12         xlsm
-application/vnd.ms-excel.template.macroenabled.12      xltm
-application/vnd.ms-fontobject                  eot
-application/vnd.ms-htmlhelp                    chm
-application/vnd.ms-ims                         ims
-application/vnd.ms-lrm                         lrm
-# application/vnd.ms-office.activex+xml
-application/vnd.ms-officetheme                 thmx
-# application/vnd.ms-opentype
-# application/vnd.ms-package.obfuscated-opentype
-application/vnd.ms-pki.seccat                  cat
-application/vnd.ms-pki.stl                     stl
-# application/vnd.ms-playready.initiator+xml
-application/vnd.ms-powerpoint                  ppt pps pot
-application/vnd.ms-powerpoint.addin.macroenabled.12            ppam
-application/vnd.ms-powerpoint.presentation.macroenabled.12     pptm
-application/vnd.ms-powerpoint.slide.macroenabled.12            sldm
-application/vnd.ms-powerpoint.slideshow.macroenabled.12                ppsm
-application/vnd.ms-powerpoint.template.macroenabled.12         potm
-# application/vnd.ms-printing.printticket+xml
-application/vnd.ms-project                     mpp mpt
-# application/vnd.ms-tnef
-# application/vnd.ms-wmdrm.lic-chlg-req
-# application/vnd.ms-wmdrm.lic-resp
-# application/vnd.ms-wmdrm.meter-chlg-req
-# application/vnd.ms-wmdrm.meter-resp
-application/vnd.ms-word.document.macroenabled.12       docm
-application/vnd.ms-word.template.macroenabled.12       dotm
-application/vnd.ms-works                       wps wks wcm wdb
-application/vnd.ms-wpl                         wpl
-application/vnd.ms-xpsdocument                 xps
-application/vnd.mseq                           mseq
-# application/vnd.msign
-# application/vnd.multiad.creator
-# application/vnd.multiad.creator.cif
-# application/vnd.music-niff
-application/vnd.musician                       mus
-application/vnd.muvee.style                    msty
-application/vnd.mynfc                          taglet
-# application/vnd.ncd.control
-# application/vnd.ncd.reference
-# application/vnd.nervana
-# application/vnd.netfpx
-application/vnd.neurolanguage.nlu              nlu
-application/vnd.nitf                           ntf nitf
-application/vnd.noblenet-directory             nnd
-application/vnd.noblenet-sealer                        nns
-application/vnd.noblenet-web                   nnw
-# application/vnd.nokia.catalogs
-# application/vnd.nokia.conml+wbxml
-# application/vnd.nokia.conml+xml
-# application/vnd.nokia.isds-radio-presets
-# application/vnd.nokia.iptv.config+xml
-# application/vnd.nokia.landmark+wbxml
-# application/vnd.nokia.landmark+xml
-# application/vnd.nokia.landmarkcollection+xml
-# application/vnd.nokia.n-gage.ac+xml
-application/vnd.nokia.n-gage.data              ngdat
-application/vnd.nokia.n-gage.symbian.install   n-gage
-# application/vnd.nokia.ncd
-# application/vnd.nokia.pcd+wbxml
-# application/vnd.nokia.pcd+xml
-application/vnd.nokia.radio-preset             rpst
-application/vnd.nokia.radio-presets            rpss
-application/vnd.novadigm.edm                   edm
-application/vnd.novadigm.edx                   edx
-application/vnd.novadigm.ext                   ext
-# application/vnd.ntt-local.file-transfer
-# application/vnd.ntt-local.sip-ta_remote
-# application/vnd.ntt-local.sip-ta_tcp_stream
-application/vnd.oasis.opendocument.chart               odc
-application/vnd.oasis.opendocument.chart-template      otc
-application/vnd.oasis.opendocument.database            odb
-application/vnd.oasis.opendocument.formula             odf
-application/vnd.oasis.opendocument.formula-template    odft
-application/vnd.oasis.opendocument.graphics            odg
-application/vnd.oasis.opendocument.graphics-template   otg
-application/vnd.oasis.opendocument.image               odi
-application/vnd.oasis.opendocument.image-template      oti
-application/vnd.oasis.opendocument.presentation                odp
-application/vnd.oasis.opendocument.presentation-template       otp
-application/vnd.oasis.opendocument.spreadsheet         ods
-application/vnd.oasis.opendocument.spreadsheet-template        ots
-application/vnd.oasis.opendocument.text                        odt
-application/vnd.oasis.opendocument.text-master         odm
-application/vnd.oasis.opendocument.text-template       ott
-application/vnd.oasis.opendocument.text-web            oth
-# application/vnd.obn
-# application/vnd.oftn.l10n+json
-# application/vnd.oipf.contentaccessdownload+xml
-# application/vnd.oipf.contentaccessstreaming+xml
-# application/vnd.oipf.cspg-hexbinary
-# application/vnd.oipf.dae.svg+xml
-# application/vnd.oipf.dae.xhtml+xml
-# application/vnd.oipf.mippvcontrolmessage+xml
-# application/vnd.oipf.pae.gem
-# application/vnd.oipf.spdiscovery+xml
-# application/vnd.oipf.spdlist+xml
-# application/vnd.oipf.ueprofile+xml
-# application/vnd.oipf.userprofile+xml
-application/vnd.olpc-sugar                     xo
-# application/vnd.oma-scws-config
-# application/vnd.oma-scws-http-request
-# application/vnd.oma-scws-http-response
-# application/vnd.oma.bcast.associated-procedure-parameter+xml
-# application/vnd.oma.bcast.drm-trigger+xml
-# application/vnd.oma.bcast.imd+xml
-# application/vnd.oma.bcast.ltkm
-# application/vnd.oma.bcast.notification+xml
-# application/vnd.oma.bcast.provisioningtrigger
-# application/vnd.oma.bcast.sgboot
-# application/vnd.oma.bcast.sgdd+xml
-# application/vnd.oma.bcast.sgdu
-# application/vnd.oma.bcast.simple-symbol-container
-# application/vnd.oma.bcast.smartcard-trigger+xml
-# application/vnd.oma.bcast.sprov+xml
-# application/vnd.oma.bcast.stkm
-# application/vnd.oma.cab-address-book+xml
-# application/vnd.oma.cab-feature-handler+xml
-# application/vnd.oma.cab-pcc+xml
-# application/vnd.oma.cab-user-prefs+xml
-# application/vnd.oma.dcd
-# application/vnd.oma.dcdc
-application/vnd.oma.dd2+xml                    dd2
-# application/vnd.oma.drm.risd+xml
-# application/vnd.oma.group-usage-list+xml
-# application/vnd.oma.pal+xml
-# application/vnd.oma.poc.detailed-progress-report+xml
-# application/vnd.oma.poc.final-report+xml
-# application/vnd.oma.poc.groups+xml
-# application/vnd.oma.poc.invocation-descriptor+xml
-# application/vnd.oma.poc.optimized-progress-report+xml
-# application/vnd.oma.push
-# application/vnd.oma.scidm.messages+xml
-# application/vnd.oma.xcap-directory+xml
-# application/vnd.omads-email+xml
-# application/vnd.omads-file+xml
-# application/vnd.omads-folder+xml
-# application/vnd.omaloc-supl-init
-application/vnd.openofficeorg.extension                oxt
-# application/vnd.openxmlformats-officedocument.custom-properties+xml
-# application/vnd.openxmlformats-officedocument.customxmlproperties+xml
-# application/vnd.openxmlformats-officedocument.drawing+xml
-# application/vnd.openxmlformats-officedocument.drawingml.chart+xml
-# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml
-# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml
-# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml
-# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml
-# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml
-# application/vnd.openxmlformats-officedocument.extended-properties+xml
-# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml
-# application/vnd.openxmlformats-officedocument.presentationml.comments+xml
-# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml
-# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml
-# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml
-application/vnd.openxmlformats-officedocument.presentationml.presentation      pptx
-# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml
-# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml
-application/vnd.openxmlformats-officedocument.presentationml.slide     sldx
-# application/vnd.openxmlformats-officedocument.presentationml.slide+xml
-# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml
-# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml
-application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
-# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml
-# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml
-# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml
-# application/vnd.openxmlformats-officedocument.presentationml.tags+xml
-application/vnd.openxmlformats-officedocument.presentationml.template  potx
-# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml
-# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet      xlsx
-# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml
-application/vnd.openxmlformats-officedocument.spreadsheetml.template   xltx
-# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml
-# application/vnd.openxmlformats-officedocument.theme+xml
-# application/vnd.openxmlformats-officedocument.themeoverride+xml
-# application/vnd.openxmlformats-officedocument.vmldrawing
-# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml
-application/vnd.openxmlformats-officedocument.wordprocessingml.document        docx
-# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml
-application/vnd.openxmlformats-officedocument.wordprocessingml.template        dotx
-# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml
-# application/vnd.openxmlformats-package.core-properties+xml
-# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml
-# application/vnd.openxmlformats-package.relationships+xml
-# application/vnd.quobject-quoxdocument
-# application/vnd.osa.netdeploy
-application/vnd.osgeo.mapguide.package         mgp
-# application/vnd.osgi.bundle
-application/vnd.osgi.dp                                dp
-application/vnd.osgi.subsystem                 esa
-# application/vnd.otps.ct-kip+xml
-application/vnd.palm                           pdb pqa oprc
-# application/vnd.paos.xml
-application/vnd.pawaafile                      paw
-application/vnd.pg.format                      str
-application/vnd.pg.osasli                      ei6
-# application/vnd.piaccess.application-licence
-application/vnd.picsel                         efif
-application/vnd.pmi.widget                     wg
-# application/vnd.poc.group-advertisement+xml
-application/vnd.pocketlearn                    plf
-application/vnd.powerbuilder6                  pbd
-# application/vnd.powerbuilder6-s
-# application/vnd.powerbuilder7
-# application/vnd.powerbuilder7-s
-# application/vnd.powerbuilder75
-# application/vnd.powerbuilder75-s
-# application/vnd.preminet
-application/vnd.previewsystems.box             box
-application/vnd.proteus.magazine               mgz
-application/vnd.publishare-delta-tree          qps
-application/vnd.pvi.ptid1                      ptid
-# application/vnd.pwg-multiplexed
-# application/vnd.pwg-xhtml-print+xml
-# application/vnd.qualcomm.brew-app-res
-application/vnd.quark.quarkxpress              qxd qxt qwd qwt qxl qxb
-# application/vnd.radisys.moml+xml
-# application/vnd.radisys.msml+xml
-# application/vnd.radisys.msml-audit+xml
-# application/vnd.radisys.msml-audit-conf+xml
-# application/vnd.radisys.msml-audit-conn+xml
-# application/vnd.radisys.msml-audit-dialog+xml
-# application/vnd.radisys.msml-audit-stream+xml
-# application/vnd.radisys.msml-conf+xml
-# application/vnd.radisys.msml-dialog+xml
-# application/vnd.radisys.msml-dialog-base+xml
-# application/vnd.radisys.msml-dialog-fax-detect+xml
-# application/vnd.radisys.msml-dialog-fax-sendrecv+xml
-# application/vnd.radisys.msml-dialog-group+xml
-# application/vnd.radisys.msml-dialog-speech+xml
-# application/vnd.radisys.msml-dialog-transform+xml
-# application/vnd.rainstor.data
-# application/vnd.rapid
-application/vnd.realvnc.bed                    bed
-application/vnd.recordare.musicxml             mxl
-application/vnd.recordare.musicxml+xml         musicxml
-# application/vnd.renlearn.rlprint
-application/vnd.rig.cryptonote                 cryptonote
-application/vnd.rim.cod                                cod
-application/vnd.rn-realmedia                   rm
-application/vnd.rn-realmedia-vbr               rmvb
-application/vnd.route66.link66+xml             link66
-# application/vnd.rs-274x
-# application/vnd.ruckus.download
-# application/vnd.s3sms
-application/vnd.sailingtracker.track           st
-# application/vnd.sbm.cid
-# application/vnd.sbm.mid2
-# application/vnd.scribus
-# application/vnd.sealed.3df
-# application/vnd.sealed.csf
-# application/vnd.sealed.doc
-# application/vnd.sealed.eml
-# application/vnd.sealed.mht
-# application/vnd.sealed.net
-# application/vnd.sealed.ppt
-# application/vnd.sealed.tiff
-# application/vnd.sealed.xls
-# application/vnd.sealedmedia.softseal.html
-# application/vnd.sealedmedia.softseal.pdf
-application/vnd.seemail                                see
-application/vnd.sema                           sema
-application/vnd.semd                           semd
-application/vnd.semf                           semf
-application/vnd.shana.informed.formdata                ifm
-application/vnd.shana.informed.formtemplate    itp
-application/vnd.shana.informed.interchange     iif
-application/vnd.shana.informed.package         ipk
-application/vnd.simtech-mindmapper             twd twds
-application/vnd.smaf                           mmf
-# application/vnd.smart.notebook
-application/vnd.smart.teacher                  teacher
-# application/vnd.software602.filler.form+xml
-# application/vnd.software602.filler.form-xml-zip
-application/vnd.solent.sdkm+xml                        sdkm sdkd
-application/vnd.spotfire.dxp                   dxp
-application/vnd.spotfire.sfs                   sfs
-# application/vnd.sss-cod
-# application/vnd.sss-dtf
-# application/vnd.sss-ntf
-application/vnd.stardivision.calc              sdc
-application/vnd.stardivision.draw              sda
-application/vnd.stardivision.impress           sdd
-application/vnd.stardivision.math              smf
-application/vnd.stardivision.writer            sdw vor
-application/vnd.stardivision.writer-global     sgl
-application/vnd.stepmania.package              smzip
-application/vnd.stepmania.stepchart            sm
-# application/vnd.street-stream
-application/vnd.sun.xml.calc                   sxc
-application/vnd.sun.xml.calc.template          stc
-application/vnd.sun.xml.draw                   sxd
-application/vnd.sun.xml.draw.template          std
-application/vnd.sun.xml.impress                        sxi
-application/vnd.sun.xml.impress.template       sti
-application/vnd.sun.xml.math                   sxm
-application/vnd.sun.xml.writer                 sxw
-application/vnd.sun.xml.writer.global          sxg
-application/vnd.sun.xml.writer.template                stw
-# application/vnd.sun.wadl+xml
-application/vnd.sus-calendar                   sus susp
-application/vnd.svd                            svd
-# application/vnd.swiftview-ics
-application/vnd.symbian.install                        sis sisx
-application/vnd.syncml+xml                     xsm
-application/vnd.syncml.dm+wbxml                        bdm
-application/vnd.syncml.dm+xml                  xdm
-# application/vnd.syncml.dm.notification
-# application/vnd.syncml.ds.notification
-application/vnd.tao.intent-module-archive      tao
-application/vnd.tcpdump.pcap                   pcap cap dmp
-application/vnd.tmobile-livetv                 tmo
-application/vnd.trid.tpt                       tpt
-application/vnd.triscape.mxs                   mxs
-application/vnd.trueapp                                tra
-# application/vnd.truedoc
-# application/vnd.ubisoft.webplayer
-application/vnd.ufdl                           ufd ufdl
-application/vnd.uiq.theme                      utz
-application/vnd.umajin                         umj
-application/vnd.unity                          unityweb
-application/vnd.uoml+xml                       uoml
-# application/vnd.uplanet.alert
-# application/vnd.uplanet.alert-wbxml
-# application/vnd.uplanet.bearer-choice
-# application/vnd.uplanet.bearer-choice-wbxml
-# application/vnd.uplanet.cacheop
-# application/vnd.uplanet.cacheop-wbxml
-# application/vnd.uplanet.channel
-# application/vnd.uplanet.channel-wbxml
-# application/vnd.uplanet.list
-# application/vnd.uplanet.list-wbxml
-# application/vnd.uplanet.listcmd
-# application/vnd.uplanet.listcmd-wbxml
-# application/vnd.uplanet.signal
-application/vnd.vcx                            vcx
-# application/vnd.vd-study
-# application/vnd.vectorworks
-# application/vnd.verimatrix.vcas
-# application/vnd.vidsoft.vidconference
-application/vnd.visio                          vsd vst vss vsw
-application/vnd.visionary                      vis
-# application/vnd.vividence.scriptfile
-application/vnd.vsf                            vsf
-# application/vnd.wap.sic
-# application/vnd.wap.slc
-application/vnd.wap.wbxml                      wbxml
-application/vnd.wap.wmlc                       wmlc
-application/vnd.wap.wmlscriptc                 wmlsc
-application/vnd.webturbo                       wtb
-# application/vnd.wfa.wsc
-# application/vnd.wmc
-# application/vnd.wmf.bootstrap
-# application/vnd.wolfram.mathematica
-# application/vnd.wolfram.mathematica.package
-application/vnd.wolfram.player                 nbp
-application/vnd.wordperfect                    wpd
-application/vnd.wqd                            wqd
-# application/vnd.wrq-hp3000-labelled
-application/vnd.wt.stf                         stf
-# application/vnd.wv.csp+wbxml
-# application/vnd.wv.csp+xml
-# application/vnd.wv.ssp+xml
-application/vnd.xara                           xar
-application/vnd.xfdl                           xfdl
-# application/vnd.xfdl.webform
-# application/vnd.xmi+xml
-# application/vnd.xmpie.cpkg
-# application/vnd.xmpie.dpkg
-# application/vnd.xmpie.plan
-# application/vnd.xmpie.ppkg
-# application/vnd.xmpie.xlim
-application/vnd.yamaha.hv-dic                  hvd
-application/vnd.yamaha.hv-script               hvs
-application/vnd.yamaha.hv-voice                        hvp
-application/vnd.yamaha.openscoreformat                 osf
-application/vnd.yamaha.openscoreformat.osfpvg+xml      osfpvg
-# application/vnd.yamaha.remote-setup
-application/vnd.yamaha.smaf-audio              saf
-application/vnd.yamaha.smaf-phrase             spf
-# application/vnd.yamaha.through-ngn
-# application/vnd.yamaha.tunnel-udpencap
-application/vnd.yellowriver-custom-menu                cmp
-application/vnd.zul                            zir zirz
-application/vnd.zzazz.deck+xml                 zaz
-application/voicexml+xml                       vxml
-# application/vq-rtcpxr
-# application/watcherinfo+xml
-# application/whoispp-query
-# application/whoispp-response
-application/widget                             wgt
-application/winhlp                             hlp
-# application/wita
-# application/wordperfect5.1
-application/wsdl+xml                           wsdl
-application/wspolicy+xml                       wspolicy
-application/x-7z-compressed                    7z
-application/x-abiword                          abw
-application/x-ace-compressed                   ace
-# application/x-amf
-application/x-apple-diskimage                  dmg
-application/x-authorware-bin                   aab x32 u32 vox
-application/x-authorware-map                   aam
-application/x-authorware-seg                   aas
-application/x-bcpio                            bcpio
-application/x-bittorrent                       torrent
-application/x-blorb                            blb blorb
-application/x-bzip                             bz
-application/x-bzip2                            bz2 boz
-application/x-cbr                              cbr cba cbt cbz cb7
-application/x-cdlink                           vcd
-application/x-cfs-compressed                   cfs
-application/x-chat                             chat
-application/x-chess-pgn                                pgn
-application/x-conference                       nsc
-# application/x-compress
-application/x-cpio                             cpio
-application/x-csh                              csh
-application/x-debian-package                   deb udeb
-application/x-dgc-compressed                   dgc
-application/x-director                 dir dcr dxr cst cct cxt w3d fgd swa
-application/x-doom                             wad
-application/x-dtbncx+xml                       ncx
-application/x-dtbook+xml                       dtb
-application/x-dtbresource+xml                  res
-application/x-dvi                              dvi
-application/x-envoy                            evy
-application/x-eva                              eva
-application/x-font-bdf                         bdf
-# application/x-font-dos
-# application/x-font-framemaker
-application/x-font-ghostscript                 gsf
-# application/x-font-libgrx
-application/x-font-linux-psf                   psf
-application/x-font-otf                         otf
-application/x-font-pcf                         pcf
-application/x-font-snf                         snf
-# application/x-font-speedo
-# application/x-font-sunos-news
-application/x-font-ttf                         ttf ttc
-application/x-font-type1                       pfa pfb pfm afm
-application/x-font-woff                                woff
-# application/x-font-vfont
-application/x-freearc                          arc
-application/x-futuresplash                     spl
-application/x-gca-compressed                   gca
-application/x-glulx                            ulx
-application/x-gnumeric                         gnumeric
-application/x-gramps-xml                       gramps
-application/x-gtar                             gtar
-# application/x-gzip
-application/x-hdf                              hdf
-application/x-install-instructions             install
-application/x-iso9660-image                    iso
-application/x-java-jnlp-file                   jnlp
-application/x-latex                            latex
-application/x-lzh-compressed                   lzh lha
-application/x-mie                              mie
-application/x-mobipocket-ebook                 prc mobi
-application/x-mpegurl                          m3u8
-application/x-ms-application                   application
-application/x-ms-shortcut                      lnk
-application/x-ms-wmd                           wmd
-application/x-ms-wmz                           wmz
-application/x-ms-xbap                          xbap
-application/x-msaccess                         mdb
-application/x-msbinder                         obd
-application/x-mscardfile                       crd
-application/x-msclip                           clp
-application/x-msdownload                       exe dll com bat msi
-application/x-msmediaview                      mvb m13 m14
-application/x-msmetafile                       wmf wmz emf emz
-application/x-msmoney                          mny
-application/x-mspublisher                      pub
-application/x-msschedule                       scd
-application/x-msterminal                       trm
-application/x-mswrite                          wri
-application/x-netcdf                           nc cdf
-application/x-nzb                              nzb
-application/x-pkcs12                           p12 pfx
-application/x-pkcs7-certificates               p7b spc
-application/x-pkcs7-certreqresp                        p7r
-application/x-rar-compressed                   rar
-application/x-research-info-systems            ris
-application/x-sh                               sh
-application/x-shar                             shar
-application/x-shockwave-flash                  swf
-application/x-silverlight-app                  xap
-application/x-sql                              sql
-application/x-stuffit                          sit
-application/x-stuffitx                         sitx
-application/x-subrip                           srt
-application/x-sv4cpio                          sv4cpio
-application/x-sv4crc                           sv4crc
-application/x-t3vm-image                       t3
-application/x-tads                             gam
-application/x-tar                              tar
-application/x-tcl                              tcl
-application/x-tex                              tex
-application/x-tex-tfm                          tfm
-application/x-texinfo                          texinfo texi
-application/x-tgif                             obj
-application/x-ustar                            ustar
-application/x-wais-source                      src
-application/x-x509-ca-cert                     der crt
-application/x-xfig                             fig
-application/x-xliff+xml                                xlf
-application/x-xpinstall                                xpi
-application/x-xz                               xz
-application/x-zmachine                         z1 z2 z3 z4 z5 z6 z7 z8
-# application/x400-bp
-application/xaml+xml                           xaml
-# application/xcap-att+xml
-# application/xcap-caps+xml
-application/xcap-diff+xml                      xdf
-# application/xcap-el+xml
-# application/xcap-error+xml
-# application/xcap-ns+xml
-# application/xcon-conference-info-diff+xml
-# application/xcon-conference-info+xml
-application/xenc+xml                           xenc
-application/xhtml+xml                          xhtml xht
-# application/xhtml-voice+xml
-application/xml                                        xml xsl
-application/xml-dtd                            dtd
-# application/xml-external-parsed-entity
-# application/xmpp+xml
-application/xop+xml                            xop
-application/xproc+xml                          xpl
-application/xslt+xml                           xslt
-application/xspf+xml                           xspf
-application/xv+xml                             mxml xhvml xvml xvm
-application/yang                               yang
-application/yin+xml                            yin
-application/zip                                        zip
-# audio/1d-interleaved-parityfec
-# audio/32kadpcm
-# audio/3gpp
-# audio/3gpp2
-# audio/ac3
-audio/adpcm                                    adp
-# audio/amr
-# audio/amr-wb
-# audio/amr-wb+
-# audio/asc
-# audio/atrac-advanced-lossless
-# audio/atrac-x
-# audio/atrac3
-audio/basic                                    au snd
-# audio/bv16
-# audio/bv32
-# audio/clearmode
-# audio/cn
-# audio/dat12
-# audio/dls
-# audio/dsr-es201108
-# audio/dsr-es202050
-# audio/dsr-es202211
-# audio/dsr-es202212
-# audio/dv
-# audio/dvi4
-# audio/eac3
-# audio/evrc
-# audio/evrc-qcp
-# audio/evrc0
-# audio/evrc1
-# audio/evrcb
-# audio/evrcb0
-# audio/evrcb1
-# audio/evrcwb
-# audio/evrcwb0
-# audio/evrcwb1
-# audio/example
-# audio/fwdred
-# audio/g719
-# audio/g722
-# audio/g7221
-# audio/g723
-# audio/g726-16
-# audio/g726-24
-# audio/g726-32
-# audio/g726-40
-# audio/g728
-# audio/g729
-# audio/g7291
-# audio/g729d
-# audio/g729e
-# audio/gsm
-# audio/gsm-efr
-# audio/gsm-hr-08
-# audio/ilbc
-# audio/ip-mr_v2.5
-# audio/isac
-# audio/l16
-# audio/l20
-# audio/l24
-# audio/l8
-# audio/lpc
-audio/midi                                     mid midi kar rmi
-# audio/mobile-xmf
-audio/mp4                                      mp4a
-# audio/mp4a-latm
-audio/mp4a-latm                                        m4a m4p
-# audio/mpa
-# audio/mpa-robust
-audio/mpeg                                     mpga mp2 mp2a mp3 m2a m3a
-# audio/mpeg4-generic
-# audio/musepack
-audio/ogg                                      oga ogg spx
-# audio/opus
-# audio/parityfec
-# audio/pcma
-# audio/pcma-wb
-# audio/pcmu-wb
-# audio/pcmu
-# audio/prs.sid
-# audio/qcelp
-# audio/red
-# audio/rtp-enc-aescm128
-# audio/rtp-midi
-# audio/rtx
-audio/s3m                                      s3m
-audio/silk                                     sil
-# audio/smv
-# audio/smv0
-# audio/smv-qcp
-# audio/sp-midi
-# audio/speex
-# audio/t140c
-# audio/t38
-# audio/telephone-event
-# audio/tone
-# audio/uemclip
-# audio/ulpfec
-# audio/vdvi
-# audio/vmr-wb
-# audio/vnd.3gpp.iufp
-# audio/vnd.4sb
-# audio/vnd.audiokoz
-# audio/vnd.celp
-# audio/vnd.cisco.nse
-# audio/vnd.cmles.radio-events
-# audio/vnd.cns.anp1
-# audio/vnd.cns.inf1
-audio/vnd.dece.audio                           uva uvva
-audio/vnd.digital-winds                                eol
-# audio/vnd.dlna.adts
-# audio/vnd.dolby.heaac.1
-# audio/vnd.dolby.heaac.2
-# audio/vnd.dolby.mlp
-# audio/vnd.dolby.mps
-# audio/vnd.dolby.pl2
-# audio/vnd.dolby.pl2x
-# audio/vnd.dolby.pl2z
-# audio/vnd.dolby.pulse.1
-audio/vnd.dra                                  dra
-audio/vnd.dts                                  dts
-audio/vnd.dts.hd                               dtshd
-# audio/vnd.dvb.file
-# audio/vnd.everad.plj
-# audio/vnd.hns.audio
-audio/vnd.lucent.voice                         lvp
-audio/vnd.ms-playready.media.pya               pya
-# audio/vnd.nokia.mobile-xmf
-# audio/vnd.nortel.vbk
-audio/vnd.nuera.ecelp4800                      ecelp4800
-audio/vnd.nuera.ecelp7470                      ecelp7470
-audio/vnd.nuera.ecelp9600                      ecelp9600
-# audio/vnd.octel.sbc
-# audio/vnd.qcelp
-# audio/vnd.rhetorex.32kadpcm
-audio/vnd.rip                                  rip
-# audio/vnd.sealedmedia.softseal.mpeg
-# audio/vnd.vmx.cvsd
-# audio/vorbis
-# audio/vorbis-config
-audio/webm                                     weba
-audio/x-aac                                    aac
-audio/x-aiff                                   aif aiff aifc
-audio/x-caf                                    caf
-audio/x-flac                                   flac
-audio/x-matroska                               mka
-audio/x-mpegurl                                        m3u
-audio/x-ms-wax                                 wax
-audio/x-ms-wma                                 wma
-audio/x-pn-realaudio                           ram ra
-audio/x-pn-realaudio-plugin                    rmp
-# audio/x-tta
-audio/x-wav                                    wav
-audio/xm                                       xm
-chemical/x-cdx                                 cdx
-chemical/x-cif                                 cif
-chemical/x-cmdf                                        cmdf
-chemical/x-cml                                 cml
-chemical/x-csml                                        csml
-# chemical/x-pdb
-chemical/x-xyz                                 xyz
-image/bmp                                      bmp
-image/cgm                                      cgm
-# image/example
-# image/fits
-image/g3fax                                    g3
-image/gif                                      gif
-image/ief                                      ief
-# image/jp2
-image/jp2                                      jp2
-image/jpeg                                     jpeg jpg jpe
-# image/jpm
-# image/jpx
-image/ktx                                      ktx
-# image/naplps
-image/pict                                     pict pic pct
-image/png                                      png
-image/prs.btif                                 btif
-# image/prs.pti
-image/sgi                                      sgi
-image/svg+xml                                  svg svgz
-# image/t38
-image/tiff                                     tiff tif
-# image/tiff-fx
-image/vnd.adobe.photoshop                      psd
-# image/vnd.cns.inf2
-image/vnd.dece.graphic                         uvi uvvi uvg uvvg
-image/vnd.dvb.subtitle                         sub
-image/vnd.djvu                                 djvu djv
-image/vnd.dwg                                  dwg
-image/vnd.dxf                                  dxf
-image/vnd.fastbidsheet                         fbs
-image/vnd.fpx                                  fpx
-image/vnd.fst                                  fst
-image/vnd.fujixerox.edmics-mmr                 mmr
-image/vnd.fujixerox.edmics-rlc                 rlc
-# image/vnd.globalgraphics.pgb
-# image/vnd.microsoft.icon
-# image/vnd.mix
-image/vnd.ms-modi                              mdi
-image/vnd.ms-photo                             wdp
-image/vnd.net-fpx                              npx
-# image/vnd.radiance
-# image/vnd.sealed.png
-# image/vnd.sealedmedia.softseal.gif
-# image/vnd.sealedmedia.softseal.jpg
-# image/vnd.svf
-image/vnd.wap.wbmp                             wbmp
-image/vnd.xiff                                 xif
-image/webp                                     webp
-image/x-3ds                                    3ds
-image/x-cmu-raster                             ras
-image/x-cmx                                    cmx
-image/x-freehand                               fh fhc fh4 fh5 fh7
-image/x-icon                                   ico
-image/x-macpaint                               pntg pnt mac
-image/x-mrsid-image                            sid
-image/x-pcx                                    pcx
-image/x-pict                                   pic pct
-image/x-portable-anymap                                pnm
-image/x-portable-bitmap                                pbm
-image/x-portable-graymap                       pgm
-image/x-portable-pixmap                                ppm
-image/x-quicktime                              qtif qti
-image/x-rgb                                    rgb
-image/x-tga                                    tga
-image/x-xbitmap                                        xbm
-image/x-xpixmap                                        xpm
-image/x-xwindowdump                            xwd
-# message/cpim
-# message/delivery-status
-# message/disposition-notification
-# message/example
-# message/external-body
-# message/feedback-report
-# message/global
-# message/global-delivery-status
-# message/global-disposition-notification
-# message/global-headers
-# message/http
-# message/imdn+xml
-# message/news
-# message/partial
-message/rfc822                                 eml mime
-# message/s-http
-# message/sip
-# message/sipfrag
-# message/tracking-status
-# message/vnd.si.simp
-# model/example
-model/iges                                     igs iges
-model/mesh                                     msh mesh silo
-model/vnd.collada+xml                          dae
-model/vnd.dwf                                  dwf
-# model/vnd.flatland.3dml
-model/vnd.gdl                                  gdl
-# model/vnd.gs-gdl
-# model/vnd.gs.gdl
-model/vnd.gtw                                  gtw
-# model/vnd.moml+xml
-model/vnd.mts                                  mts
-# model/vnd.parasolid.transmit.binary
-# model/vnd.parasolid.transmit.text
-model/vnd.vtu                                  vtu
-model/vrml                                     wrl vrml
-model/x3d+binary                               x3db x3dbz
-model/x3d+vrml                                 x3dv x3dvz
-model/x3d+xml                                  x3d x3dz
-# multipart/alternative
-# multipart/appledouble
-# multipart/byteranges
-# multipart/digest
-# multipart/encrypted
-# multipart/example
-# multipart/form-data
-# multipart/header-set
-# multipart/mixed
-# multipart/parallel
-# multipart/related
-# multipart/report
-# multipart/signed
-# multipart/voice-message
-text/cache-manifest                            manifest
-# text/1d-interleaved-parityfec
-text/cache-manifest                            appcache
-text/calendar                                  ics ifb
-text/css                                       css
-text/csv                                       csv
-# text/directory
-# text/dns
-# text/ecmascript
-# text/enriched
-# text/example
-# text/fwdred
-text/html                                      html htm
-# text/javascript
-text/n3                                                n3
-# text/parityfec
-text/plain                                     txt text conf def list log in
-# text/prs.fallenstein.rst
-text/prs.lines.tag                             dsc
-# text/vnd.radisys.msml-basic-layout
-# text/red
-# text/rfc822-headers
-text/richtext                                  rtx
-# text/rtf
-# text/rtp-enc-aescm128
-# text/rtx
-text/sgml                                      sgml sgm
-# text/t140
-text/tab-separated-values                      tsv
-text/troff                                     t tr roff man me ms
-text/turtle                                    ttl
-# text/ulpfec
-text/uri-list                                  uri uris urls
-text/vcard                                     vcard
-# text/vnd.abc
-text/vnd.curl                                  curl
-text/vnd.curl.dcurl                            dcurl
-text/vnd.curl.scurl                            scurl
-text/vnd.curl.mcurl                            mcurl
-# text/vnd.dmclientscript
-text/vnd.dvb.subtitle                          sub
-# text/vnd.esmertec.theme-descriptor
-text/vnd.fly                                   fly
-text/vnd.fmi.flexstor                          flx
-text/vnd.graphviz                              gv
-text/vnd.in3d.3dml                             3dml
-text/vnd.in3d.spot                             spot
-# text/vnd.iptc.newsml
-# text/vnd.iptc.nitf
-# text/vnd.latex-z
-# text/vnd.motorola.reflex
-# text/vnd.ms-mediapackage
-# text/vnd.net2phone.commcenter.command
-# text/vnd.si.uricatalogue
-text/vnd.sun.j2me.app-descriptor               jad
-# text/vnd.trolltech.linguist
-# text/vnd.wap.si
-# text/vnd.wap.sl
-text/vnd.wap.wml                               wml
-text/vnd.wap.wmlscript                         wmls
-text/x-asm                                     s asm
-text/x-c                                       c cc cxx cpp h hh dic
-text/x-fortran                                 f for f77 f90
-text/x-java-source                             java
-text/x-opml                                    opml
-text/x-pascal                                  p pas
-text/x-nfo                                     nfo
-text/x-setext                                  etx
-text/x-sfv                                     sfv
-text/x-uuencode                                        uu
-text/x-vcalendar                               vcs
-text/x-vcard                                   vcf
-# text/xml
-# text/xml-external-parsed-entity
-# video/1d-interleaved-parityfec
-video/3gpp                                     3gp
-# video/3gpp-tt
-video/3gpp2                                    3g2
-# video/bmpeg
-# video/bt656
-# video/celb
-# video/dv
-# video/example
-video/h261                                     h261
-video/h263                                     h263
-# video/h263-1998
-# video/h263-2000
-video/h264                                     h264
-# video/h264-rcdo
-# video/h264-svc
-video/jpeg                                     jpgv
-# video/jpeg2000
-video/jpm                                      jpm jpgm
-video/mj2                                      mj2 mjp2
-# video/mp1s
-# video/mp2p
-# video/mp4v-es
-video/mp2t                                     ts
-video/mp4                                      mp4 mp4v mpg4 m4v
-video/mpeg                                     mpeg mpg mpe m1v m2v
-# video/mpeg4-generic
-# video/mpv
-# video/nv
-video/ogg                                      ogv
-# video/parityfec
-# video/pointer
-video/quicktime                                        qt mov
-# video/raw
-# video/rtp-enc-aescm128
-# video/rtx
-# video/smpte292m
-# video/ulpfec
-# video/vc1
-# video/vnd.cctv
-video/vnd.dece.hd                              uvh uvvh
-video/vnd.dece.mobile                          uvm uvvm
-# video/vnd.dece.mp4
-video/vnd.dece.pd                              uvp uvvp
-video/vnd.dece.sd                              uvs uvvs
-video/vnd.dece.video                           uvv uvvv
-# video/vnd.directv.mpeg
-# video/vnd.directv.mpeg-tts
-# video/vnd.dlna.mpeg-tts
-video/vnd.dvb.file                             dvb
-video/vnd.fvt                                  fvt
-# video/vnd.hns.video
-# video/vnd.iptvforum.1dparityfec-1010
-# video/vnd.iptvforum.1dparityfec-2005
-# video/vnd.iptvforum.2dparityfec-1010
-# video/vnd.iptvforum.2dparityfec-2005
-# video/vnd.iptvforum.ttsavc
-# video/vnd.iptvforum.ttsmpeg2
-# video/vnd.motorola.video
-# video/vnd.motorola.videop
-video/vnd.mpegurl                              mxu m4u
-video/vnd.ms-playready.media.pyv               pyv
-# video/vnd.nokia.interleaved-multimedia
-# video/vnd.nokia.videovoip
-# video/vnd.objectvideo
-# video/vnd.sealed.mpeg1
-# video/vnd.sealed.mpeg4
-# video/vnd.sealed.swf
-# video/vnd.sealedmedia.softseal.mov
-video/vnd.uvvu.mp4                             uvu uvvu
-video/vnd.vivo                                 viv
-video/x-dv                                     dv dif
-video/webm                                     webm
-video/x-f4v                                    f4v
-video/x-fli                                    fli
-video/x-flv                                    flv
-video/x-m4v                                    m4v
-video/x-matroska                               mkv mk3d mks
-video/x-mng                                    mng
-video/x-ms-asf                                 asf asx
-video/x-ms-vob                                 vob
-video/x-ms-wm                                  wm
-video/x-ms-wmv                                 wmv
-video/x-ms-wmx                                 wmx
-video/x-ms-wvx                                 wvx
-video/x-msvideo                                        avi
-video/x-sgi-movie                              movie
-video/x-smv                                    smv
-x-conference/x-cooltalk                                ice
diff --git a/misc/nacl/testzip.proto b/misc/nacl/testzip.proto
deleted file mode 100644 (file)
index 5a9804b..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-etc    src=/etc
-       mime.types      src=../misc/nacl/testdata/mime.types
-       resolv.conf     src=../misc/nacl/testdata/empty
-       group   src=../misc/nacl/testdata/group
-       passwd  src=../misc/nacl/testdata/empty
-       hosts   src=../misc/nacl/testdata/hosts
-       services
-usr    src=../misc/nacl/testdata
-       bin
-go     src=..
-       src
-               cmd
-                       api
-                               testdata
-                                       +
-                       asm
-                               internal
-                                       asm
-                                               testdata
-                                                       +
-                       compile
-                               internal
-                                       syntax
-                                               parser.go
-                       cover
-                               testdata
-                                       +
-                       doc
-                               main.go
-                               pkg.go
-                               doc_test.go
-                               testdata
-                                       +
-                       internal
-                               objfile
-                                       objfile.go
-                               buildid
-                                       testdata
-                                               +
-                       gofmt
-                               gofmt.go
-                               gofmt_test.go
-                               testdata
-                                       +
-                       vendor
-                               github.com
-                                       google
-                                               pprof
-                                                       internal
-                                                               binutils
-                                                                       +
-                                                               driver
-                                                                       +
-                                                               graph
-                                                                       +
-                                                               report
-                                                                       +
-                                                       profile
-                                                               +
-                                       ianlancetaylor
-                                               demangle
-                                                       +
-                               golang.org
-                                       x
-                                               arch
-                                                       arm
-                                                               armasm
-                                                                       +
-                                                       arm64
-                                                               arm64asm
-                                                                       +
-                                                       x86
-                                                               x86asm
-                                                                       +
-                                                       ppc64
-                                                               ppc64asm
-                                                                       +
-               archive
-                       tar
-                               testdata
-                                       +
-                       zip
-                               testdata
-                                       +
-               compress
-                       bzip2
-                               testdata
-                                       +
-                       flate
-                               testdata
-                                       +
-                       gzip
-                               testdata
-                                       +
-                       lzw
-                       testdata
-                               +
-                       zlib
-               crypto
-                       ed25519
-                               testdata
-                                       +
-                       rsa
-                               testdata
-                                       +
-                       tls
-                               testdata
-                                       +
-               debug
-                       dwarf
-                               testdata
-                                       +
-                       elf
-                               testdata
-                                       +
-                       macho
-                               testdata
-                                       +
-                       pe
-                               testdata
-                                       +
-                       plan9obj
-                               testdata
-                                       +
-               go
-                       build
-                               +
-                       doc
-                               testdata
-                                       +
-                       format
-                               +
-                       parser
-                               +
-                       printer
-                               +
-               image
-                       testdata
-                               +
-                       draw
-                       gif
-                       jpeg
-                       png
-                               testdata
-                                       +
-               internal
-                       trace
-                               testdata
-                                       +
-                       xcoff
-                               testdata
-                                       +
-               io
-                       +
-               mime
-                       testdata
-                               +
-                       multipart
-                               testdata
-                                       +
-               net
-                       http
-                               +
-                       testdata
-                               +
-               os
-                       +
-               path
-                       filepath
-                               +
-               regexp
-                       testdata
-                               +
-               runtime
-                       textflag.h
-               strconv
-                       testdata
-                               +
-               testdata
-                       +
-               text
-                       template
-                               testdata
-                                       +
-       lib
-               time
-                       zoneinfo.zip
-
-       test
-               +
index 5762a332de71e79ab521da2f7a1784a54486cf74..18d0b0db198351dba2a98a3aa1798b15ccdcf517 100755 (executable)
@@ -45,17 +45,17 @@ selectedtargets() {
        gettargets | egrep -v 'android-arm|darwin-arm' | egrep "$pattern"
 }
 
-# put linux, nacl first in the target list to get all the architectures up front.
-linux_nacl_targets() {
-       selectedtargets | egrep 'linux|nacl' | sort
+# put linux first in the target list to get all the architectures up front.
+linux_targets() {
+       selectedtargets | grep 'linux' | sort
 }
 
-non_linux_nacl_targets() {
-       selectedtargets | egrep -v 'linux|nacl' | sort
+non_linux_targets() {
+       selectedtargets | grep -v 'linux' | sort
 }
 
 # Note words in $targets are separated by both newlines and spaces.
-targets="$(linux_nacl_targets) $(non_linux_nacl_targets)"
+targets="$(linux_targets) $(non_linux_targets)"
 
 failed=false
 for target in $targets
index 77c398af826903c4315ff145f84d7e946943bfb5..5446b13b8b7bcae417696e5feb402d8f22a37189 100644 (file)
@@ -174,7 +174,7 @@ func TestIntendedInlining(t *testing.T) {
        }
 
        switch runtime.GOARCH {
-       case "nacl", "386", "wasm", "arm":
+       case "386", "wasm", "arm":
        default:
                // TODO(mvdan): As explained in /test/inline_sync.go, some
                // architectures don't have atomic intrinsics, so these go over
index b1184ffbb9dbc2f8c5d742aa87cdf3f41200bf96..f4725c0eb2977a8092e1f48eadbe308561e68076 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl
-
 package gc
 
 import (
index a17db87e8b232063aa5b7fb8f8b87682c573ecdf..60ada011e3e0b7dc552383442226509d3b883710 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl
-
 package ssa
 
 import (
index 09b852f3433e0a29932cd891637905cd548d140f..ea947d8f417c5f08fb5150144330a083521f7145 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl
-
 package types
 
 import (
index 9e503117ae6ab6b0ffec052e3363cf7fcf18f10e..8f2f57dc22f70fc7dc77758c2167b2c61bd8b815 100644 (file)
@@ -86,7 +86,6 @@ var okgoos = []string{
        "android",
        "solaris",
        "freebsd",
-       "nacl",
        "netbsd",
        "openbsd",
        "plan9",
@@ -1505,9 +1504,6 @@ var cgoEnabled = map[string]bool{
        "android/arm":     true,
        "android/arm64":   true,
        "js/wasm":         false,
-       "nacl/386":        false,
-       "nacl/amd64p32":   false,
-       "nacl/arm":        false,
        "netbsd/386":      true,
        "netbsd/amd64":    true,
        "netbsd/arm":      true,
index 3be9754e6745db56794f556274961fd5ebea4346..273ef2e19aca659754b08e3b5af93f64691bd1a1 100644 (file)
@@ -703,7 +703,7 @@ func (t *tester) registerTests() {
 
        // Doc tests only run on builders.
        // They find problems approximately never.
-       if t.hasBash() && goos != "nacl" && goos != "js" && goos != "android" && !t.iOS() && os.Getenv("GO_BUILDER_NAME") != "" {
+       if t.hasBash() && goos != "js" && goos != "android" && !t.iOS() && os.Getenv("GO_BUILDER_NAME") != "" {
                t.registerTest("doc_progs", "../doc/progs", "time", "go", "run", "run.go")
                t.registerTest("wiki", "../doc/articles/wiki", "./test.bash")
                t.registerTest("codewalk", "../doc/codewalk", "time", "./run")
@@ -735,7 +735,7 @@ func (t *tester) registerTests() {
                        })
                }
        }
-       if goos != "nacl" && goos != "android" && !t.iOS() && goos != "js" {
+       if goos != "android" && !t.iOS() && goos != "js" {
                t.tests = append(t.tests, distTest{
                        name:    "api",
                        heading: "API check",
index e6a3887a72db5ca776f6be2d93a1340e9438fb5a..b9e8a513d96930c0ab9551d0a3fbbc295085ccca 100644 (file)
@@ -383,10 +383,6 @@ func xsamefile(f1, f2 string) bool {
 }
 
 func xgetgoarm() string {
-       if goos == "nacl" {
-               // NaCl guarantees VFPv3 and is always cross-compiled.
-               return "7"
-       }
        if goos == "darwin" || goos == "android" {
                // Assume all darwin/arm and android devices have VFPv3.
                // These ports are also mostly cross-compiled, so it makes little
index 7bc5842cc6a48c07f6793434401ab1dff9f0e1d2..ef8152b03623d71c620c31d4d25e45ee812d9116 100644 (file)
@@ -33,9 +33,6 @@ func TestMain(m *testing.M) {
 }
 
 func maybeSkip(t *testing.T) {
-       if strings.HasPrefix(runtime.GOOS, "nacl") {
-               t.Skip("nacl does not have a full file tree")
-       }
        if runtime.GOOS == "darwin" && strings.HasPrefix(runtime.GOARCH, "arm") {
                t.Skip("darwin/arm does not have a full file tree")
        }
index bf00e1f4c935cd4216dc5f3cc62e644f8da4de8c..2561f5b2f8d6379a30e3c35f02e6b2167e170cfd 100644 (file)
 // If the -exec flag is not given, GOOS or GOARCH is different from the system
 // default, and a program named go_$GOOS_$GOARCH_exec can be found
 // on the current search path, 'go run' invokes the binary using that program,
-// for example 'go_nacl_386_exec a.out arguments...'. This allows execution of
+// for example 'go_js_wasm_exec a.out arguments...'. This allows execution of
 // cross-compiled programs when a simulator or other execution method is
 // available.
 //
index 71a2e01fa348474bde7d948e91ced8c36eb8b2a6..e4cf953b9e585fae1159e887691a3b5e52591177 100644 (file)
@@ -56,7 +56,7 @@ func tooSlow(t *testing.T) {
 
 func init() {
        switch runtime.GOOS {
-       case "android", "js", "nacl":
+       case "android", "js":
                canRun = false
        case "darwin":
                switch runtime.GOARCH {
@@ -5604,7 +5604,7 @@ func TestTestCacheInputs(t *testing.T) {
        tg.grepStdout(`\(cached\)`, "did not cache")
 
        switch runtime.GOOS {
-       case "nacl", "plan9", "windows":
+       case "plan9", "windows":
                // no shell scripts
        default:
                tg.run("test", "testcache", "-run=Exec")
index 9c0fa8411ee13ab4bad8e51457f2b414b41ecb6a..9bcab820ce65648dc2c632477592c1672f54acd8 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl
-
 package main_test
 
 import (
index c109eecadb3321c68382def51980bbb595019e37..342775a118286f9ecf790a02d3f87226bd14f17b 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js linux netbsd openbsd solaris
 
 package base
 
index 581a978ef8e632b7aa7a4eb75ceb305866be05a5..faf73446f7940db103935eba705170fde44f1a44 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !js,!nacl,!plan9
+// +build !js,!plan9
 
 package filelock_test
 
index 6d5819efdb0e91864f59fd2f879960a4b276db9e..ff8796fff4a453db14fc79099cf789a54ed530c4 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // js and nacl do not support inter-process file locking.
-// +build !js,!nacl
+// +build !js
 
 package lockedfile_test
 
index 1d5e594e7eb8c789717f03b5c29c7bd0eb7f4a68..d75d67c9a939a60cbf310f135416ce0a8b2a55a6 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl,!plan9,!windows,!js
+// +build !plan9,!windows,!js
 
 package renameio
 
index 648a87f665481be213e50a1639310ad0aae9d7e3..2edae38ccaa797d4851203a40a854799a2340cb5 100644 (file)
@@ -33,7 +33,7 @@ If the -exec flag is given, 'go run' invokes the binary using xprog:
 If the -exec flag is not given, GOOS or GOARCH is different from the system
 default, and a program named go_$GOOS_$GOARCH_exec can be found
 on the current search path, 'go run' invokes the binary using that program,
-for example 'go_nacl_386_exec a.out arguments...'. This allows execution of
+for example 'go_js_wasm_exec a.out arguments...'. This allows execution of
 cross-compiled programs when a simulator or other execution method is
 available.
 
index 55e1eea25ba08aaccc0df7b95d962010c65543d4..b60f4e27c04a539e693aec00aee069cb7debdb4a 100644 (file)
@@ -221,8 +221,6 @@ func pkgImportPath(pkgpath string) *load.Package {
 // See https://golang.org/issue/18878.
 func TestRespectSetgidDir(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl":
-               t.Skip("can't set SetGID bit with chmod on nacl")
        case "darwin":
                if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" {
                        t.Skip("can't set SetGID bit with chmod on iOS")
index 9b2d1ea78243d9bc251d59cabad0e079c1a70190..3de7c42faeaf058c3b749b43dde8ad8991b9afa7 100644 (file)
@@ -72,7 +72,7 @@ func TestDirList(t *testing.T) {
 }
 
 func TestExec(t *testing.T) {
-       if runtime.GOOS == "plan9" || runtime.GOOS == "windows" || runtime.GOOS == "nacl" {
+       if runtime.GOOS == "plan9" || runtime.GOOS == "windows" {
                t.Skip("non-unix")
        }
 
index e70d174637ddae5f453772441643b46378401eb5..05da9cc1e67c1eb0681c1c3470d95e6009d9606a 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl
-
 package obj
 
 import (
index da4602a1619e7aea7786d05a6f8c0cf694c3b839..e6e3916dad826f43782a92f8b7af0e8da56798ed 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl
-
 package sym
 
 import (
index 045d037d209f314302a006ba321221db6ab89ec4..f251ba28fc78d03bee09c91078b0bcbf62d5b095 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package rand
 
index f3091f51c5fd8ffcd38480e2949d5304d49e40fe..0610f691b0d494d5801e2e90c16145b44d787a39 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd plan9 solaris
 
 // Unix cryptographically secure pseudorandom number
 // generator.
diff --git a/src/crypto/x509/root_nacl.go b/src/crypto/x509/root_nacl.go
deleted file mode 100644 (file)
index 4413f64..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2015 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 x509
-
-// Possible certificate files; stop after finding one.
-var certFiles = []string{}
index 48de50b4ea65ff52a5db8e0a41637d41ebad27ec..f1e174c894086e07c29b387ea273a8526289c955 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package x509
 
index b826a0ff050e25321570ae673ae47622e19819b9..42e575e182d47557377518ac492820f2ed6f11f5 100644 (file)
@@ -784,7 +784,7 @@ func TestCompressedSection(t *testing.T) {
 func TestNoSectionOverlaps(t *testing.T) {
        // Ensure cmd/link outputs sections without overlaps.
        switch runtime.GOOS {
-       case "aix", "android", "darwin", "js", "nacl", "plan9", "windows":
+       case "aix", "android", "darwin", "js", "plan9", "windows":
                t.Skipf("cmd/link doesn't produce ELF binaries on %s", runtime.GOOS)
        }
        _ = net.ResolveIPAddr // force dynamic linkage
index cbb0c59127d06470b640c8b014d47b4e53f91f33..6443094515da8222ac0d300d14120722ed5ca646 100644 (file)
@@ -514,7 +514,7 @@ func listStdPkgs(goroot string) ([]string, error) {
 
 func TestDependencies(t *testing.T) {
        iOS := runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64")
-       if runtime.GOOS == "nacl" || iOS {
+       if iOS {
                // Tests run in a limited file system and we do not
                // provide access to every source file.
                t.Skipf("skipping on %s/%s, missing full GOROOT", runtime.GOOS, runtime.GOARCH)
index 37250fde413e4133f8518580b454388f3bd8b65c..a74a45686801bab142d1bf163942a31ece1a7c77 100644 (file)
@@ -100,7 +100,7 @@ var importerTests = [...]importerTest{
 }
 
 func TestGoxImporter(t *testing.T) {
-       testenv.MustHaveExec(t) // this is to skip nacl, js
+       testenv.MustHaveExec(t)
        initmap := make(map[*types.Package]InitData)
        imp := GetImporter([]string{"testdata"}, initmap)
 
index 3b7636806e7e5a8ad8f06ee83b9d24000abf2796..df93f3f0628b39695da68297b3b1bad2914e4204 100644 (file)
@@ -26,10 +26,7 @@ import (
 // import.
 func skipSpecialPlatforms(t *testing.T) {
        switch platform := runtime.GOOS + "-" + runtime.GOARCH; platform {
-       case "nacl-amd64p32",
-               "nacl-386",
-               "nacl-arm",
-               "darwin-arm",
+       case "darwin-arm",
                "darwin-arm64":
                t.Skipf("no compiled packages available for import on %s", platform)
        }
@@ -140,7 +137,7 @@ func TestImportTestdata(t *testing.T) {
 }
 
 func TestVersionHandling(t *testing.T) {
-       skipSpecialPlatforms(t) // we really only need to exclude nacl platforms, but this is fine
+       skipSpecialPlatforms(t)
 
        // This package only handles gc export data.
        if runtime.Compiler != "gc" {
index 492127bbab5764568f5ba15b7dee55e247f9d4db..b8fba7312ae3e2ae5485017229e9b2f5c3ae1133 100644 (file)
@@ -5,7 +5,7 @@
 // Only run where builders (build.golang.org) have
 // access to compiled packages for import.
 //
-// +build !arm,!arm64,!nacl
+// +build !arm,!arm64
 
 package types_test
 
index 228fbcf6d66013453d24887c4c0f6df87b3b8251..564e1133ed59a2018541310cb97cc9bb1994729c 100644 (file)
@@ -19,14 +19,8 @@ TEXT Â·cpuid(SB), NOSPLIT, $0-24
 
 // func xgetbv() (eax, edx uint32)
 TEXT Â·xgetbv(SB),NOSPLIT,$0-8
-#ifdef GOOS_nacl
-       // nacl does not support XGETBV.
-       MOVL $0, eax+0(FP)
-       MOVL $0, edx+4(FP)
-#else
        MOVL $0, CX
        XGETBV
        MOVL AX, eax+0(FP)
        MOVL DX, edx+4(FP)
-#endif
        RET
index 6b9bb8b7d0dfd44e204cb1a3f9c1a87d660c6505..abadf509300135835143ab697a53fe68798c485a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
 
 // Export guts for testing on posix.
 // Since testing imports os and os imports internal/poll,
index 6705a3e524cd4fc8417fc964556e56dd96505278..0886d749d343a2e96a0140477ad90f49ae57c754 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package poll
 
similarity index 99%
rename from src/internal/poll/fd_poll_nacljs.go
rename to src/internal/poll/fd_poll_js.go
index 0871f342d423b782ec7e7daf848b966ceb1389cb..2bfeb0a0b7af992f2f38cd0026800a6caf2b2056 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl js,wasm
+// +build js,wasm
 
 package poll
 
index b43ad51799640c31628c21702ae050c0cd6d994a..d0bacdd473746bcffe0fc5edd244748ffcf12ce1 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package poll
 
index 246d4989e1cf83a315a626060e0a3a840dcad7a4..4449eb3a15fe9cd74addb2a6f1d18e107984faa0 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
 
 package poll_test
 
index 8185269c53ca60cf3fd7baaaebd46b51a98fbce9..41d6ef593db35276cf041bfe789d08b82a63643e 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package poll
 
index a7512b1255f6fc984388f69a4caf3fd5222c21e4..11f90e96968752adbba6e13b409a5066132a1233 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package poll
 
index 64e46127d4502bf8f69bcca39f0b8dbc3107edea..7b87f136dfe5378f037cd47b320fd6815f9521a1 100644 (file)
@@ -5,7 +5,7 @@
 // This file implements sysSocket and accept for platforms that do not
 // provide a fast path for setting SetNonblock and CloseOnExec.
 
-// +build aix darwin js,wasm nacl solaris
+// +build aix darwin js,wasm solaris
 
 package poll
 
diff --git a/src/internal/syscall/unix/nonblocking_nacl.go b/src/internal/syscall/unix/nonblocking_nacl.go
deleted file mode 100644 (file)
index ff67c75..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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 unix
-
-func IsNonblock(fd int) (nonblocking bool, err error) {
-       return false, nil
-}
index f7a9730ca6f3c22ffd4f1b26bea0b87b7f73a4ba..b036aa6ebc78ce976e8735634e639cc81775ba09 100644 (file)
@@ -43,7 +43,7 @@ func HasGoBuild() bool {
                return false
        }
        switch runtime.GOOS {
-       case "android", "nacl", "js":
+       case "android", "js":
                return false
        case "darwin":
                if strings.HasPrefix(runtime.GOARCH, "arm") {
@@ -122,7 +122,7 @@ func GoTool() (string, error) {
 // using os.StartProcess or (more commonly) exec.Command.
 func HasExec() bool {
        switch runtime.GOOS {
-       case "nacl", "js":
+       case "js":
                return false
        case "darwin":
                if strings.HasPrefix(runtime.GOARCH, "arm") {
@@ -135,8 +135,6 @@ func HasExec() bool {
 // HasSrc reports whether the entire source tree is available under GOROOT.
 func HasSrc() bool {
        switch runtime.GOOS {
-       case "nacl":
-               return false
        case "darwin":
                if strings.HasPrefix(runtime.GOARCH, "arm") {
                        return false
@@ -175,14 +173,14 @@ func MustHaveExecPath(t testing.TB, path string) {
 // HasExternalNetwork reports whether the current system can use
 // external (non-localhost) networks.
 func HasExternalNetwork() bool {
-       return !testing.Short() && runtime.GOOS != "nacl" && runtime.GOOS != "js"
+       return !testing.Short() && runtime.GOOS != "js"
 }
 
 // MustHaveExternalNetwork checks that the current system can use
 // external (non-localhost) networks.
 // If not, MustHaveExternalNetwork calls t.Skip with an explanation.
 func MustHaveExternalNetwork(t testing.TB) {
-       if runtime.GOOS == "nacl" || runtime.GOOS == "js" {
+       if runtime.GOOS == "js" {
                t.Skipf("skipping test: no external network on %s", runtime.GOOS)
        }
        if testing.Short() {
index d8ce6cd38536daeff05ac34a7738629b5d4e6a6c..ccb5d5585f6d971846b36e36c5bd8bd5d29f2317 100644 (file)
@@ -12,7 +12,7 @@ import (
 
 func hasSymlink() (ok bool, reason string) {
        switch runtime.GOOS {
-       case "android", "nacl", "plan9":
+       case "android", "plan9":
                return false, ""
        }
 
index 54585232498575c7e92729a66368178c8daa54c9..bd12bea581f52fa41bf10cde221d98d3122c5b7b 100644 (file)
@@ -22,5 +22,3 @@ package syslog
 // see https://golang.org/issue/1108.
 
 // BUG(akumar): This package is not implemented on Plan 9.
-
-// BUG(minux): This package is not implemented on NaCl (Native Client).
index 3d5b76d219cd03e7fac46d8501eed07daeda6ee5..4288d37dee03ab13c137f2539cf083721afbf09c 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !windows,!nacl,!plan9
+// +build !windows,!plan9
 
 package syslog_test
 
index dfd0028e5c10e42e0b719f2c919515a28244b058..82dd4e7dd6d6d42a3c762126f1ba68604fea88be 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !windows,!nacl,!plan9
+// +build !windows,!plan9
 
 package syslog
 
index 8a28d67c98418b0fdf3dee4bbf7130af4a055185..dd1a1c4988a9ec4c252b5c41e021ea97d3fa03be 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !windows,!nacl,!plan9,!js
+// +build !windows,!plan9,!js
 
 package syslog
 
index 6c17e1f26060b87de4bce2cbd14484072c35364f..a64eed29f17fe8121622259135fe3ce3213f9158 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !windows,!nacl,!plan9
+// +build !windows,!plan9
 
 package syslog
 
index dfc1f88b2ae6dc0edbf4025ada86b7a73ebef275..0b247b623a748252ffa2ba8e963b82674588898e 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package mime
 
diff --git a/src/naclmake.bash b/src/naclmake.bash
deleted file mode 100755 (executable)
index 5e6c3ce..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2016 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.
-
-# naclmake.bash builds runs make.bash for nacl, but not does run any
-# tests. This is used by the continuous build.
-
-# Assumes that sel_ldr binaries and go_nacl_$GOARCH_exec scripts are in $PATH;
-# see ../misc/nacl/README.
-
-set -e
-ulimit -c 0
-
-# guess GOARCH if not set
-naclGOARCH=$GOARCH
-if [ -z "$naclGOARCH" ]; then
-       case "$(uname -m)" in
-       x86_64)
-               naclGOARCH=amd64p32
-               ;;
-       armv7l) # NativeClient on ARM only supports ARMv7A.
-               naclGOARCH=arm
-               ;;
-       i?86)
-               naclGOARCH=386
-               ;;
-       esac
-fi
-
-unset GOOS GOARCH
-if [ ! -f make.bash ]; then
-       echo 'nacltest.bash must be run from $GOROOT/src' 1>&2
-       exit 1
-fi
-
-# the builder might have set GOROOT_FINAL.
-export GOROOT=$(pwd)/..
-
-# Build zip file embedded in package syscall.
-echo "##### Building fake file system zip for nacl"
-rm -f syscall/fstest_nacl.go
-GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4}
-gobin=$GOROOT_BOOTSTRAP/bin
-GOROOT=$GOROOT_BOOTSTRAP $gobin/go run ../misc/nacl/mkzip.go -p syscall -r .. ../misc/nacl/testzip.proto syscall/fstest_nacl.go
-
-# Run standard build and tests.
-GOOS=nacl GOARCH=$naclGOARCH ./make.bash "$@"
diff --git a/src/nacltest.bash b/src/nacltest.bash
deleted file mode 100755 (executable)
index dc245b4..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2014 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.
-
-# For testing Native Client on builders or locally.
-# Builds a test file system and embeds it into package syscall
-# in every generated binary.
-#
-# Assumes that sel_ldr binaries and go_nacl_$GOARCH_exec scripts are in $PATH;
-# see ../misc/nacl/README.
-
-set -e
-ulimit -c 0
-
-. ./naclmake.bash "$@"
-
-# Check GOARCH.
-case "$naclGOARCH" in
-amd64p32)
-       if ! which sel_ldr_x86_64 >/dev/null; then
-               echo 'cannot find sel_ldr_x86_64' 1>&2
-               exit 1
-       fi
-       ;;
-386)
-       if ! which sel_ldr_x86_32 >/dev/null; then
-               echo 'cannot find sel_ldr_x86_32' 1>&2
-               exit 1
-       fi
-       ;;
-arm)
-       if ! which sel_ldr_arm >/dev/null; then
-               echo 'cannot find sel_ldr_arm' 1>&2
-               exit 1
-       fi
-       ;;
-*)
-       echo 'unsupported $GOARCH for nacl: '"$naclGOARCH" 1>&2
-       exit 1
-esac
-
-if ! which go_nacl_${naclGOARCH}_exec >/dev/null; then
-       echo "cannot find go_nacl_${naclGOARCH}_exec, see ../misc/nacl/README." 1>&2
-       exit 1
-fi
-
-export PATH=$(pwd)/../bin:$(pwd)/../misc/nacl:$PATH
-GOROOT=$(../bin/go env GOROOT)
-GOOS=nacl GOARCH=$naclGOARCH go tool dist test --no-rebuild
-
-rm -f syscall/fstest_nacl.go
index 1bf96fd3ce33aa1a9235d61734697655f94a5230..5a8d0e09cad6f673c70142d0e51c0ed20b3e048e 100644 (file)
@@ -763,11 +763,6 @@ func TestDialCancel(t *testing.T) {
        }
        mustHaveExternalNetwork(t)
 
-       if runtime.GOOS == "nacl" {
-               // nacl doesn't have external network access.
-               t.Skipf("skipping on %s", runtime.GOOS)
-       }
-
        blackholeIPPort := JoinHostPort(slowDst4, "1234")
        if !supportsIPv4() {
                blackholeIPPort = JoinHostPort(slowDst6, "1234")
@@ -923,7 +918,7 @@ func TestDialListenerAddr(t *testing.T) {
 
 func TestDialerControl(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
diff --git a/src/net/error_nacl.go b/src/net/error_nacl.go
deleted file mode 100644 (file)
index caad133..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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 net
-
-func isConnError(err error) bool {
-       return false
-}
index 70efa4c66fbca0622e5264f39e0c3e1aee8f2cfa..d709a273b73cf2d10f46b3c0474303917b3b73c3 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package net
 
index c4fee5aa5e54ae5ced3cdd2d59f0db97b0ad393a..89dcc2e6e6e1497b4b04413a0b2e07dcf5f49057 100644 (file)
@@ -185,7 +185,7 @@ func TestDialError(t *testing.T) {
 
 func TestProtocolDialError(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "solaris", "illumos":
+       case "solaris", "illumos":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
@@ -214,7 +214,7 @@ func TestProtocolDialError(t *testing.T) {
 
 func TestDialAddrError(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
        if !supportsIPv4() || !supportsIPv6() {
@@ -376,7 +376,7 @@ func TestListenPacketError(t *testing.T) {
 
 func TestProtocolListenError(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
index 4f59871f49fce7976c7f521b9fc088a7745e0b38..a6d64538102154929da369b1147c8cb1b68ca5f5 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package net
 
index 81a44e1f3f3d8ecaf81866428e7bd3ea0bdd6738..c13332c188aeef25def410a3d1b9833256540cb3 100644 (file)
@@ -6,7 +6,7 @@ package net
 
 import "os"
 
-// BUG(mikio): On JS, NaCl and Windows, the FileConn, FileListener and
+// BUG(mikio): On JS and Windows, the FileConn, FileListener and
 // FilePacketConn functions are not implemented.
 
 type fileAddr string
index 22566083658a85e2d199f897afe486519ab87674..bfb8100f53cf068583b23703c4204b40aa89ad51 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl js,wasm
+// +build js,wasm
 
 package net
 
index cd717747af6dc1ac327e26a701cfc3eba7ab2997..8c09c0da1bd93ec9818227cdc32bab46c7cf061f 100644 (file)
@@ -31,7 +31,7 @@ var fileConnTests = []struct {
 
 func TestFileConn(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9", "windows":
+       case "plan9", "windows":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
@@ -138,7 +138,7 @@ var fileListenerTests = []struct {
 
 func TestFileListener(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9", "windows":
+       case "plan9", "windows":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
@@ -230,7 +230,7 @@ var filePacketConnTests = []struct {
 
 func TestFilePacketConn(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9", "windows":
+       case "plan9", "windows":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
@@ -297,7 +297,7 @@ func TestFilePacketConn(t *testing.T) {
 // Issue 24483.
 func TestFileCloseRace(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9", "windows":
+       case "plan9", "windows":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
        if !testableNetwork("tcp") {
index a1568319f3c2abd1449c240732fcfcb69f39ec35..a28f1e066dad4727b7ae3dc13c96eb502de98a03 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package net
 
index 58248560a25c5f4a491b6768fe0959304e6b6081..914aaa010f3b98bb270f3455d4b39b454b8d71ca 100644 (file)
@@ -10,7 +10,7 @@ import (
        "time"
 )
 
-// BUG(mikio): On JS and NaCl, methods and functions related to
+// BUG(mikio): On JS, methods and functions related to
 // Interface are not implemented.
 
 // BUG(mikio): On AIX, DragonFly BSD, NetBSD, OpenBSD, Plan 9 and
index 0afaa80d632cc28fd984d05de9bd76485b903412..ec58665e195db4834a1061f906f7d4a7be893b44 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl js,wasm
+// +build js,wasm
 
 package net
 
index 6cdfb6265fff837e69f0df5a62aa5e10a90052ac..c34cd7432f75ccc122d44a5c953d01bfcd2dd1c7 100644 (file)
@@ -290,7 +290,7 @@ func checkUnicastStats(ifStats *ifStats, uniStats *routeStats) error {
 
 func checkMulticastStats(ifStats *ifStats, uniStats, multiStats *routeStats) error {
        switch runtime.GOOS {
-       case "aix", "dragonfly", "nacl", "netbsd", "openbsd", "plan9", "solaris", "illumos":
+       case "aix", "dragonfly", "netbsd", "openbsd", "plan9", "solaris", "illumos":
        default:
                // Test the existence of connected multicast route
                // clones for IPv4. Unlike IPv6, IPv4 multicast
index 0626aa06c08d105d401a48d82a897d4e48c3ce21..7dc35184105bb672262437c3a3363dec1fb8e802 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package socktest
 
index b96075bfe42fa77ec134dea8329a0aab93423f0a..0525512bff9534b9d4f422280b4f371982ac507b 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package socktest
 
index 8a9c26559bde741b71f95a20abe3f4a73461f4f0..f18331a1fd5a2f74f25014a46a1edd65b33ba6d6 100644 (file)
@@ -21,7 +21,7 @@ import (
 // change the behavior of these methods; use Read or ReadMsgIP
 // instead.
 
-// BUG(mikio): On JS, NaCl and Plan 9, methods and functions related
+// BUG(mikio): On JS and Plan 9, methods and functions related
 // to IPConn are not implemented.
 
 // BUG(mikio): On Windows, the File method of IPConn is not
index 2a5d49f49027426298834b21e20725f29aeb1b77..e653f6ae17b08dd30789235b3ed2dd188ec1e1f5 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package net
 
index 947f4ef6148b6481ba825ced5e4c3d16e9a71b0f..5570ed118d0257ce6aa1a103627f3ab8473b7323 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package net
 
@@ -134,7 +134,7 @@ func favoriteAddrFamily(network string, laddr, raddr sockaddr, mode string) (fam
 }
 
 func internetSocket(ctx context.Context, net string, laddr, raddr sockaddr, sotype, proto int, mode string, ctrlFn func(string, string, syscall.RawConn) error) (fd *netFD, err error) {
-       if (runtime.GOOS == "aix" || runtime.GOOS == "windows" || runtime.GOOS == "openbsd" || runtime.GOOS == "nacl") && mode == "dial" && raddr.isWildcard() {
+       if (runtime.GOOS == "aix" || runtime.GOOS == "windows" || runtime.GOOS == "openbsd") && mode == "dial" && raddr.isWildcard() {
                raddr = raddr.toLocal(net)
        }
        family, ipv6only := favoriteAddrFamily(net, laddr, raddr, mode)
index fef2b6405fa33e82ac5976cfadb28bf02d10a85d..d8c72096ed16514fc415f9ba15905fc2439a25de 100644 (file)
@@ -224,7 +224,7 @@ var dualStackTCPListenerTests = []struct {
 // to be greater than or equal to 4.4.
 func TestDualStackTCPListener(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
        if !supportsIPv4() || !supportsIPv6() {
@@ -314,7 +314,7 @@ var dualStackUDPListenerTests = []struct {
 // to be greater than or equal to 4.4.
 func TestDualStackUDPListener(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
        if !supportsIPv4() || !supportsIPv6() {
@@ -532,7 +532,7 @@ func TestIPv4MulticastListener(t *testing.T) {
        testenv.MustHaveExternalNetwork(t)
 
        switch runtime.GOOS {
-       case "android", "nacl", "plan9":
+       case "android", "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        case "solaris", "illumos":
                t.Skipf("not supported on solaris or illumos, see golang.org/issue/7399")
@@ -733,7 +733,7 @@ func TestClosingListener(t *testing.T) {
 
 func TestListenConfigControl(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
index 24d0d25c3a28a46b2046b714e526d88b86840ab3..9cebd10c87a14c4e99fa2c5b0a6edd730b9412b2 100644 (file)
@@ -27,8 +27,7 @@ var protocols = map[string]int{
 }
 
 // services contains minimal mappings between services names and port
-// numbers for platforms that don't have a complete list of port numbers
-// (some Solaris distros, nacl, etc).
+// numbers for platforms that don't have a complete list of port numbers.
 //
 // See https://www.iana.org/assignments/service-names-port-numbers
 //
index 6c8a151bcac1c89a4eca507cdb15926909b09581..3b3c39bc7dacf799ed32c42e5ca6a8d547bec6d6 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl js,wasm
+// +build js,wasm
 
 package net
 
index e85605fa2f9d2025607cc3f636a18b0fe27b33f3..b933291cea830db2d24a0d9fc30ce89b2c18a781 100644 (file)
@@ -858,10 +858,6 @@ func TestLookupProtocol_Minimal(t *testing.T) {
 }
 
 func TestLookupNonLDH(t *testing.T) {
-       if runtime.GOOS == "nacl" {
-               t.Skip("skip on nacl")
-       }
-
        defer dnsWaitGroup.Wait()
 
        if fixup := forceGoDNS(); fixup != nil {
@@ -886,10 +882,6 @@ func TestLookupNonLDH(t *testing.T) {
 
 func TestLookupContextCancel(t *testing.T) {
        mustHaveExternalNetwork(t)
-       if runtime.GOOS == "nacl" {
-               t.Skip("skip on nacl")
-       }
-
        defer dnsWaitGroup.Wait()
 
        ctx, ctxCancel := context.WithCancel(context.Background())
@@ -911,9 +903,6 @@ func TestLookupContextCancel(t *testing.T) {
 // crashes if nil is used.
 func TestNilResolverLookup(t *testing.T) {
        mustHaveExternalNetwork(t)
-       if runtime.GOOS == "nacl" {
-               t.Skip("skip on nacl")
-       }
        var r *Resolver = nil
        ctx := context.Background()
 
@@ -933,10 +922,6 @@ func TestNilResolverLookup(t *testing.T) {
 // canceled lookups (see golang.org/issue/24178 for details).
 func TestLookupHostCancel(t *testing.T) {
        mustHaveExternalNetwork(t)
-       if runtime.GOOS == "nacl" {
-               t.Skip("skip on nacl")
-       }
-
        const (
                google        = "www.google.com"
                invalidDomain = "invalid.invalid" // RFC 2606 reserves .invalid
index b535046bda14ddde8927d442b6b5b83b2de04061..a92dff56c2aae15360b3c337e0e1a3442eeb58cf 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !js,!nacl,!plan9,!windows
+// +build !js,!plan9,!windows
 
 package net
 
index 55e37708354eec2886d4ae6becd3baf3bd973436..bac84aa3002ab184272bd80a60efe746ad46b6b8 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build js,wasm nacl plan9 windows
+// +build js,wasm plan9 windows
 
 package net
 
index 34a8a104e82e6a161cec2d6d40073544663345e0..8b9897699c5cc78ce077fc3fbb2a798114f83306 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package net
 
index 463ae8856d2c57b274fb390a99de4ebb425518d6..a7406740f5206efd69dfd04a7a4b381fed1e0817 100644 (file)
@@ -72,7 +72,7 @@ func TestCloseRead(t *testing.T) {
 
 func TestCloseWrite(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
@@ -285,7 +285,6 @@ func TestPacketConnClose(t *testing.T) {
        }
 }
 
-// nacl was previous failing to reuse an address.
 func TestListenCloseListen(t *testing.T) {
        const maxTries = 10
        for tries := 0; tries < maxTries; tries++ {
@@ -302,7 +301,7 @@ func TestListenCloseListen(t *testing.T) {
                }
                ln, err = Listen("tcp", addr)
                if err == nil {
-                       // Success. nacl couldn't do this before.
+                       // Success. (This test didn't always make it here earlier.)
                        ln.Close()
                        return
                }
@@ -541,7 +540,7 @@ func TestNotTemporaryRead(t *testing.T) {
                if err == nil {
                        return errors.New("Read succeeded unexpectedly")
                } else if err == io.EOF {
-                       // This happens on NaCl and Plan 9.
+                       // This happens on Plan 9.
                        return nil
                } else if ne, ok := err.(Error); !ok {
                        return fmt.Errorf("unexpected error %v", err)
index 10f55c971df198f87b7e7ff36d4092a8bd4a874d..d35dfaade3ebc934cdbe276884a2e4e18c4006ae 100644 (file)
@@ -37,13 +37,9 @@ func testableNetwork(network string) bool {
        ss := strings.Split(network, ":")
        switch ss[0] {
        case "ip+nopriv":
-               switch runtime.GOOS {
-               case "nacl":
-                       return false
-               }
        case "ip", "ip4", "ip6":
                switch runtime.GOOS {
-               case "nacl", "plan9":
+               case "plan9":
                        return false
                default:
                        if os.Getuid() != 0 {
@@ -52,7 +48,7 @@ func testableNetwork(network string) bool {
                }
        case "unix", "unixgram":
                switch runtime.GOOS {
-               case "android", "nacl", "plan9", "windows":
+               case "android", "plan9", "windows":
                        return false
                case "aix":
                        return unixEnabledOnAIX
@@ -63,7 +59,7 @@ func testableNetwork(network string) bool {
                }
        case "unixpacket":
                switch runtime.GOOS {
-               case "aix", "android", "darwin", "nacl", "plan9", "windows":
+               case "aix", "android", "darwin", "plan9", "windows":
                        return false
                case "netbsd":
                        // It passes on amd64 at least. 386 fails (Issue 22927). arm is unknown.
index a6153c0c206df2a0c3aa22f5497c86fdd8610295..4fdd9a37bc673333fae20ebc85f9ce6d6a254faf 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris nacl
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 // Read system port mappings from /etc/services
 
index c40ea4a2e1248996acd8111dae59950c3a5329a5..c7863545826c636de4ab5cdb41eb5d0a933f04dd 100644 (file)
@@ -15,7 +15,7 @@ import (
 // deadlines. If the user-provided callback returns false, the Write
 // method will fail immediately.
 
-// BUG(mikio): On JS, NaCl and Plan 9, the Control, Read and Write
+// BUG(mikio): On JS and Plan 9, the Control, Read and Write
 // methods of syscall.RawConn are not implemented.
 
 type rawConn struct {
index 0a033c12fc5bb8e35824764a7c60e7e30cc07230..cec977f75d9e2764124e7a2e5126eb91e2f0cb9a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build js,wasm nacl plan9
+// +build js,wasm plan9
 
 package net
 
index 11900dff8dd0811524f94202480b861a4e2c9c1d..9a82f8f78e02b02cd3a2c3264a5bf688d45afbb8 100644 (file)
@@ -15,7 +15,7 @@ import (
 
 func TestRawConnReadWrite(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
@@ -175,7 +175,7 @@ func TestRawConnReadWrite(t *testing.T) {
 
 func TestRawConnControl(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
index 6d338da454f8d04ac6d35daf9f810f914bec4e4b..53bc53af43b09caeb8f198acaf6294e7a1ab15f4 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin js,wasm nacl netbsd openbsd
+// +build aix darwin js,wasm netbsd openbsd
 
 package net
 
index 911e6139c57e3f2529f61cd500299556b53749f5..13842a1261f74684fb06dfe23d783a71e2f2cc0d 100644 (file)
@@ -218,7 +218,7 @@ func TestSendfileSeeked(t *testing.T) {
 // Test that sendfile doesn't put a pipe into blocking mode.
 func TestSendfilePipe(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9", "windows":
+       case "plan9", "windows":
                // These systems don't support deadlines on pipes.
                t.Skipf("skipping on %s", runtime.GOOS)
        }
index 00ee61883cdd2606c26981a0b99af4ad5ee8b40b..80b4169ec64e77ea9f49c2e6c3723916055b1ddb 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
 
 package net
 
index bbce61b68799e2bd3d407e500fb1caf412aa218b..c9f86af4e7c5c029bd28c5dace0c9640acc50a4f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix nacl js,wasm solaris
+// +build aix js,wasm solaris
 
 package net
 
index ae83b5ab1965f9b1221386d6d3a39c8fd4af293e..a3710dd3f749f0995b78a5b33437353b806976cc 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package net
 
index bc0667504affccef4d851c2c83a6815d6e603adc..52624a35d81b891c40547f7eef4c4e731f4a579a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl js,wasm
+// +build js,wasm
 
 package net
 
index 3297969314e911a3a9d0a18923d5f3a8f9d0837b..57cd2890405c04c552897fed2779f4b2a637fcb7 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl js,wasm
+// +build js,wasm
 
 package net
 
index e97fb21a1f449f01978fc4bf7ca104b83718e246..89aad7066af980a0e4e46950ee6518edcda32f3e 100644 (file)
@@ -5,7 +5,7 @@
 // This file implements sysSocket and accept for platforms that do not
 // provide a fast path for setting SetNonblock and CloseOnExec.
 
-// +build aix darwin nacl solaris
+// +build aix darwin solaris
 
 package net
 
index b7b73d0d81701f09002b4518826d3816f685822f..9a9b03a1e89069920bc6bd174e0331fd48013bb2 100644 (file)
@@ -12,7 +12,7 @@ import (
        "time"
 )
 
-// BUG(mikio): On JS, NaCl and Windows, the File method of TCPConn and
+// BUG(mikio): On JS and Windows, the File method of TCPConn and
 // TCPListener is not implemented.
 
 // TCPAddr represents the address of a TCP end point.
index e32d5d7ee3508287a1bd2b5172837609607a11e5..257c11976f46b34399204c9ac4445eadc2a1405e 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package net
 
index f78675b185da3556f4873b2140c5343b06598293..8a704966931d062cdab82622494278c81a19ea30 100644 (file)
@@ -476,10 +476,6 @@ func TestTCPReadWriteAllocs(t *testing.T) {
                // I/O on Plan 9 allocates memory.
                // See net/fd_io_plan9.go.
                t.Skipf("not supported on %s", runtime.GOOS)
-       case "nacl":
-               // NaCl needs to allocate pseudo file descriptor
-               // stuff. See syscall/fd_nacl.go.
-               t.Skipf("not supported on %s", runtime.GOOS)
        }
 
        ln, err := Listen("tcp", "127.0.0.1:0")
index fd7f57923ba9b7094cf82f3463cf29787f67d62e..d043da123d6e81a78e6afe7ca51753ff46365c8c 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl js,wasm
+// +build js,wasm
 
 package net
 
index b4fc2c0198169e58bf0d55ff5a387416f804fe44..e90c16f34b13b31548b23a5d930731dddb5ebe89 100644 (file)
@@ -411,9 +411,6 @@ func TestReadTimeoutMustNotReturn(t *testing.T) {
                if perr := parseReadError(err); perr != nil {
                        t.Error(perr)
                }
-               if err == io.EOF && runtime.GOOS == "nacl" { // see golang.org/issue/8044
-                       return
-               }
                if nerr, ok := err.(Error); !ok || nerr.Timeout() || nerr.Temporary() {
                        t.Fatal(err)
                }
@@ -432,11 +429,6 @@ var readFromTimeoutTests = []struct {
 }
 
 func TestReadFromTimeout(t *testing.T) {
-       switch runtime.GOOS {
-       case "nacl":
-               t.Skipf("not supported on %s", runtime.GOOS) // see golang.org/issue/8916
-       }
-
        ch := make(chan Addr)
        defer close(ch)
        handler := func(ls *localPacketServer, c PacketConn) {
@@ -621,11 +613,6 @@ var writeToTimeoutTests = []struct {
 func TestWriteToTimeout(t *testing.T) {
        t.Parallel()
 
-       switch runtime.GOOS {
-       case "nacl":
-               t.Skipf("not supported on %s", runtime.GOOS)
-       }
-
        c1, err := newLocalPacketListener("udp")
        if err != nil {
                t.Fatal(err)
@@ -991,11 +978,6 @@ func TestReadWriteProlongedTimeout(t *testing.T) {
 func TestReadWriteDeadlineRace(t *testing.T) {
        t.Parallel()
 
-       switch runtime.GOOS {
-       case "nacl":
-               t.Skipf("not supported on %s", runtime.GOOS)
-       }
-
        N := 1000
        if testing.Short() {
                N = 50
index b234ed89abf24d75315385e57da49f0fb77abd89..ec2bcfa607bea18d142d3d52abf52665857a9fc0 100644 (file)
@@ -9,15 +9,12 @@ import (
        "syscall"
 )
 
-// BUG(mikio): On NaCl and Plan 9, the ReadMsgUDP and
+// BUG(mikio): On Plan 9, the ReadMsgUDP and
 // WriteMsgUDP methods of UDPConn are not implemented.
 
 // BUG(mikio): On Windows, the File method of UDPConn is not
 // implemented.
 
-// BUG(mikio): On NaCl, the ListenMulticastUDP function is not
-// implemented.
-
 // BUG(mikio): On JS, methods and functions related to UDPConn are not
 // implemented.
 
index 611fe51df91f9cba767c1cc1da850e9bb6b01fa0..bbfa4ed9c73afa8881e62c2441696876fb6077da 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package net
 
index 397b6649cda29fa7b8a960b25af884822a05ad13..947381a57b0ba0d274e275732c93832955dc085f 100644 (file)
@@ -162,13 +162,8 @@ func testWriteToConn(t *testing.T, raddr string) {
                t.Fatalf("should fail as ErrWriteToConnected: %v", err)
        }
        _, _, err = c.(*UDPConn).WriteMsgUDP(b, nil, nil)
-       switch runtime.GOOS {
-       case "nacl": // see golang.org/issue/9252
-               t.Skipf("not implemented yet on %s", runtime.GOOS)
-       default:
-               if err != nil {
-                       t.Fatal(err)
-               }
+       if err != nil {
+               t.Fatal(err)
        }
 }
 
@@ -205,13 +200,8 @@ func testWriteToPacketConn(t *testing.T, raddr string) {
                t.Fatalf("should fail as errMissingAddress: %v", err)
        }
        _, _, err = c.(*UDPConn).WriteMsgUDP(b, nil, ra)
-       switch runtime.GOOS {
-       case "nacl": // see golang.org/issue/9252
-               t.Skipf("not implemented yet on %s", runtime.GOOS)
-       default:
-               if err != nil {
-                       t.Fatal(err)
-               }
+       if err != nil {
+               t.Fatal(err)
        }
 }
 
@@ -335,7 +325,7 @@ func TestIPv6LinkLocalUnicastUDP(t *testing.T) {
 
 func TestUDPZeroBytePayload(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        case "darwin":
                testenv.SkipFlaky(t, 29225)
@@ -373,7 +363,7 @@ func TestUDPZeroBytePayload(t *testing.T) {
 
 func TestUDPZeroByteBuffer(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
@@ -410,7 +400,7 @@ func TestUDPZeroByteBuffer(t *testing.T) {
 
 func TestUDPReadSizeError(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "plan9":
+       case "plan9":
                t.Skipf("not supported on %s", runtime.GOOS)
        }
 
index ae912a46ddb8cca92acbfa878e74c749c4e87da7..b38438c11a82b0fb439b025d9430c1912926e9d4 100644 (file)
@@ -12,7 +12,7 @@ import (
        "time"
 )
 
-// BUG(mikio): On JS, NaCl and Plan 9, methods and functions related
+// BUG(mikio): On JS and Plan 9, methods and functions related
 // to UnixConn and UnixListener are not implemented.
 
 // BUG(mikio): On Windows, methods and functions related to UnixConn
index 74f5cc231cf05a1ad751c72631a20b4dae2bf28e..275c7c936d11c684fe43ec3f2db9a22422e58106 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package net
 
index 482899031077d1bba723add62832da1c6c931daf..80cccf21e3d0fd5cac61388fdc8ece70c742b244 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !js,!nacl,!plan9,!windows
+// +build !js,!plan9,!windows
 
 package net
 
index b2c8fe6f151c73d9f84a63f8d3820fdd692b91f5..e0c4989756b1a0ec983d21e19241a7f2e143b439 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package os
 
index 0478ba676aa7b9b36a7ac29d1354b9d14d5330ef..2aeca8230439e217ac304c8c526ad10675a1b0cf 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package os
 
index c47af56332048a7e23ec2100c2e7d6d3154b232e..bfc83c98673d8522d84fc55facedb46bb4c1fc8a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package os_test
 
index 799e0b4eeb922515814db8e44eb91d091a9c2b60..93793e0eee67a7fd241cb9d5279a805f210353b7 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package exec
 
index 505931b488323b380efe7647654676e9c2bac3cd..f6c7a49c1b3452f3273871da9857ffdd8a374b20 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package os
 
index abae5a2feb33999dea27e866020f21d0238fabb2..6e4ffe82d26767129114c5b88017c2ca69abc9f5 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package os
 
index 17eed10bc9f450560385cb48ce4860ff748d9ace..cc3134af1c1ebe9e0dd4ad1c367293b4666a4feb 100644 (file)
@@ -15,8 +15,6 @@ package os
 //
 // The main use case is finding resources located relative to an
 // executable.
-//
-// Executable is not supported on nacl.
 func Executable() (string, error) {
        return executable()
 }
index 5bb63b9bdc5c1ac28ad8d633fc29324e688b37ca..2628223b8db8434221be8b33835ca867a5a4050b 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build linux netbsd dragonfly nacl js,wasm
+// +build linux netbsd dragonfly js,wasm
 
 package os
 
index d513c8760ee6d7b436e9dfc35726409988f5b38d..f25ee0c95a1cdf11202b25557a72216c054abedc 100644 (file)
@@ -17,7 +17,7 @@ import (
 const executable_EnvVar = "OSTEST_OUTPUT_EXECPATH"
 
 func TestExecutable(t *testing.T) {
-       testenv.MustHaveExec(t) // will also exclude nacl, which doesn't support Executable anyway
+       testenv.MustHaveExec(t)
        ep, err := os.Executable()
        if err != nil {
                t.Fatalf("Executable failed: %v", err)
index 032b1a9dbffaa232e701ebff0647c11f1dc79406..39866a68deb8d33db0f4e74b9b6bbeb6a045bd72 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package os
 
index 9afc0ba360b8ce57cb5a45c73cf2ab6ce996ae37..51e0993f367420af3fac6cd03a120530a8a4aa97 100644 (file)
@@ -475,8 +475,6 @@ func UserHomeDir() (string, error) {
        }
        // On some geese the home directory is not always defined.
        switch runtime.GOOS {
-       case "nacl":
-               return "/", nil
        case "android":
                return "/sdcard", nil
        case "darwin":
index 23430792191faec1c5aa3755f3aa783c4271666c..c3635ddd289bdf8c59126ec001cc495c7cf479f0 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package os
 
index 754e859645388ad401b2ec8695ef30a01ca4bfc6..042c2997db39d61c2b55c17b5270302edfab8309 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package os
 
index b94ab0d23209ba802bbc6393d6262b903ad0714e..ae6bad1fee986cf475bfdc1c451d5c94fa2e2b52 100644 (file)
@@ -1159,9 +1159,7 @@ func testChtimes(t *testing.T, name string) {
        pmt := postStat.ModTime()
        if !pat.Before(at) {
                switch runtime.GOOS {
-               case "plan9", "nacl":
-                       // Ignore.
-                       // Plan 9, NaCl:
+               case "plan9":
                        // Mtime is the time of the last change of
                        // content.  Similarly, atime is set whenever
                        // the contents are accessed; also, it is set
@@ -1351,10 +1349,6 @@ func TestSeek(t *testing.T) {
                {0, io.SeekCurrent, 2<<32 - 1},
        }
        for i, tt := range tests {
-               if runtime.GOOS == "nacl" && tt.out > 1<<30 {
-                       t.Logf("skipping test case #%d on nacl; https://golang.org/issue/21728", i)
-                       continue
-               }
                off, err := f.Seek(tt.in, tt.whence)
                if off != tt.out || err != nil {
                        if e, ok := err.(*PathError); ok && e.Err == syscall.EINVAL && tt.out > 1<<32 && runtime.GOOS == "linux" {
@@ -1371,7 +1365,7 @@ func TestSeek(t *testing.T) {
 
 func TestSeekError(t *testing.T) {
        switch runtime.GOOS {
-       case "js", "nacl", "plan9":
+       case "js", "plan9":
                t.Skipf("skipping test on %v", runtime.GOOS)
        }
 
index df423d2c9daa8ab1f6d45963bcc7a1c1e62d8b41..c99a8240c531b2a1fa0a127b9ad409e7c04df08a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package os
 
index dc4c951a28638a214bbfbabfe3e05fc585f4f2fb..0d2d82feb951991ad8bee25831a3d0671ca5cda2 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly js,wasm nacl solaris
+// +build aix darwin dragonfly js,wasm solaris
 
 package os
 
index 4c53bc985d2de4ced6cdeb636b768c3829bbbc82..114c181c4ae047c08f0b9bbb6099910cf5ad31c0 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Test broken pipes on Unix systems.
-// +build !plan9,!nacl,!js
+// +build !plan9,!js
 
 package os_test
 
index 820150d959b09dcf6d6207e8158d2456f9776ddc..2554f5b087846b1c72e3153cb8bceaae2231716d 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // Test use of raw connections.
-// +build !plan9,!nacl,!js
+// +build !plan9,!js
 
 package os_test
 
index 4d556f977e4239b9024348651a743b732fb79b96..8700b6af17854c1751380f1a5075809327cb6b57 100644 (file)
@@ -289,7 +289,7 @@ func TestRemoveReadOnlyDir(t *testing.T) {
 // Issue #29983.
 func TestRemoveAllButReadOnlyAndPathError(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "js", "windows":
+       case "js", "windows":
                t.Skipf("skipping test on %s", runtime.GOOS)
        }
 
@@ -379,7 +379,7 @@ func TestRemoveAllButReadOnlyAndPathError(t *testing.T) {
 
 func TestRemoveUnreadableDir(t *testing.T) {
        switch runtime.GOOS {
-       case "nacl", "js", "windows":
+       case "js", "windows":
                t.Skipf("skipping test on %s", runtime.GOOS)
        }
 
index 0bbf41bfde5f579c2de88ce53d09e871dea5b3cc..89ee2d9e1856927a436b72575f053344e9a47d8f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package signal
 
similarity index 98%
rename from src/os/stat_nacljs.go
rename to src/os/stat_js.go
index f14add8674a507b1c4276e4367e217e48f356cd3..8d20ccddfcc43c282583bb10b541b9cd4528619f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build js,wasm nacl
+// +build js,wasm
 
 package os
 
index 4f85dcea077c613c5ab075244c9a50dab014e351..0a7e6029ac2344e746e81afc81abc5a928a77aff 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package os
 
index d820be2ab67207f0f732e9386caadeb8c4c79b5f..b1698f5d4c763cb84ef0758e2baceaa7799fa590 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin dragonfly freebsd js,wasm nacl netbsd openbsd
+// +build darwin dragonfly freebsd js,wasm netbsd openbsd
 
 package os
 
diff --git a/src/os/sys_nacl.go b/src/os/sys_nacl.go
deleted file mode 100644 (file)
index 07907c8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2014 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 os
-
-// supportsCloseOnExec reports whether the platform supports the
-// O_CLOEXEC flag.
-const supportsCloseOnExec = false
index 5d7ea7ea29cb8083a64cdf8e44b3edcaf3460e36..0fe03fa517f43a161b60b63f6dff99c04b2df73b 100644 (file)
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl
 // +build !js
 // +build !plan9
 // +build !windows
index 7164514828fcd27417b6b4a6cf5eeee7c5465233..178d814dda07f581267b5684ea8d5f352559b8e8 100644 (file)
@@ -35,15 +35,8 @@ func current() (*User, error) {
                Name:     "", // ignored
                HomeDir:  homeDir,
        }
-       // On NaCL and Android, return a dummy user instead of failing.
+       // On Android, return a dummy user instead of failing.
        switch runtime.GOOS {
-       case "nacl":
-               if u.Uid == "" {
-                       u.Uid = "1"
-               }
-               if u.Username == "" {
-                       u.Username = "nacl"
-               }
        case "android":
                if u.Uid == "" {
                        u.Uid = "1"
index be62f4d0c3ef3def57c7de8c0244f2e7a75f8baf..0890cd8f2bf0f4d6bfccdae1cc8ebf664d5d7234 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm !android,linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm !android,linux netbsd openbsd solaris
 // +build !cgo osusergo
 
 package user
index 65fe0656de66a099d30d575aa74c1cd1dad9b40e..72d3b4753445b081fc7fb638eb33a3fc5155ed2a 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd !android,linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd !android,linux netbsd openbsd solaris
 // +build !cgo
 
 package user
index 469abf764016bbbe2f0ac5671777dcf195048294..0f4cdc4533909a8f06379a909376e8f7ad8c398d 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly js,wasm nacl netbsd openbsd solaris
+// +build aix darwin dragonfly js,wasm netbsd openbsd solaris
 
 package os
 
index c10b3288a1ec4de9c9f278e756d51cb95fd7ec12..ec497d9e26bb8ccb0765dbefb46063c6be4cab0e 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package filepath
 
index b334c5cf0ec027d7983e24d12f7825a44cb28684..30b79edaad7c4fc75915b2a8ed5c558b290c8f33 100644 (file)
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl
 // +build !linux linux,!arm64
 
 package plugin_test
index 7c5dd59aa78ca9bddb731f78264fe33c91d587f4..1fbc8dd61cf8563c8460a9bc44622e844ec7f94a 100644 (file)
@@ -6416,7 +6416,7 @@ func TestGCBits(t *testing.T) {
                join(hdr, rep(8, lit(0, 1)), rep(8, lit(1)), lit(1)))
        verifyMapBucket(t, Tint64, Tptr,
                map[int64]Xptr(nil),
-               join(hdr, rep(8, rep(8/PtrSize, lit(0))), rep(8, lit(1)), naclpad(), lit(1)))
+               join(hdr, rep(8, rep(8/PtrSize, lit(0))), rep(8, lit(1)), lit(1)))
        verifyMapBucket(t,
                Tscalar, Tscalar,
                map[Xscalar]Xscalar(nil),
@@ -6443,13 +6443,6 @@ func TestGCBits(t *testing.T) {
                join(hdr, rep(8, lit(1)), rep(8, lit(1)), lit(1)))
 }
 
-func naclpad() []byte {
-       if runtime.GOARCH == "amd64p32" {
-               return lit(0)
-       }
-       return nil
-}
-
 func rep(n int, b []byte) []byte { return bytes.Repeat(b, n) }
 func join(b ...[]byte) []byte    { return bytes.Join(b, nil) }
 func lit(x ...byte) []byte       { return x }
index 935d45d503974c78f609d35fd6b2e9dfd65e2c4f..56a821298108f15fc190a9072affcf9f7aacf027 100644 (file)
@@ -321,7 +321,6 @@ var hashkey [4]uintptr
 func alginit() {
        // Install AES hash algorithms if the instructions needed are present.
        if (GOARCH == "386" || GOARCH == "amd64") &&
-               GOOS != "nacl" &&
                cpu.X86.HasAES && // AESENC
                cpu.X86.HasSSSE3 && // PSHUFB
                cpu.X86.HasSSE41 { // PINSR{D,Q}
index b31ea41ad4a9ec348e3cbf1df639d8e047b5ce50..8f0ec08f80da63ad3bd56c9a1502e74ab5ad12a6 100644 (file)
@@ -109,9 +109,6 @@ TEXT runtime·rt0_go(SB),NOSPLIT|NOFRAME,$0
        MOVL    SP, (g_stack+stack_hi)(BP)
 
        // find out information about the processor we're on
-#ifdef GOOS_nacl // NaCl doesn't like PUSHFL/POPFL
-       JMP     has_cpuid
-#else
        // first see if CPUID instruction is supported.
        PUSHFL
        PUSHFL
@@ -123,7 +120,6 @@ TEXT runtime·rt0_go(SB),NOSPLIT|NOFRAME,$0
        POPFL   // restore EFLAGS
        TESTL   $(1<<21), AX
        JNE     has_cpuid
-#endif
 
 bad_proc: // show that the program requires MMX.
        MOVL    $2, 0(SP)
index ade39dfed870c01aa16c34f0a2c4d3d35eefa4db..51a50c604cc053dd683362f3d320d369d178522a 100644 (file)
@@ -185,14 +185,10 @@ GLOBL     runtime·mainPC(SB),RODATA,$4
 TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
        // gdb won't skip this breakpoint instruction automatically,
        // so you must manually "set $pc+=4" to skip it and continue.
-#ifdef GOOS_nacl
-       WORD    $0xe125be7f     // BKPT 0x5bef, NACL_INSTR_ARM_BREAKPOINT
-#else
 #ifdef GOOS_plan9
        WORD    $0xD1200070     // undefined instruction used as armv5 breakpoint in Plan 9
 #else
        WORD    $0xe7f001f0     // undefined instruction that gdb understands is a software breakpoint
-#endif
 #endif
        RET
 
@@ -327,9 +323,6 @@ switch:
        // save our state in g->sched. Pretend to
        // be systemstack_switch if the G stack is scanned.
        MOVW    $runtime·systemstack_switch(SB), R3
-#ifdef GOOS_nacl
-       ADD     $4, R3, R3 // get past nacl-insert bic instruction
-#endif
        ADD     $4, R3, R3 // get past push {lr}
        MOVW    R3, (g_sched+gobuf_pc)(g)
        MOVW    R13, (g_sched+gobuf_sp)(g)
@@ -887,7 +880,6 @@ TEXT runtime·usplitR0(SB),NOSPLIT,$0
        SUB     R1, R3, R1
        RET
 
-#ifndef GOOS_nacl
 // This is called from .init_array and follows the platform, not Go, ABI.
 TEXT runtime·addmoduledata(SB),NOSPLIT,$0-0
        MOVW    R9, saver9-4(SP) // The access to global variables below implicitly uses R9, which is callee-save
@@ -898,7 +890,6 @@ TEXT runtime·addmoduledata(SB),NOSPLIT,$0-0
        MOVW    saver11-8(SP), R11
        MOVW    saver9-4(SP), R9
        RET
-#endif
 
 TEXT Â·checkASM(SB),NOSPLIT,$0-1
        MOVW    $1, R3
@@ -935,8 +926,6 @@ ret:
        MOVM.IA.W       (R13), [R0,R1]
        // Do the write.
        MOVW    R3, (R2)
-       // Normally RET on nacl clobbers R12, but because this
-       // function has no frame it doesn't have to usual epilogue.
        RET
 
 flush:
index bf349a5d89d3c6508fcf4072e1785a6d6e5c32b1..06c197ec2b2388a99948d87ee56b4bab573a2849 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build windows plan9 nacl js,wasm
+// +build windows plan9 js,wasm
 
 package runtime_test
 
index c986efcb325e742e7cd3a20e16142bdd469ff673..de1ec27d21e5317854225729d7849be38accbe39 100644 (file)
@@ -13,7 +13,7 @@ import (
 )
 
 func TestWriteHeapDumpNonempty(t *testing.T) {
-       if runtime.GOOS == "nacl" || runtime.GOOS == "js" {
+       if runtime.GOOS == "js" {
                t.Skipf("WriteHeapDump is not available on %s.", runtime.GOOS)
        }
        f, err := ioutil.TempFile("", "heapdumptest")
@@ -42,7 +42,7 @@ func objfin(x *Obj) {
 }
 
 func TestWriteHeapDumpFinalizers(t *testing.T) {
-       if runtime.GOOS == "nacl" || runtime.GOOS == "js" {
+       if runtime.GOOS == "js" {
                t.Skipf("WriteHeapDump is not available on %s.", runtime.GOOS)
        }
        f, err := ioutil.TempFile("", "heapdumptest")
diff --git a/src/runtime/defs_nacl_386.go b/src/runtime/defs_nacl_386.go
deleted file mode 100644 (file)
index 70dfcf2..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-package runtime
-
-const (
-       // These values are referred to in the source code
-       // but really don't matter. Even so, use the standard numbers.
-       _SIGQUIT = 3
-       _SIGTRAP = 5
-       _SIGSEGV = 11
-       _SIGPROF = 27
-)
-
-type timespec struct {
-       tv_sec  int64
-       tv_nsec int32
-}
-
-//go:nosplit
-func (ts *timespec) setNsec(ns int64) {
-       ts.tv_sec = int64(timediv(ns, 1e9, &ts.tv_nsec))
-}
-
-type excregs386 struct {
-       eax    uint32
-       ecx    uint32
-       edx    uint32
-       ebx    uint32
-       esp    uint32
-       ebp    uint32
-       esi    uint32
-       edi    uint32
-       eip    uint32
-       eflags uint32
-}
-
-type exccontext struct {
-       size                    uint32
-       portable_context_offset uint32
-       portable_context_size   uint32
-       arch                    uint32
-       regs_size               uint32
-       reserved                [11]uint32
-       regs                    excregs386
-}
-
-type excportablecontext struct {
-       pc uint32
-       sp uint32
-       fp uint32
-}
diff --git a/src/runtime/defs_nacl_arm.go b/src/runtime/defs_nacl_arm.go
deleted file mode 100644 (file)
index 89e539e..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-package runtime
-
-const (
-       // These values are referred to in the source code
-       // but really don't matter. Even so, use the standard numbers.
-       _SIGQUIT = 3
-       _SIGTRAP = 5
-       _SIGSEGV = 11
-       _SIGPROF = 27
-)
-
-type timespec struct {
-       tv_sec  int64
-       tv_nsec int32
-}
-
-//go:nosplit
-func (ts *timespec) setNsec(ns int64) {
-       ts.tv_sec = int64(timediv(ns, 1e9, &ts.tv_nsec))
-}
-
-type excregsarm struct {
-       r0   uint32
-       r1   uint32
-       r2   uint32
-       r3   uint32
-       r4   uint32
-       r5   uint32
-       r6   uint32
-       r7   uint32
-       r8   uint32
-       r9   uint32 // the value reported here is undefined.
-       r10  uint32
-       r11  uint32
-       r12  uint32
-       sp   uint32 /* r13 */
-       lr   uint32 /* r14 */
-       pc   uint32 /* r15 */
-       cpsr uint32
-}
-
-type exccontext struct {
-       size                    uint32
-       portable_context_offset uint32
-       portable_context_size   uint32
-       arch                    uint32
-       regs_size               uint32
-       reserved                [11]uint32
-       regs                    excregsarm
-}
-
-type excportablecontext struct {
-       pc uint32
-       sp uint32
-       fp uint32
-}
index 03208c7c10f239686e10f3d69dc824506a78bf9f..f95ff685450785d71cc9cfa2f4a532e0c674fa63 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package runtime
 
index 6c4a4466de6f8099e97b94698f33e12b17133c62..aeaf37f64be9209ffedf55f764d1fe9e183b926d 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 // Export guts for testing.
 
index 3426fd170219e445f4a141617a5d5a28d9f30c77..b51f70a512f885a3efe70a91113bc474630cd09c 100644 (file)
@@ -7,7 +7,7 @@ package sys
 const (
        ArchFamily          = I386
        BigEndian           = false
-       DefaultPhysPageSize = GoosNacl*65536 + (1-GoosNacl)*4096 // 4k normally; 64k on NaCl
+       DefaultPhysPageSize = 4096
        PCQuantum           = 1
        Int64Align          = 4
        MinFrameSize        = 0
diff --git a/src/runtime/internal/sys/zgoos_nacl.go b/src/runtime/internal/sys/zgoos_nacl.go
deleted file mode 100644 (file)
index 9e65b6f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
-
-// +build nacl
-
-package sys
-
-const GOOS = `nacl`
-
-const GoosAix = 0
-const GoosAndroid = 0
-const GoosDarwin = 0
-const GoosDragonfly = 0
-const GoosFreebsd = 0
-const GoosHurd = 0
-const GoosIllumos = 0
-const GoosJs = 0
-const GoosLinux = 0
-const GoosNacl = 1
-const GoosNetbsd = 0
-const GoosOpenbsd = 0
-const GoosPlan9 = 0
-const GoosSolaris = 0
-const GoosWindows = 0
-const GoosZos = 0
index d36ca50971d6e0298c4b6d79629aa91cf33bce2e..f07ff1c06b48cf9c0011f781b9df79cee09009ba 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build 386 arm nacl mips mipsle
+// +build 386 arm mips mipsle
 
 package runtime
 
index b36c97f71e873098bf3802c8d61268079f7cbca8..9507d46f41c58c465400960d402de6524e939526 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin nacl netbsd openbsd plan9 solaris windows
+// +build aix darwin netbsd openbsd plan9 solaris windows
 
 package runtime
 
index 08a2391610b0bd4e78e0a8f6183aaa06ae5ae191..ad2353952321c4f85bce2df203b9f5383b1bf114 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build dragonfly freebsd nacl netbsd openbsd solaris
+// +build dragonfly freebsd netbsd openbsd solaris
 
 package runtime
 
diff --git a/src/runtime/mknacl.sh b/src/runtime/mknacl.sh
deleted file mode 100644 (file)
index 306ae3d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2013 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.
-
-cat /Users/rsc/pub/native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h |
-       awk '
-       BEGIN {
-               printf("// Code generated by mknacl.sh; DO NOT EDIT.\n")
-       }
-       NF==3 && $1=="#define" && $2~/^NACL_sys_/ {
-               name=$2
-               sub(/^NACL_sys_/, "SYS_", name)
-               printf("#define %s %s\n", name, $3)
-       }' >syscall_nacl.h
index 2868f3fd4e5971b5a8e9554edd969f5bdd335463..9fe31cb41666a019c7bc819501c11353bb5e2c3b 100644 (file)
@@ -5,7 +5,6 @@
 // +build !plan9
 // +build !solaris
 // +build !windows
-// +build !nacl
 // +build !linux !amd64
 // +build !linux !arm64
 // +build !js
index 73bbc5e3c7b8619c57ebb2d251c5a4b4f4d1d1bb..adb072db38b6a985e1286857d3972694fa6fcb91 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
 
 package runtime
 
index 5b1a63a8787d023d5a94f86a98eb7186d23300a6..214538e28108a2b92b407a11a3db2714a49ce9cc 100644 (file)
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Fake network poller for NaCl and wasm/js.
+// Fake network poller for wasm/js.
 // Should never be used, because NaCl and wasm/js network connections do not honor "SetNonblock".
 
-// +build nacl js,wasm
+// +build js,wasm
 
 package runtime
 
diff --git a/src/runtime/os2_nacl.go b/src/runtime/os2_nacl.go
deleted file mode 100644 (file)
index b84cb18..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2014 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 runtime
-
-const (
-       _NSIG    = 32
-       _SI_USER = 1
-
-       // native_client/src/trusted/service_runtime/include/sys/errno.h
-       // The errors are mainly copied from Linux.
-       _EPERM   = 1  /* Operation not permitted */
-       _ENOENT  = 2  /* No such file or directory */
-       _ESRCH   = 3  /* No such process */
-       _EINTR   = 4  /* Interrupted system call */
-       _EIO     = 5  /* I/O error */
-       _ENXIO   = 6  /* No such device or address */
-       _E2BIG   = 7  /* Argument list too long */
-       _ENOEXEC = 8  /* Exec format error */
-       _EBADF   = 9  /* Bad file number */
-       _ECHILD  = 10 /* No child processes */
-       _EAGAIN  = 11 /* Try again */
-       // _ENOMEM is defined in mem_bsd.go for nacl.
-       // _ENOMEM          = 12       /* Out of memory */
-       _EACCES          = 13       /* Permission denied */
-       _EFAULT          = 14       /* Bad address */
-       _EBUSY           = 16       /* Device or resource busy */
-       _EEXIST          = 17       /* File exists */
-       _EXDEV           = 18       /* Cross-device link */
-       _ENODEV          = 19       /* No such device */
-       _ENOTDIR         = 20       /* Not a directory */
-       _EISDIR          = 21       /* Is a directory */
-       _EINVAL          = 22       /* Invalid argument */
-       _ENFILE          = 23       /* File table overflow */
-       _EMFILE          = 24       /* Too many open files */
-       _ENOTTY          = 25       /* Not a typewriter */
-       _EFBIG           = 27       /* File too large */
-       _ENOSPC          = 28       /* No space left on device */
-       _ESPIPE          = 29       /* Illegal seek */
-       _EROFS           = 30       /* Read-only file system */
-       _EMLINK          = 31       /* Too many links */
-       _EPIPE           = 32       /* Broken pipe */
-       _ENAMETOOLONG    = 36       /* File name too long */
-       _ENOSYS          = 38       /* Function not implemented */
-       _EDQUOT          = 122      /* Quota exceeded */
-       _EDOM            = 33       /* Math arg out of domain of func */
-       _ERANGE          = 34       /* Math result not representable */
-       _EDEADLK         = 35       /* Deadlock condition */
-       _ENOLCK          = 37       /* No record locks available */
-       _ENOTEMPTY       = 39       /* Directory not empty */
-       _ELOOP           = 40       /* Too many symbolic links */
-       _ENOMSG          = 42       /* No message of desired type */
-       _EIDRM           = 43       /* Identifier removed */
-       _ECHRNG          = 44       /* Channel number out of range */
-       _EL2NSYNC        = 45       /* Level 2 not synchronized */
-       _EL3HLT          = 46       /* Level 3 halted */
-       _EL3RST          = 47       /* Level 3 reset */
-       _ELNRNG          = 48       /* Link number out of range */
-       _EUNATCH         = 49       /* Protocol driver not attached */
-       _ENOCSI          = 50       /* No CSI structure available */
-       _EL2HLT          = 51       /* Level 2 halted */
-       _EBADE           = 52       /* Invalid exchange */
-       _EBADR           = 53       /* Invalid request descriptor */
-       _EXFULL          = 54       /* Exchange full */
-       _ENOANO          = 55       /* No anode */
-       _EBADRQC         = 56       /* Invalid request code */
-       _EBADSLT         = 57       /* Invalid slot */
-       _EDEADLOCK       = _EDEADLK /* File locking deadlock error */
-       _EBFONT          = 59       /* Bad font file fmt */
-       _ENOSTR          = 60       /* Device not a stream */
-       _ENODATA         = 61       /* No data (for no delay io) */
-       _ETIME           = 62       /* Timer expired */
-       _ENOSR           = 63       /* Out of streams resources */
-       _ENONET          = 64       /* Machine is not on the network */
-       _ENOPKG          = 65       /* Package not installed */
-       _EREMOTE         = 66       /* The object is remote */
-       _ENOLINK         = 67       /* The link has been severed */
-       _EADV            = 68       /* Advertise error */
-       _ESRMNT          = 69       /* Srmount error */
-       _ECOMM           = 70       /* Communication error on send */
-       _EPROTO          = 71       /* Protocol error */
-       _EMULTIHOP       = 72       /* Multihop attempted */
-       _EDOTDOT         = 73       /* Cross mount point (not really error) */
-       _EBADMSG         = 74       /* Trying to read unreadable message */
-       _EOVERFLOW       = 75       /* Value too large for defined data type */
-       _ENOTUNIQ        = 76       /* Given log. name not unique */
-       _EBADFD          = 77       /* f.d. invalid for this operation */
-       _EREMCHG         = 78       /* Remote address changed */
-       _ELIBACC         = 79       /* Can't access a needed shared lib */
-       _ELIBBAD         = 80       /* Accessing a corrupted shared lib */
-       _ELIBSCN         = 81       /* .lib section in a.out corrupted */
-       _ELIBMAX         = 82       /* Attempting to link in too many libs */
-       _ELIBEXEC        = 83       /* Attempting to exec a shared library */
-       _EILSEQ          = 84
-       _EUSERS          = 87
-       _ENOTSOCK        = 88  /* Socket operation on non-socket */
-       _EDESTADDRREQ    = 89  /* Destination address required */
-       _EMSGSIZE        = 90  /* Message too long */
-       _EPROTOTYPE      = 91  /* Protocol wrong type for socket */
-       _ENOPROTOOPT     = 92  /* Protocol not available */
-       _EPROTONOSUPPORT = 93  /* Unknown protocol */
-       _ESOCKTNOSUPPORT = 94  /* Socket type not supported */
-       _EOPNOTSUPP      = 95  /* Operation not supported on transport endpoint */
-       _EPFNOSUPPORT    = 96  /* Protocol family not supported */
-       _EAFNOSUPPORT    = 97  /* Address family not supported by protocol family */
-       _EADDRINUSE      = 98  /* Address already in use */
-       _EADDRNOTAVAIL   = 99  /* Address not available */
-       _ENETDOWN        = 100 /* Network interface is not configured */
-       _ENETUNREACH     = 101 /* Network is unreachable */
-       _ENETRESET       = 102
-       _ECONNABORTED    = 103 /* Connection aborted */
-       _ECONNRESET      = 104 /* Connection reset by peer */
-       _ENOBUFS         = 105 /* No buffer space available */
-       _EISCONN         = 106 /* Socket is already connected */
-       _ENOTCONN        = 107 /* Socket is not connected */
-       _ESHUTDOWN       = 108 /* Can't send after socket shutdown */
-       _ETOOMANYREFS    = 109
-       _ETIMEDOUT       = 110 /* Connection timed out */
-       _ECONNREFUSED    = 111 /* Connection refused */
-       _EHOSTDOWN       = 112 /* Host is down */
-       _EHOSTUNREACH    = 113 /* Host is unreachable */
-       _EALREADY        = 114 /* Socket already connected */
-       _EINPROGRESS     = 115 /* Connection already in progress */
-       _ESTALE          = 116
-       _ENOTSUP         = _EOPNOTSUPP /* Not supported */
-       _ENOMEDIUM       = 123         /* No medium (in tape drive) */
-       _ECANCELED       = 125         /* Operation canceled. */
-       _ELBIN           = 2048        /* Inode is remote (not really error) */
-       _EFTYPE          = 2049        /* Inappropriate file type or format */
-       _ENMFILE         = 2050        /* No more files */
-       _EPROCLIM        = 2051
-       _ENOSHARE        = 2052    /* No such host or network path */
-       _ECASECLASH      = 2053    /* Filename exists with different case */
-       _EWOULDBLOCK     = _EAGAIN /* Operation would block */
-
-       // native_client/src/trusted/service_runtime/include/bits/mman.h.
-       // NOTE: DO NOT USE native_client/src/shared/imc/nacl_imc_c.h.
-       // Those MAP_*values are different from these.
-       _PROT_NONE  = 0x0
-       _PROT_READ  = 0x1
-       _PROT_WRITE = 0x2
-       _PROT_EXEC  = 0x4
-
-       _MAP_SHARED  = 0x1
-       _MAP_PRIVATE = 0x2
-       _MAP_FIXED   = 0x10
-       _MAP_ANON    = 0x20
-
-       _MADV_FREE  = 0
-       _SIGFPE     = 8
-       _FPE_INTDIV = 0
-)
-
-type siginfo struct{}
diff --git a/src/runtime/os_nacl.go b/src/runtime/os_nacl.go
deleted file mode 100644 (file)
index 8cda597..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-// 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.
-
-package runtime
-
-import "unsafe"
-
-type mOS struct {
-       waitsema      int32 // semaphore for parking on locks
-       waitsemacount int32
-       waitsemalock  int32
-}
-
-func nacl_exception_stack(p uintptr, size int32) int32
-func nacl_exception_handler(fn uintptr, arg unsafe.Pointer) int32
-func nacl_sem_create(flag int32) int32
-func nacl_sem_wait(sem int32) int32
-func nacl_sem_post(sem int32) int32
-func nacl_mutex_create(flag int32) int32
-func nacl_mutex_lock(mutex int32) int32
-func nacl_mutex_trylock(mutex int32) int32
-func nacl_mutex_unlock(mutex int32) int32
-func nacl_cond_create(flag int32) int32
-func nacl_cond_wait(cond, n int32) int32
-func nacl_cond_signal(cond int32) int32
-func nacl_cond_broadcast(cond int32) int32
-
-//go:noescape
-func nacl_cond_timed_wait_abs(cond, lock int32, ts *timespec) int32
-func nacl_thread_create(fn uintptr, stk, tls, xx unsafe.Pointer) int32
-
-//go:noescape
-func nacl_nanosleep(ts, extra *timespec) int32
-func nanotime() int64
-func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (p unsafe.Pointer, err int)
-func exit(code int32)
-func osyield()
-
-//go:noescape
-func write(fd uintptr, p unsafe.Pointer, n int32) int32
-
-//go:linkname os_sigpipe os.sigpipe
-func os_sigpipe() {
-       throw("too many writes on closed pipe")
-}
-
-func dieFromSignal(sig uint32) {
-       exit(2)
-}
-
-func sigpanic() {
-       g := getg()
-       if !canpanic(g) {
-               throw("unexpected signal during runtime execution")
-       }
-
-       // Native Client only invokes the exception handler for memory faults.
-       g.sig = _SIGSEGV
-       panicmem()
-}
-
-func raiseproc(sig uint32) {
-}
-
-// Stubs so tests can link correctly. These should never be called.
-func open(name *byte, mode, perm int32) int32
-func closefd(fd int32) int32
-func read(fd int32, p unsafe.Pointer, n int32) int32
-
-type sigset struct{}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-       mp.gsignal = malg(32 * 1024)
-       mp.gsignal.m = mp
-}
-
-func sigtramp(ctxt byte)
-
-//go:nosplit
-func msigsave(mp *m) {
-}
-
-//go:nosplit
-func msigrestore(sigmask sigset) {
-}
-
-//go:nosplit
-//go:nowritebarrierrec
-func clearSignalHandlers() {
-}
-
-//go:nosplit
-func sigblock() {
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, cannot allocate memory.
-func minit() {
-       _g_ := getg()
-
-       // Initialize signal handling
-       ret := nacl_exception_stack(_g_.m.gsignal.stack.lo, 32*1024)
-       if ret < 0 {
-               print("runtime: nacl_exception_stack: error ", -ret, "\n")
-       }
-
-       ret = nacl_exception_handler(funcPC(sigtramp), nil)
-       if ret < 0 {
-               print("runtime: nacl_exception_handler: error ", -ret, "\n")
-       }
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-}
-
-func osinit() {
-       ncpu = 1
-       getg().m.procid = 2
-       //nacl_exception_handler(funcPC(sigtramp), nil);
-       physPageSize = 65536
-}
-
-func signame(sig uint32) string {
-       if sig >= uint32(len(sigtable)) {
-               return ""
-       }
-       return sigtable[sig].name
-}
-
-//go:nosplit
-func crash() {
-       *(*int32)(nil) = 0
-}
-
-//go:noescape
-func getRandomData([]byte)
-
-func goenvs() {
-       goenvs_unix()
-}
-
-func initsig(preinit bool) {
-}
-
-//go:nosplit
-func usleep(us uint32) {
-       var ts timespec
-
-       ts.tv_sec = int64(us / 1e6)
-       ts.tv_nsec = int32(us%1e6) * 1e3
-       nacl_nanosleep(&ts, nil)
-}
-
-func mstart_nacl()
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m) {
-       stk := unsafe.Pointer(mp.g0.stack.hi)
-       mp.tls[0] = uintptr(unsafe.Pointer(mp.g0))
-       mp.tls[1] = uintptr(unsafe.Pointer(mp))
-       ret := nacl_thread_create(funcPC(mstart_nacl), stk, unsafe.Pointer(&mp.tls[2]), nil)
-       if ret < 0 {
-               print("nacl_thread_create: error ", -ret, "\n")
-               throw("newosproc")
-       }
-}
-
-//go:noescape
-func exitThread(wait *uint32)
-
-//go:nosplit
-func semacreate(mp *m) {
-       if mp.waitsema != 0 {
-               return
-       }
-       systemstack(func() {
-               mu := nacl_mutex_create(0)
-               if mu < 0 {
-                       print("nacl_mutex_create: error ", -mu, "\n")
-                       throw("semacreate")
-               }
-               c := nacl_cond_create(0)
-               if c < 0 {
-                       print("nacl_cond_create: error ", -c, "\n")
-                       throw("semacreate")
-               }
-               mp.waitsema = c
-               mp.waitsemalock = mu
-       })
-}
-
-//go:nosplit
-func semasleep(ns int64) int32 {
-       var ret int32
-       systemstack(func() {
-               _g_ := getg()
-               if nacl_mutex_lock(_g_.m.waitsemalock) < 0 {
-                       throw("semasleep")
-               }
-               var ts timespec
-               if ns >= 0 {
-                       end := ns + nanotime()
-                       ts.tv_sec = end / 1e9
-                       ts.tv_nsec = int32(end % 1e9)
-               }
-               for _g_.m.waitsemacount == 0 {
-                       if ns < 0 {
-                               if nacl_cond_wait(_g_.m.waitsema, _g_.m.waitsemalock) < 0 {
-                                       throw("semasleep")
-                               }
-                       } else {
-                               r := nacl_cond_timed_wait_abs(_g_.m.waitsema, _g_.m.waitsemalock, &ts)
-                               if r == -_ETIMEDOUT {
-                                       nacl_mutex_unlock(_g_.m.waitsemalock)
-                                       ret = -1
-                                       return
-                               }
-                               if r < 0 {
-                                       throw("semasleep")
-                               }
-                       }
-               }
-
-               _g_.m.waitsemacount = 0
-               nacl_mutex_unlock(_g_.m.waitsemalock)
-               ret = 0
-       })
-       return ret
-}
-
-//go:nosplit
-func semawakeup(mp *m) {
-       systemstack(func() {
-               if nacl_mutex_lock(mp.waitsemalock) < 0 {
-                       throw("semawakeup")
-               }
-               if mp.waitsemacount != 0 {
-                       throw("semawakeup")
-               }
-               mp.waitsemacount = 1
-               nacl_cond_signal(mp.waitsema)
-               nacl_mutex_unlock(mp.waitsemalock)
-       })
-}
-
-// This runs on a foreign stack, without an m or a g. No stack split.
-//go:nosplit
-//go:norace
-//go:nowritebarrierrec
-func badsignal(sig uintptr) {
-       cgocallback(unsafe.Pointer(funcPC(badsignalgo)), noescape(unsafe.Pointer(&sig)), unsafe.Sizeof(sig), 0)
-}
-
-func badsignalgo(sig uintptr) {
-       if !sigsend(uint32(sig)) {
-               // A foreign thread received the signal sig, and the
-               // Go code does not want to handle it.
-               raisebadsignal(uint32(sig))
-       }
-}
-
-// This runs on a foreign stack, without an m or a g. No stack split.
-//go:nosplit
-func badsignal2() {
-       write(2, unsafe.Pointer(&badsignal1[0]), int32(len(badsignal1)))
-       exit(2)
-}
-
-var badsignal1 = []byte("runtime: signal received on thread not created by Go.\n")
-
-func raisebadsignal(sig uint32) {
-       badsignal2()
-}
-
-func madvise(addr unsafe.Pointer, n uintptr, flags int32) {}
-func munmap(addr unsafe.Pointer, n uintptr)               {}
-func setProcessCPUProfiler(hz int32)                      {}
-func setThreadCPUProfiler(hz int32)                       {}
-func sigdisable(uint32)                                   {}
-func sigenable(uint32)                                    {}
-func sigignore(uint32)                                    {}
-func closeonexec(int32)                                   {}
-
-// gsignalStack is unused on nacl.
-type gsignalStack struct{}
-
-// nacl fake time support - time in nanoseconds since 1970
-var faketime int64
-
-var writelock uint32 // test-and-set spin lock for write
-
-// lastfaketime stores the last faketime value written to fd 1 or 2.
-var lastfaketime int64
-
-// lastfaketimefd stores the fd to which lastfaketime was written.
-//
-// Subsequent writes to the same fd may use the same timestamp,
-// but the timestamp must increase if the fd changes.
-var lastfaketimefd int32
-
-func walltime() (sec int64, nsec int32)
-
-/*
-An attempt at IRT. Doesn't work. See end of sys_nacl_amd64.s.
-
-void (*nacl_irt_query)(void);
-
-int8 nacl_irt_basic_v0_1_str[] = "nacl-irt-basic-0.1";
-void *nacl_irt_basic_v0_1[6]; // exit, gettod, clock, nanosleep, sched_yield, sysconf
-int32 nacl_irt_basic_v0_1_size = sizeof(nacl_irt_basic_v0_1);
-
-int8 nacl_irt_memory_v0_3_str[] = "nacl-irt-memory-0.3";
-void *nacl_irt_memory_v0_3[3]; // mmap, munmap, mprotect
-int32 nacl_irt_memory_v0_3_size = sizeof(nacl_irt_memory_v0_3);
-
-int8 nacl_irt_thread_v0_1_str[] = "nacl-irt-thread-0.1";
-void *nacl_irt_thread_v0_1[3]; // thread_create, thread_exit, thread_nice
-int32 nacl_irt_thread_v0_1_size = sizeof(nacl_irt_thread_v0_1);
-*/
-
-// The following functions are implemented in runtime assembly.
-// Provide a Go declaration to go with its assembly definitions.
-
-//go:linkname syscall_naclWrite syscall.naclWrite
-func syscall_naclWrite(fd int, b []byte) int
-
-//go:linkname syscall_now syscall.now
-func syscall_now() (sec int64, nsec int32)
diff --git a/src/runtime/os_nacl_arm.go b/src/runtime/os_nacl_arm.go
deleted file mode 100644 (file)
index 8669ee7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 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 runtime
-
-func checkgoarm() {
-       // TODO(minux): FP checks like in os_linux_arm.go.
-
-       // NaCl/ARM only supports ARMv7
-       if goarm != 7 {
-               print("runtime: NaCl requires ARMv7. Recompile using GOARM=7.\n")
-               exit(1)
-       }
-}
-
-//go:nosplit
-func cputicks() int64 {
-       // Currently cputicks() is used in blocking profiler and to seed runtime·fastrand().
-       // runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
-       // TODO: need more entropy to better seed fastrand.
-       return nanotime()
-}
index 53496371a011a7e72c41badd601e86bfcdbd54d6..ed04fe06acfefcf31307a3d31f3441e2ef4743b3 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl,!js
+// +build !js
 
 package pprof
 
diff --git a/src/runtime/rt0_nacl_386.s b/src/runtime/rt0_nacl_386.s
deleted file mode 100644 (file)
index 4c99002..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2013 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 "textflag.h"
-
-// NaCl entry has:
-//     0(FP) - arg block == SP+8
-//     4(FP) - cleanup function pointer, always 0
-//     8(FP) - envc
-//     12(FP) - argc
-//     16(FP) - argv, then 0, then envv, then 0, then auxv
-TEXT _rt0_386_nacl(SB),NOSPLIT,$8
-       MOVL    argc+12(FP), AX
-       LEAL    argv+16(FP), BX
-       MOVL    AX, 0(SP)
-       MOVL    BX, 4(SP)
-       JMP     runtime·rt0_go(SB)
-
-TEXT main(SB),NOSPLIT,$0
-       // Remove the return address from the stack.
-       // rt0_go doesn't expect it to be there.
-       ADDL    $4, SP
-       JMP     runtime·rt0_go(SB)
diff --git a/src/runtime/rt0_nacl_arm.s b/src/runtime/rt0_nacl_arm.s
deleted file mode 100644 (file)
index a52c0d8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 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 "textflag.h"
-
-// NaCl entry has:
-//     0(FP) - 0
-//     4(FP) - cleanup function pointer, always 0
-//     8(FP) - envc
-//     12(FP) - argc
-//     16(FP) - argv, then 0, then envv, then 0, then auxv
-TEXT _rt0_arm_nacl(SB),NOSPLIT|NOFRAME,$0
-       MOVW    8(R13), R0
-       MOVW    $12(R13), R1
-       B       runtime·rt0_go(SB)
index 6741e1da8ddd46c96cfcbb1289105fa16bee1317..bb0b747606b479c87ee5b419b767744ac6bf6241 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package runtime_test
 
index 37eacfea6469e0954c6d6d6baa0199a8fac10542..ab7a03b2d1608edf554dfc6c93352e6992ddc4f4 100644 (file)
@@ -193,9 +193,6 @@ func TestSetPanicOnFault(t *testing.T) {
 }
 
 func testSetPanicOnFault(t *testing.T, addr uintptr, nfault *int) {
-       if GOOS == "nacl" {
-               t.Skip("nacl doesn't seem to fault on high addresses")
-       }
        if GOOS == "js" {
                t.Skip("js does not support catching faults")
        }
@@ -294,7 +291,7 @@ func TestTrailingZero(t *testing.T) {
 }
 
 func TestBadOpen(t *testing.T) {
-       if GOOS == "windows" || GOOS == "nacl" || GOOS == "js" {
+       if GOOS == "windows" || GOOS == "js" {
                t.Skip("skipping OS that doesn't have open/read/write/close")
        }
        // make sure we get the correct error code if open fails. Same for
index 3eb7c6a6d1415ebef8aa3115f081c13a41a8f897..9b371b07324ff95329172fb8072a350233004198 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl,!plan9,!windows,!js
+// +build !plan9,!windows,!js
 
 package runtime_test
 
index 143deb9de78dbdf2dcdaad20c76eae286a4beed3..ef97979796584a2206054aaeb93ddcfb33a46897 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd
+// +build darwin dragonfly freebsd linux netbsd openbsd
 
 package runtime
 
index 9d59e262de3b8f49745aef28ec91550af4bd804d..459499e9737bad45fad7c42ca6f2e9ffd745bd5b 100644 (file)
@@ -3,7 +3,7 @@
 // license that can be found in the LICENSE file.
 
 // +build amd64 amd64p32
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package runtime
 
index bb597c5608e845f5a0c8c4904efb75ac254a0096..97742206c77704f60e95a6b58109021d47387164 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd
+// +build darwin dragonfly freebsd linux netbsd openbsd
 
 package runtime
 
diff --git a/src/runtime/signal_nacl.go b/src/runtime/signal_nacl.go
deleted file mode 100644 (file)
index ad321d8..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-// 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 runtime
-
-type sigTabT struct {
-       flags int32
-       name  string
-}
-
-var sigtable = [...]sigTabT{
-       /* 0 */ {0, "SIGNONE: no trap"},
-       /* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
-       /* 2 */ {_SigNotify + _SigKill, "SIGINT: interrupt"},
-       /* 3 */ {_SigNotify + _SigThrow, "SIGQUIT: quit"},
-       /* 4 */ {_SigThrow, "SIGILL: illegal instruction"},
-       /* 5 */ {_SigThrow, "SIGTRAP: trace trap"},
-       /* 6 */ {_SigNotify + _SigThrow, "SIGABRT: abort"},
-       /* 7 */ {_SigThrow, "SIGEMT: emulate instruction executed"},
-       /* 8 */ {_SigPanic, "SIGFPE: floating-point exception"},
-       /* 9 */ {0, "SIGKILL: kill"},
-       /* 10 */ {_SigPanic, "SIGBUS: bus error"},
-       /* 11 */ {_SigPanic, "SIGSEGV: segmentation violation"},
-       /* 12 */ {_SigThrow, "SIGSYS: bad system call"},
-       /* 13 */ {_SigNotify, "SIGPIPE: write to broken pipe"},
-       /* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
-       /* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"},
-       /* 16 */ {_SigNotify + _SigIgn, "SIGURG: urgent condition on socket"},
-       /* 17 */ {0, "SIGSTOP: stop"},
-       /* 18 */ {_SigNotify + _SigDefault + _SigIgn, "SIGTSTP: keyboard stop"},
-       /* 19 */ {_SigNotify + _SigDefault + _SigIgn, "SIGCONT: continue after stop"},
-       /* 20 */ {_SigNotify + _SigIgn, "SIGCHLD: child status has changed"},
-       /* 21 */ {_SigNotify + _SigDefault + _SigIgn, "SIGTTIN: background read from tty"},
-       /* 22 */ {_SigNotify + _SigDefault + _SigIgn, "SIGTTOU: background write to tty"},
-       /* 23 */ {_SigNotify, "SIGIO: i/o now possible"},
-       /* 24 */ {_SigNotify, "SIGXCPU: cpu limit exceeded"},
-       /* 25 */ {_SigNotify, "SIGXFSZ: file size limit exceeded"},
-       /* 26 */ {_SigNotify, "SIGVTALRM: virtual alarm clock"},
-       /* 27 */ {_SigNotify, "SIGPROF: profiling alarm clock"},
-       /* 28 */ {_SigNotify, "SIGWINCH: window size change"},
-       /* 29 */ {_SigNotify, "SIGINFO: status request from keyboard"},
-       /* 30 */ {_SigNotify, "SIGUSR1: user-defined signal 1"},
-       /* 31 */ {_SigNotify, "SIGUSR2: user-defined signal 2"},
-}
diff --git a/src/runtime/signal_nacl_386.go b/src/runtime/signal_nacl_386.go
deleted file mode 100644 (file)
index 1a30a89..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 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 runtime
-
-import "unsafe"
-
-type sigctxt struct {
-       info *siginfo
-       ctxt unsafe.Pointer
-}
-
-//go:nosplit
-//go:nowritebarrierrec
-func (c *sigctxt) regs() *excregs386 { return &(*exccontext)(c.ctxt).regs }
-
-func (c *sigctxt) eax() uint32 { return c.regs().eax }
-func (c *sigctxt) ebx() uint32 { return c.regs().ebx }
-func (c *sigctxt) ecx() uint32 { return c.regs().ecx }
-func (c *sigctxt) edx() uint32 { return c.regs().edx }
-func (c *sigctxt) edi() uint32 { return c.regs().edi }
-func (c *sigctxt) esi() uint32 { return c.regs().esi }
-func (c *sigctxt) ebp() uint32 { return c.regs().ebp }
-func (c *sigctxt) esp() uint32 { return c.regs().esp }
-
-//go:nosplit
-//go:nowritebarrierrec
-func (c *sigctxt) eip() uint32 { return c.regs().eip }
-
-func (c *sigctxt) eflags() uint32  { return c.regs().eflags }
-func (c *sigctxt) cs() uint32      { return ^uint32(0) }
-func (c *sigctxt) fs() uint32      { return ^uint32(0) }
-func (c *sigctxt) gs() uint32      { return ^uint32(0) }
-func (c *sigctxt) sigcode() uint32 { return ^uint32(0) }
-func (c *sigctxt) sigaddr() uint32 { return 0 }
-
-func (c *sigctxt) set_eip(x uint32)     { c.regs().eip = x }
-func (c *sigctxt) set_esp(x uint32)     { c.regs().esp = x }
-func (c *sigctxt) set_sigcode(x uint32) {}
-func (c *sigctxt) set_sigaddr(x uint32) {}
diff --git a/src/runtime/signal_nacl_arm.go b/src/runtime/signal_nacl_arm.go
deleted file mode 100644 (file)
index b831232..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 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 runtime
-
-import "unsafe"
-
-type sigctxt struct {
-       info *siginfo
-       ctxt unsafe.Pointer
-}
-
-//go:nosplit
-//go:nowritebarrierrec
-func (c *sigctxt) regs() *excregsarm { return &(*exccontext)(c.ctxt).regs }
-
-func (c *sigctxt) r0() uint32  { return c.regs().r0 }
-func (c *sigctxt) r1() uint32  { return c.regs().r1 }
-func (c *sigctxt) r2() uint32  { return c.regs().r2 }
-func (c *sigctxt) r3() uint32  { return c.regs().r3 }
-func (c *sigctxt) r4() uint32  { return c.regs().r4 }
-func (c *sigctxt) r5() uint32  { return c.regs().r5 }
-func (c *sigctxt) r6() uint32  { return c.regs().r6 }
-func (c *sigctxt) r7() uint32  { return c.regs().r7 }
-func (c *sigctxt) r8() uint32  { return c.regs().r8 }
-func (c *sigctxt) r9() uint32  { return c.regs().r9 }
-func (c *sigctxt) r10() uint32 { return c.regs().r10 }
-func (c *sigctxt) fp() uint32  { return c.regs().r11 }
-func (c *sigctxt) ip() uint32  { return c.regs().r12 }
-func (c *sigctxt) sp() uint32  { return c.regs().sp }
-func (c *sigctxt) lr() uint32  { return c.regs().lr }
-
-//go:nosplit
-//go:nowritebarrierrec
-func (c *sigctxt) pc() uint32 { return c.regs().pc }
-
-func (c *sigctxt) cpsr() uint32    { return c.regs().cpsr }
-func (c *sigctxt) fault() uintptr  { return ^uintptr(0) }
-func (c *sigctxt) trap() uint32    { return ^uint32(0) }
-func (c *sigctxt) error() uint32   { return ^uint32(0) }
-func (c *sigctxt) oldmask() uint32 { return ^uint32(0) }
-
-func (c *sigctxt) sigcode() uint32 { return 0 }
-func (c *sigctxt) sigaddr() uint32 { return 0 }
-
-func (c *sigctxt) set_pc(x uint32)  { c.regs().pc = x }
-func (c *sigctxt) set_sp(x uint32)  { c.regs().sp = x }
-func (c *sigctxt) set_lr(x uint32)  { c.regs().lr = x }
-func (c *sigctxt) set_r10(x uint32) { c.regs().r10 = x }
-
-func (c *sigctxt) set_sigcode(x uint32) {}
-func (c *sigctxt) set_sigaddr(x uint32) {}
index bec465321888c75b0bc4006a0eb37f1c686932d6..b81957ef02fdf37246fff9415286d1f554f88491 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package runtime
 
index 830055e2aa93ddffc7f7079714292b21950e58d4..852244d4252eb01f6a54d1915aa59c438b809cb2 100644 (file)
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl
-
 package runtime_test
 
 import (
index 77513386b7dcf0f75a1e544d6b8433428fd29d1f..cf2b12481252ecce529a1117dd57a127c1edd477 100644 (file)
@@ -5,7 +5,6 @@
 // +build !plan9
 // +build !solaris
 // +build !windows
-// +build !nacl
 // +build !js
 // +build !darwin
 // +build !aix
index f81372805e805c69a94bf76e826ea6c8f2c6e1ae..95eecc7ecaf6a570bcba1dec464cf2f6f26299b4 100644 (file)
@@ -4,7 +4,6 @@
 
 // +build !plan9
 // +build !solaris
-// +build !nacl
 // +build !freebsd
 // +build !darwin
 // +build !aix
diff --git a/src/runtime/sys_nacl_386.s b/src/runtime/sys_nacl_386.s
deleted file mode 100644 (file)
index 8460aab..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-// Copyright 2013 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 "go_asm.h"
-#include "go_tls.h"
-#include "textflag.h"
-#include "syscall_nacl.h"
-
-#define NACL_SYSCALL(code) \
-       MOVL $(0x10000 + ((code)<<5)), AX; CALL AX
-
-TEXT runtime·exit(SB),NOSPLIT,$4
-       MOVL code+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_exit)
-       JMP 0(PC)
-
-// func exitThread(wait *uint32)
-TEXT runtime·exitThread(SB),NOSPLIT,$4-4
-       MOVL wait+0(FP), AX
-       // SYS_thread_exit will clear *wait when the stack is free.
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_thread_exit)
-       JMP 0(PC)
-
-TEXT runtime·open(SB),NOSPLIT,$12
-       MOVL name+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL mode+4(FP), AX
-       MOVL AX, 4(SP)
-       MOVL perm+8(FP), AX
-       MOVL AX, 8(SP)
-       NACL_SYSCALL(SYS_open)
-       MOVL AX, ret+12(FP)
-       RET
-
-TEXT runtime·closefd(SB),NOSPLIT,$4
-       MOVL fd+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_close)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·read(SB),NOSPLIT,$12
-       MOVL fd+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL p+4(FP), AX
-       MOVL AX, 4(SP)
-       MOVL n+8(FP), AX
-       MOVL AX, 8(SP)
-       NACL_SYSCALL(SYS_read)
-       MOVL AX, ret+12(FP)
-       RET
-
-TEXT syscall·naclWrite(SB), NOSPLIT, $16-16
-       MOVL arg1+0(FP), DI
-       MOVL arg2+4(FP), SI
-       MOVL arg3+8(FP), DX
-       MOVL DI, 0(SP)
-       MOVL SI, 4(SP)
-       MOVL DX, 8(SP)
-       CALL runtime·write(SB)
-       MOVL AX, ret+16(FP)
-       RET
-
-TEXT runtime·write(SB),NOSPLIT,$12
-       MOVL fd+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL p+4(FP), AX
-       MOVL AX, 4(SP)
-       MOVL n+8(FP), AX
-       MOVL AX, 8(SP)
-       NACL_SYSCALL(SYS_write)
-       MOVL AX, ret+12(FP)
-       RET
-
-TEXT runtime·nacl_exception_stack(SB),NOSPLIT,$8
-       MOVL p+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL size+4(FP), AX
-       MOVL AX, 4(SP)
-       NACL_SYSCALL(SYS_exception_stack)
-       MOVL AX, ret+8(FP)
-       RET
-
-TEXT runtime·nacl_exception_handler(SB),NOSPLIT,$8
-       MOVL fn+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL arg+4(FP), AX
-       MOVL AX, 4(SP)
-       NACL_SYSCALL(SYS_exception_handler)
-       MOVL AX, ret+8(FP)
-       RET
-
-TEXT runtime·nacl_sem_create(SB),NOSPLIT,$4
-       MOVL flag+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_sem_create)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_sem_wait(SB),NOSPLIT,$4
-       MOVL sem+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_sem_wait)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_sem_post(SB),NOSPLIT,$4
-       MOVL sem+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_sem_post)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_mutex_create(SB),NOSPLIT,$4
-       MOVL flag+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_mutex_create)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_mutex_lock(SB),NOSPLIT,$4
-       MOVL mutex+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_mutex_lock)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_mutex_trylock(SB),NOSPLIT,$4
-       MOVL mutex+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_mutex_trylock)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_mutex_unlock(SB),NOSPLIT,$4
-       MOVL mutex+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_mutex_unlock)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_cond_create(SB),NOSPLIT,$4
-       MOVL flag+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_cond_create)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_cond_wait(SB),NOSPLIT,$8
-       MOVL cond+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL n+4(FP), AX
-       MOVL AX, 4(SP)
-       NACL_SYSCALL(SYS_cond_wait)
-       MOVL AX, ret+8(FP)
-       RET
-
-TEXT runtime·nacl_cond_signal(SB),NOSPLIT,$4
-       MOVL cond+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_cond_signal)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_cond_broadcast(SB),NOSPLIT,$4
-       MOVL cond+0(FP), AX
-       MOVL AX, 0(SP)
-       NACL_SYSCALL(SYS_cond_broadcast)
-       MOVL AX, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_cond_timed_wait_abs(SB),NOSPLIT,$12
-       MOVL cond+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL lock+4(FP), AX
-       MOVL AX, 4(SP)
-       MOVL ts+8(FP), AX
-       MOVL AX, 8(SP)
-       NACL_SYSCALL(SYS_cond_timed_wait_abs)
-       MOVL AX, ret+12(FP)
-       RET
-
-TEXT runtime·nacl_thread_create(SB),NOSPLIT,$16
-       MOVL fn+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL stk+4(FP), AX
-       MOVL AX, 4(SP)
-       MOVL tls+8(FP), AX
-       MOVL AX, 8(SP)
-       MOVL xx+12(FP), AX
-       MOVL AX, 12(SP)
-       NACL_SYSCALL(SYS_thread_create)
-       MOVL AX, ret+16(FP)
-       RET
-
-TEXT runtime·mstart_nacl(SB),NOSPLIT,$0
-       JMP runtime·mstart(SB)
-
-TEXT runtime·nacl_nanosleep(SB),NOSPLIT,$8
-       MOVL ts+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL extra+4(FP), AX
-       MOVL AX, 4(SP)
-       NACL_SYSCALL(SYS_nanosleep)
-       MOVL AX, ret+8(FP)
-       RET
-
-TEXT runtime·osyield(SB),NOSPLIT,$0
-       NACL_SYSCALL(SYS_sched_yield)
-       RET
-
-TEXT runtime·mmap(SB),NOSPLIT,$32
-       MOVL    addr+0(FP), AX
-       MOVL    AX, 0(SP)
-       MOVL    n+4(FP), AX
-       MOVL    AX, 4(SP)
-       MOVL    prot+8(FP), AX
-       MOVL    AX, 8(SP)
-       MOVL    flags+12(FP), AX
-       MOVL    AX, 12(SP)
-       MOVL    fd+16(FP), AX
-       MOVL    AX, 16(SP)
-       MOVL    off+20(FP), AX
-       MOVL    AX, 24(SP)
-       MOVL    $0, 28(SP)
-       LEAL    24(SP), AX
-       MOVL    AX, 20(SP)
-       NACL_SYSCALL(SYS_mmap)
-       CMPL    AX, $-4095
-       JNA     ok
-       NEGL    AX
-       MOVL    $0, p+24(FP)
-       MOVL    AX, err+28(FP)
-       RET
-ok:
-       MOVL    AX, p+24(FP)
-       MOVL    $0, err+28(FP)
-       RET
-
-TEXT runtime·walltime(SB),NOSPLIT,$20
-       MOVL $0, 0(SP) // real time clock
-       LEAL 8(SP), AX
-       MOVL AX, 4(SP) // timespec
-       NACL_SYSCALL(SYS_clock_gettime)
-       MOVL 8(SP), AX // low 32 sec
-       MOVL 12(SP), CX // high 32 sec
-       MOVL 16(SP), BX // nsec
-
-       // sec is in AX, nsec in BX
-       MOVL    AX, sec_lo+0(FP)
-       MOVL    CX, sec_hi+4(FP)
-       MOVL    BX, nsec+8(FP)
-       RET
-
-TEXT syscall·now(SB),NOSPLIT,$0
-       JMP runtime·walltime(SB)
-
-TEXT runtime·nanotime(SB),NOSPLIT,$20
-       MOVL $0, 0(SP) // real time clock
-       LEAL 8(SP), AX
-       MOVL AX, 4(SP) // timespec
-       NACL_SYSCALL(SYS_clock_gettime)
-       MOVL 8(SP), AX // low 32 sec
-       MOVL 16(SP), BX // nsec
-
-       // sec is in AX, nsec in BX
-       // convert to DX:AX nsec
-       MOVL    $1000000000, CX
-       MULL    CX
-       ADDL    BX, AX
-       ADCL    $0, DX
-
-       MOVL    AX, ret_lo+0(FP)
-       MOVL    DX, ret_hi+4(FP)
-       RET
-
-TEXT runtime·setldt(SB),NOSPLIT,$8
-       MOVL    base+4(FP), BX
-       ADDL    $0x8, BX
-       MOVL    BX, 0(SP)
-       NACL_SYSCALL(SYS_tls_init)
-       RET
-
-TEXT runtime·sigtramp(SB),NOSPLIT,$0
-       get_tls(CX)
-
-       // check that g exists
-       MOVL    g(CX), DI
-       CMPL    DI, $0
-       JNE     6(PC)
-       MOVL    $11, BX
-       MOVL    $0, 0(SP)
-       MOVL    $runtime·badsignal(SB), AX
-       CALL    AX
-       JMP     ret
-
-       // save g
-       NOP     SP      // tell vet SP changed - stop checking offsets
-       MOVL    DI, 20(SP)
-
-       // g = m->gsignal
-       MOVL    g_m(DI), BX
-       MOVL    m_gsignal(BX), BX
-       MOVL    BX, g(CX)
-
-       // copy arguments for sighandler
-       MOVL    $11, 0(SP) // signal
-       MOVL    $0, 4(SP) // siginfo
-       LEAL    8(SP), AX
-       MOVL    AX, 8(SP) // context
-       MOVL    DI, 12(SP) // g
-
-       CALL    runtime·sighandler(SB)
-
-       // restore g
-       get_tls(CX)
-       MOVL    20(SP), BX
-       MOVL    BX, g(CX)
-
-ret:
-       // Enable exceptions again.
-       NACL_SYSCALL(SYS_exception_clear_flag)
-
-       // NaCl has abdicated its traditional operating system responsibility
-       // and declined to implement 'sigreturn'. Instead the only way to return
-       // to the execution of our program is to restore the registers ourselves.
-       // Unfortunately, that is impossible to do with strict fidelity, because
-       // there is no way to do the final update of PC that ends the sequence
-       // without either (1) jumping to a register, in which case the register ends
-       // holding the PC value instead of its intended value or (2) storing the PC
-       // on the stack and using RET, which imposes the requirement that SP is
-       // valid and that is okay to smash the word below it. The second would
-       // normally be the lesser of the two evils, except that on NaCl, the linker
-       // must rewrite RET into "POP reg; AND $~31, reg; JMP reg", so either way
-       // we are going to lose a register as a result of the incoming signal.
-       // Similarly, there is no way to restore EFLAGS; the usual way is to use
-       // POPFL, but NaCl rejects that instruction. We could inspect the bits and
-       // execute a sequence of instructions designed to recreate those flag
-       // settings, but that's a lot of work.
-       //
-       // Thankfully, Go's signal handlers never try to return directly to the
-       // executing code, so all the registers and EFLAGS are dead and can be
-       // smashed. The only registers that matter are the ones that are setting
-       // up for the simulated call that the signal handler has created.
-       // Today those registers are just PC and SP, but in case additional registers
-       // are relevant in the future (for example DX is the Go func context register)
-       // we restore as many registers as possible.
-       //
-       // We smash BP, because that's what the linker smashes during RET.
-       //
-       LEAL    72(SP), BP
-       MOVL    0(BP), AX
-       MOVL    4(BP), CX
-       MOVL    8(BP), DX
-       MOVL    12(BP), BX
-       MOVL    16(BP), SP
-       // 20(BP) is saved BP, never to be seen again
-       MOVL    24(BP), SI
-       MOVL    28(BP), DI
-       // 36(BP) is saved EFLAGS, never to be seen again
-       MOVL    32(BP), BP // saved PC
-       JMP     BP
-
-// func getRandomData([]byte)
-TEXT runtime·getRandomData(SB),NOSPLIT,$8-12
-       MOVL arg_base+0(FP), AX
-       MOVL AX, 0(SP)
-       MOVL arg_len+4(FP), AX
-       MOVL AX, 4(SP)
-       NACL_SYSCALL(SYS_get_random_bytes)
-       RET
diff --git a/src/runtime/sys_nacl_arm.s b/src/runtime/sys_nacl_arm.s
deleted file mode 100644 (file)
index 9020168..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-// Copyright 2014 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 "go_asm.h"
-#include "go_tls.h"
-#include "textflag.h"
-#include "syscall_nacl.h"
-
-#define NACL_SYSCALL(code) \
-       MOVW    $(0x10000 + ((code)<<5)), R8; BL (R8)
-
-TEXT runtime·exit(SB),NOSPLIT,$0
-       MOVW    code+0(FP), R0
-       NACL_SYSCALL(SYS_exit)
-       RET
-
-// func exitThread(wait *uint32)
-TEXT runtime·exitThread(SB),NOSPLIT,$4-4
-       MOVW wait+0(FP), R0
-       // SYS_thread_exit will clear *wait when the stack is free.
-       NACL_SYSCALL(SYS_thread_exit)
-       JMP 0(PC)
-
-TEXT runtime·open(SB),NOSPLIT,$0
-       MOVW    name+0(FP), R0
-       MOVW    name+0(FP), R1
-       MOVW    name+0(FP), R2
-       NACL_SYSCALL(SYS_open)
-       MOVW    R0, ret+12(FP)
-       RET
-
-TEXT runtime·closefd(SB),NOSPLIT,$0
-       MOVW    fd+0(FP), R0
-       NACL_SYSCALL(SYS_close)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·read(SB),NOSPLIT,$0
-       MOVW    fd+0(FP), R0
-       MOVW    p+4(FP), R1
-       MOVW    n+8(FP), R2
-       NACL_SYSCALL(SYS_read)
-       MOVW    R0, ret+12(FP)
-       RET
-
-// func naclWrite(fd int, b []byte) int
-TEXT syscall·naclWrite(SB),NOSPLIT,$0
-       MOVW    arg1+0(FP), R0
-       MOVW    arg2+4(FP), R1
-       MOVW    arg3+8(FP), R2
-       NACL_SYSCALL(SYS_write)
-       MOVW    R0, ret+16(FP)
-       RET
-
-TEXT runtime·write(SB),NOSPLIT,$0
-       MOVW    fd+0(FP), R0
-       MOVW    p+4(FP), R1
-       MOVW    n+8(FP), R2
-       NACL_SYSCALL(SYS_write)
-       MOVW    R0, ret+12(FP)
-       RET
-
-TEXT runtime·nacl_exception_stack(SB),NOSPLIT,$0
-       MOVW    p+0(FP), R0
-       MOVW    size+4(FP), R1
-       NACL_SYSCALL(SYS_exception_stack)
-       MOVW    R0, ret+8(FP)
-       RET
-
-TEXT runtime·nacl_exception_handler(SB),NOSPLIT,$0
-       MOVW    fn+0(FP), R0
-       MOVW    arg+4(FP), R1
-       NACL_SYSCALL(SYS_exception_handler)
-       MOVW    R0, ret+8(FP)
-       RET
-
-TEXT runtime·nacl_sem_create(SB),NOSPLIT,$0
-       MOVW    flag+0(FP), R0
-       NACL_SYSCALL(SYS_sem_create)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_sem_wait(SB),NOSPLIT,$0
-       MOVW    sem+0(FP), R0
-       NACL_SYSCALL(SYS_sem_wait)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_sem_post(SB),NOSPLIT,$0
-       MOVW    sem+0(FP), R0
-       NACL_SYSCALL(SYS_sem_post)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_mutex_create(SB),NOSPLIT,$0
-       MOVW    flag+0(FP), R0
-       NACL_SYSCALL(SYS_mutex_create)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_mutex_lock(SB),NOSPLIT,$0
-       MOVW    mutex+0(FP), R0
-       NACL_SYSCALL(SYS_mutex_lock)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_mutex_trylock(SB),NOSPLIT,$0
-       MOVW    mutex+0(FP), R0
-       NACL_SYSCALL(SYS_mutex_trylock)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_mutex_unlock(SB),NOSPLIT,$0
-       MOVW    mutex+0(FP), R0
-       NACL_SYSCALL(SYS_mutex_unlock)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_cond_create(SB),NOSPLIT,$0
-       MOVW    flag+0(FP), R0
-       NACL_SYSCALL(SYS_cond_create)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_cond_wait(SB),NOSPLIT,$0
-       MOVW    cond+0(FP), R0
-       MOVW    n+4(FP), R1
-       NACL_SYSCALL(SYS_cond_wait)
-       MOVW    R0, ret+8(FP)
-       RET
-
-TEXT runtime·nacl_cond_signal(SB),NOSPLIT,$0
-       MOVW    cond+0(FP), R0
-       NACL_SYSCALL(SYS_cond_signal)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_cond_broadcast(SB),NOSPLIT,$0
-       MOVW    cond+0(FP), R0
-       NACL_SYSCALL(SYS_cond_broadcast)
-       MOVW    R0, ret+4(FP)
-       RET
-
-TEXT runtime·nacl_cond_timed_wait_abs(SB),NOSPLIT,$0
-       MOVW    cond+0(FP), R0
-       MOVW    lock+4(FP), R1
-       MOVW    ts+8(FP), R2
-       NACL_SYSCALL(SYS_cond_timed_wait_abs)
-       MOVW    R0, ret+12(FP)
-       RET
-
-TEXT runtime·nacl_thread_create(SB),NOSPLIT,$0
-       MOVW    fn+0(FP), R0
-       MOVW    stk+4(FP), R1
-       MOVW    tls+8(FP), R2
-       MOVW    xx+12(FP), R3
-       NACL_SYSCALL(SYS_thread_create)
-       MOVW    R0, ret+16(FP)
-       RET
-
-TEXT runtime·mstart_nacl(SB),NOSPLIT,$0
-       MOVW    0(R9), R0 // TLS
-       MOVW    -8(R0), R1 // g
-       MOVW    -4(R0), R2 // m
-       MOVW    R2, g_m(R1)
-       MOVW    R1, g
-       B runtime·mstart(SB)
-
-TEXT runtime·nacl_nanosleep(SB),NOSPLIT,$0
-       MOVW    ts+0(FP), R0
-       MOVW    extra+4(FP), R1
-       NACL_SYSCALL(SYS_nanosleep)
-       MOVW    R0, ret+8(FP)
-       RET
-
-TEXT runtime·osyield(SB),NOSPLIT,$0
-       NACL_SYSCALL(SYS_sched_yield)
-       RET
-
-TEXT runtime·mmap(SB),NOSPLIT,$8
-       MOVW    addr+0(FP), R0
-       MOVW    n+4(FP), R1
-       MOVW    prot+8(FP), R2
-       MOVW    flags+12(FP), R3
-       MOVW    fd+16(FP), R4
-       // arg6:offset should be passed as a pointer (to int64)
-       MOVW    off+20(FP), R5
-       MOVW    R5, 4(R13)
-       MOVW    $0, R6
-       MOVW    R6, 8(R13)
-       MOVW    $4(R13), R5
-       MOVM.DB.W [R4,R5], (R13) // arg5 and arg6 are passed on stack
-       NACL_SYSCALL(SYS_mmap)
-       MOVM.IA.W (R13), [R4, R5]
-       CMP     $-4095, R0
-       MOVW    $0, R1
-       RSB.HI  $0, R0
-       MOVW.HI R0, R1          // if error, put in R1
-       MOVW.HI $0, R0
-       MOVW    R0, p+24(FP)
-       MOVW    R1, err+28(FP)
-       RET
-
-TEXT runtime·walltime(SB),NOSPLIT,$16
-       MOVW    $0, R0 // real time clock
-       MOVW    $4(R13), R1
-       NACL_SYSCALL(SYS_clock_gettime)
-       MOVW    4(R13), R0 // low 32-bit sec
-       MOVW    8(R13), R1 // high 32-bit sec
-       MOVW    12(R13), R2 // nsec
-       MOVW    R0, sec_lo+0(FP)
-       MOVW    R1, sec_hi+4(FP)
-       MOVW    R2, nsec+8(FP)
-       RET
-
-TEXT syscall·now(SB),NOSPLIT,$0
-       B runtime·walltime(SB)
-
-// int64 nanotime(void) so really
-// void nanotime(int64 *nsec)
-TEXT runtime·nanotime(SB),NOSPLIT,$16
-       MOVW    $0, R0 // real time clock
-       MOVW    $4(R13), R1
-       NACL_SYSCALL(SYS_clock_gettime)
-       MOVW    4(R13), R0 // low 32-bit sec
-       MOVW    8(R13), R1 // high 32-bit sec (ignored for now)
-       MOVW    12(R13), R2 // nsec
-       MOVW    $1000000000, R3
-       MULLU   R0, R3, (R1, R0)
-       MOVW    $0, R4
-       ADD.S   R2, R0
-       ADC     R4, R1
-       MOVW    R0, ret_lo+0(FP)
-       MOVW    R1, ret_hi+4(FP)
-       RET
-
-TEXT runtime·sigtramp(SB),NOSPLIT,$80
-       // load g from thread context
-       MOVW    $ctxt+-4(FP), R0
-       MOVW    (16*4+10*4)(R0), g
-
-       // check that g exists
-       CMP     $0, g
-       BNE     4(PC)
-       MOVW    $runtime·badsignal2(SB), R11
-       BL      (R11)
-       RET
-
-       // save g
-       MOVW    g, R3
-       MOVW    g, 20(R13)
-
-       // g = m->gsignal
-       MOVW    g_m(g), R8
-       MOVW    m_gsignal(R8), g
-
-       // copy arguments for call to sighandler
-       MOVW    $11, R0
-       MOVW    R0, 4(R13) // signal
-       MOVW    $0, R0
-       MOVW    R0, 8(R13) // siginfo
-       MOVW    $ctxt+-4(FP), R0
-       MOVW    R0, 12(R13) // context
-       MOVW    R3, 16(R13) // g
-
-       BL      runtime·sighandler(SB)
-
-       // restore g
-       MOVW    20(R13), g
-
-       // Enable exceptions again.
-       NACL_SYSCALL(SYS_exception_clear_flag)
-
-       // Restore registers as best we can. Impossible to do perfectly.
-       // See comment in sys_nacl_386.s for extended rationale.
-       MOVW    $ctxt+-4(FP), R1
-       ADD     $64, R1
-       MOVW    (0*4)(R1), R0
-       MOVW    (2*4)(R1), R2
-       MOVW    (3*4)(R1), R3
-       MOVW    (4*4)(R1), R4
-       MOVW    (5*4)(R1), R5
-       MOVW    (6*4)(R1), R6
-       MOVW    (7*4)(R1), R7
-       MOVW    (8*4)(R1), R8
-       // cannot write to R9
-       MOVW    (10*4)(R1), g
-       MOVW    (11*4)(R1), R11
-       MOVW    (12*4)(R1), R12
-       MOVW    (13*4)(R1), R13
-       MOVW    (14*4)(R1), R14
-       MOVW    (15*4)(R1), R1
-       B       (R1)
-
-nog:
-       MOVW    $0, R0
-       RET
-
-// func getRandomData([]byte)
-TEXT runtime·getRandomData(SB),NOSPLIT,$0-12
-       MOVW arg_base+0(FP), R0
-       MOVW arg_len+4(FP), R1
-       NACL_SYSCALL(SYS_get_random_bytes)
-       RET
-
-// Likewise, this is only valid for ARMv7+, but that's okay.
-TEXT Â·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
-       B       runtime·armPublicationBarrier(SB)
-
-TEXT runtime·read_tls_fallback(SB),NOSPLIT|NOFRAME,$0
-       WORD $0xe7fedef0 // NACL_INSTR_ARM_ABORT_NOW (UDF #0xEDE0)
diff --git a/src/runtime/syscall_nacl.h b/src/runtime/syscall_nacl.h
deleted file mode 100644 (file)
index 5ee75ab..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-// Code generated by mknacl.sh; DO NOT EDIT.
-#define SYS_null 1
-#define SYS_nameservice 2
-#define SYS_dup 8
-#define SYS_dup2 9
-#define SYS_open 10
-#define SYS_close 11
-#define SYS_read 12
-#define SYS_write 13
-#define SYS_lseek 14
-#define SYS_stat 16
-#define SYS_fstat 17
-#define SYS_chmod 18
-#define SYS_isatty 19
-#define SYS_brk 20
-#define SYS_mmap 21
-#define SYS_munmap 22
-#define SYS_getdents 23
-#define SYS_mprotect 24
-#define SYS_list_mappings 25
-#define SYS_exit 30
-#define SYS_getpid 31
-#define SYS_sched_yield 32
-#define SYS_sysconf 33
-#define SYS_gettimeofday 40
-#define SYS_clock 41
-#define SYS_nanosleep 42
-#define SYS_clock_getres 43
-#define SYS_clock_gettime 44
-#define SYS_mkdir 45
-#define SYS_rmdir 46
-#define SYS_chdir 47
-#define SYS_getcwd 48
-#define SYS_unlink 49
-#define SYS_imc_makeboundsock 60
-#define SYS_imc_accept 61
-#define SYS_imc_connect 62
-#define SYS_imc_sendmsg 63
-#define SYS_imc_recvmsg 64
-#define SYS_imc_mem_obj_create 65
-#define SYS_imc_socketpair 66
-#define SYS_mutex_create 70
-#define SYS_mutex_lock 71
-#define SYS_mutex_trylock 72
-#define SYS_mutex_unlock 73
-#define SYS_cond_create 74
-#define SYS_cond_wait 75
-#define SYS_cond_signal 76
-#define SYS_cond_broadcast 77
-#define SYS_cond_timed_wait_abs 79
-#define SYS_thread_create 80
-#define SYS_thread_exit 81
-#define SYS_tls_init 82
-#define SYS_thread_nice 83
-#define SYS_tls_get 84
-#define SYS_second_tls_set 85
-#define SYS_second_tls_get 86
-#define SYS_exception_handler 87
-#define SYS_exception_stack 88
-#define SYS_exception_clear_flag 89
-#define SYS_sem_create 100
-#define SYS_sem_wait 101
-#define SYS_sem_post 102
-#define SYS_sem_get_value 103
-#define SYS_dyncode_create 104
-#define SYS_dyncode_modify 105
-#define SYS_dyncode_delete 106
-#define SYS_test_infoleak 109
-#define SYS_test_crash 110
-#define SYS_test_syscall_1 111
-#define SYS_test_syscall_2 112
-#define SYS_futex_wait_abs 120
-#define SYS_futex_wake 121
-#define SYS_pread 130
-#define SYS_pwrite 131
-#define SYS_truncate 140
-#define SYS_lstat 141
-#define SYS_link 142
-#define SYS_rename 143
-#define SYS_symlink 144
-#define SYS_access 145
-#define SYS_readlink 146
-#define SYS_utimes 147
-#define SYS_get_random_bytes 150
index 2ccbada57b3c1a474529c6ad06a7f039da062290..417e105c68a5b97b6c2ce1cc84a8ae7d53e16667 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !windows,!plan9,!nacl
+// +build !windows,!plan9
 
 package main
 
index a1559fe6163d79c7d6083a0e9a16eeebc862f6b3..4d2de79d97c03377967570535170aa8264f52c84 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !windows,!plan9,!nacl
+// +build !windows,!plan9
 
 // This is in testprognet instead of testprog because testprog
 // must not import anything (like net, but also like os/signal)
index ac2a9aae8f5cc8346f7e36e5c501c0aab429215d..d667d11244ecfa769cb0c844fb7798d219310ac5 100644 (file)
@@ -13,8 +13,6 @@ import (
 
 // Package time knows the layout of this structure.
 // If this struct changes, adjust ../time/sleep.go:/runtimeTimer.
-// For GOOS=nacl, package syscall knows the layout of this structure.
-// If this struct changes, adjust ../syscall/net_nacl.go:/runtimeTimer.
 type timer struct {
        tb *timersBucket // the bucket the timer lives in
        i  int           // heap index
index bef3a6587350577160b81d6ccc2daf22b34cfd6b..c64d2994a901303463fc4ceb86831272355977bf 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 // +build faketime
-// +build !nacl
 // +build !windows
 
 // Faketime isn't currently supported on Windows. This would require:
index 0b153b9583ac707b30a2626544c41d96e5e83208..1912a94e873c803fd788fa6da605277062b146f4 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 // +build !faketime
-// +build !nacl
 
 package runtime
 
index 350089abc6a617d978dc18134491b7e224e260ce..bed789136896a56b2c51d7a4429e7e68d04c2177 100644 (file)
 //       runtime.mcall assumes this function only clobbers R0 and R11.
 // Returns with g in R0.
 TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0
-#ifdef GOOS_nacl
-       // nothing to do as nacl/arm does not use TLS at all.
-       MOVW    g, R0 // preserve R0 across call to setg<>
-       RET
-#else
        // If the host does not support MRC the linker will replace it with
        // a call to runtime.read_tls_fallback which jumps to __kuser_get_tls.
        // The replacement function saves LR in R11 over the call to read_tls_fallback.
@@ -48,16 +43,11 @@ TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0
        MOVW    g, 0(R0)
        MOVW    g, R0 // preserve R0 across call to setg<>
        RET
-#endif
 
 // load_g loads the g register from pthread-provided
 // thread-local memory, for use after calling externally compiled
 // ARM code that overwrote those registers.
 TEXT runtime·load_g(SB),NOSPLIT,$0
-#ifdef GOOS_nacl
-       // nothing to do as nacl/arm does not use TLS at all.
-       RET
-#else
        // See save_g
        MRC     15, 0, R0, C13, C0, 3 // fetch TLS base pointer
        BIC $3, R0 // Darwin/ARM might return unaligned pointer
@@ -65,7 +55,6 @@ TEXT runtime·load_g(SB),NOSPLIT,$0
        ADD     R11, R0
        MOVW    0(R0), g
        RET
-#endif
 
 // This is called from rt0_go, which runs on the system stack
 // using the initial stack allocated by the OS.
@@ -78,7 +67,6 @@ TEXT runtime·load_g(SB),NOSPLIT,$0
 // Declare a dummy word ($4, not $0) to make sure the
 // frame is 8 bytes and stays 8-byte-aligned.
 TEXT runtime·_initcgo(SB),NOSPLIT,$4
-#ifndef GOOS_nacl
        // if there is an _cgo_init, call it.
        MOVW    _cgo_init(SB), R4
        CMP     $0, R4
@@ -93,7 +81,6 @@ TEXT runtime·_initcgo(SB),NOSPLIT,$4
        MOVW    $setg_gcc<>(SB), R1     // arg 1: setg
        MOVW    g, R0                   // arg 0: G
        BL      (R4) // will clobber R0-R3
-#endif
 nocgo:
        RET
 
index 41d285874dda72e5bbcdded082389427f2ca2495..3f28f03c482f7a2279439c95e84c9941ad4ed836 100644 (file)
@@ -40,9 +40,7 @@
 #define Ra     R11
 
 // Be careful: Ra == R11 will be used by the linker for synthesized instructions.
-// Note: this function does not have a frame. If it ever needs a frame,
-// the RET instruction will clobber R12 on nacl, and the compiler's register
-// allocator needs to know.
+// Note: this function does not have a frame.
 TEXT runtime·udiv(SB),NOSPLIT|NOFRAME,$0
        MOVBU   internal∕cpu·ARM+const_offsetARMHasIDIVA(SB), Ra
        CMP     $0, Ra
diff --git a/src/syscall/asm_nacl_386.s b/src/syscall/asm_nacl_386.s
deleted file mode 100644 (file)
index b989171..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2013 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 "textflag.h"
-#include "funcdata.h"
-#include "../runtime/syscall_nacl.h"
-
-//
-// System call support for 386, Native Client
-//
-
-#define NACL_SYSCALL(code) \
-       MOVL $(0x10000 + ((code)<<5)), AX; CALL AX
-
-#define NACL_SYSJMP(code) \
-       MOVL $(0x10000 + ((code)<<5)), AX; JMP AX
-
-TEXT Â·Syscall(SB),NOSPLIT,$12-28
-       NO_LOCAL_POINTERS
-       CALL    runtime·entersyscall(SB)
-       MOVL    trap+0(FP), AX
-       MOVL    a1+4(FP), BX
-       MOVL    BX, 0(SP)
-       MOVL    a2+8(FP), BX
-       MOVL    BX, 4(SP)
-       MOVL    a3+12(FP), BX
-       MOVL    BX, 8(SP)
-       SHLL    $5, AX
-       ADDL    $0x10000, AX
-       CALL    AX
-       CMPL    AX, $0
-       JGE     ok
-       MOVL    $-1, r1+16(FP)
-       MOVL    $-1, r2+20(FP)
-       NEGL    AX
-       MOVL    AX, err+24(FP)
-       CALL    runtime·exitsyscall(SB)
-       RET
-ok:
-       MOVL    AX, r1+16(FP)
-       MOVL    DX, r2+20(FP)
-       MOVL    $0, err+24(FP)
-       CALL    runtime·exitsyscall(SB)
-       RET
diff --git a/src/syscall/asm_nacl_arm.s b/src/syscall/asm_nacl_arm.s
deleted file mode 100644 (file)
index 6092afd..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2014 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 "textflag.h"
-#include "funcdata.h"
-#include "../runtime/syscall_nacl.h"
-
-//
-// System call support for ARM, Native Client
-//
-
-#define NACL_SYSCALL(code) \
-       MOVW $(0x10000 + ((code)<<5)), R8; BL (R8)
-
-#define NACL_SYSJMP(code) \
-       MOVW $(0x10000 + ((code)<<5)), R8; B (R8)
-
-TEXT Â·Syscall(SB),NOSPLIT,$0-28
-       BL      runtime·entersyscall(SB)
-       MOVW    trap+0(FP), R8
-       MOVW    a1+4(FP), R0
-       MOVW    a2+8(FP), R1
-       MOVW    a3+12(FP), R2
-       // more args would use R3, and then stack.
-       MOVW    $0x10000, R7
-       ADD     R8<<5, R7
-       BL      (R7)
-       CMP     $0, R0
-       BGE     ok
-       MOVW    $-1, R1
-       MOVW    R1, r1+16(FP)
-       MOVW    R1, r2+20(FP)
-       RSB     $0, R0
-       MOVW    R0, err+24(FP)
-       BL      runtime·exitsyscall(SB)
-       RET
-ok:
-       MOVW    R0, r1+16(FP)
-       MOVW    R1, r2+20(FP)
-       MOVW    $0, R2
-       MOVW    R2, err+24(FP)
-       BL      runtime·exitsyscall(SB)
-       RET
index 5c7af42b0c9857020046ec1bdfe459222a6df4af..fab123d4a7d8bc8e75187ab95cfb2bb9a7eac14e 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package syscall
 
index 0b6b711a8ffeb7ee50f2757574867993a5467b82..e80a3ff1c96872c5d5ce3cae29a2f6139e5440a5 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 // Unix environment variables.
 
diff --git a/src/syscall/fd_nacl.go b/src/syscall/fd_nacl.go
deleted file mode 100644 (file)
index b31aa58..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-// Copyright 2013 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.
-
-// File descriptor support for Native Client.
-// We want to provide access to a broader range of (simulated) files than
-// Native Client allows, so we maintain our own file descriptor table exposed
-// to higher-level packages.
-
-package syscall
-
-import (
-       "io"
-       "sync"
-)
-
-// files is the table indexed by a file descriptor.
-var files struct {
-       sync.RWMutex
-       tab []*file
-}
-
-// A file is an open file, something with a file descriptor.
-// A particular *file may appear in files multiple times, due to use of Dup or Dup2.
-type file struct {
-       fdref int      // uses in files.tab
-       impl  fileImpl // underlying implementation
-}
-
-// A fileImpl is the implementation of something that can be a file.
-type fileImpl interface {
-       // Standard operations.
-       // These can be called concurrently from multiple goroutines.
-       stat(*Stat_t) error
-       read([]byte) (int, error)
-       write([]byte) (int, error)
-       seek(int64, int) (int64, error)
-       pread([]byte, int64) (int, error)
-       pwrite([]byte, int64) (int, error)
-
-       // Close is called when the last reference to a *file is removed
-       // from the file descriptor table. It may be called concurrently
-       // with active operations such as blocked read or write calls.
-       close() error
-}
-
-// newFD adds impl to the file descriptor table,
-// returning the new file descriptor.
-// Like Unix, it uses the lowest available descriptor.
-func newFD(impl fileImpl) int {
-       files.Lock()
-       defer files.Unlock()
-       f := &file{impl: impl, fdref: 1}
-       for fd, oldf := range files.tab {
-               if oldf == nil {
-                       files.tab[fd] = f
-                       return fd
-               }
-       }
-       fd := len(files.tab)
-       files.tab = append(files.tab, f)
-       return fd
-}
-
-// Install Native Client stdin, stdout, stderr.
-func init() {
-       newFD(&naclFile{naclFD: 0})
-       newFD(&naclFile{naclFD: 1})
-       newFD(&naclFile{naclFD: 2})
-}
-
-// fdToFile retrieves the *file corresponding to a file descriptor.
-func fdToFile(fd int) (*file, error) {
-       files.Lock()
-       defer files.Unlock()
-       if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil {
-               return nil, EBADF
-       }
-       return files.tab[fd], nil
-}
-
-func Close(fd int) error {
-       files.Lock()
-       if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil {
-               files.Unlock()
-               return EBADF
-       }
-       f := files.tab[fd]
-       files.tab[fd] = nil
-       f.fdref--
-       fdref := f.fdref
-       files.Unlock()
-       if fdref > 0 {
-               return nil
-       }
-       return f.impl.close()
-}
-
-func CloseOnExec(fd int) {
-       // nothing to do - no exec
-}
-
-func Dup(fd int) (int, error) {
-       files.Lock()
-       defer files.Unlock()
-       if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil {
-               return -1, EBADF
-       }
-       f := files.tab[fd]
-       f.fdref++
-       for newfd, oldf := range files.tab {
-               if oldf == nil {
-                       files.tab[newfd] = f
-                       return newfd, nil
-               }
-       }
-       newfd := len(files.tab)
-       files.tab = append(files.tab, f)
-       return newfd, nil
-}
-
-func Dup2(fd, newfd int) error {
-       files.Lock()
-       if fd < 0 || fd >= len(files.tab) || files.tab[fd] == nil || newfd < 0 || newfd >= len(files.tab)+100 {
-               files.Unlock()
-               return EBADF
-       }
-       f := files.tab[fd]
-       f.fdref++
-       for cap(files.tab) <= newfd {
-               files.tab = append(files.tab[:cap(files.tab)], nil)
-       }
-       oldf := files.tab[newfd]
-       var oldfdref int
-       if oldf != nil {
-               oldf.fdref--
-               oldfdref = oldf.fdref
-       }
-       files.tab[newfd] = f
-       files.Unlock()
-       if oldf != nil {
-               if oldfdref == 0 {
-                       oldf.impl.close()
-               }
-       }
-       return nil
-}
-
-func Fstat(fd int, st *Stat_t) error {
-       f, err := fdToFile(fd)
-       if err != nil {
-               return err
-       }
-       return f.impl.stat(st)
-}
-
-func Read(fd int, b []byte) (int, error) {
-       f, err := fdToFile(fd)
-       if err != nil {
-               return 0, err
-       }
-       return f.impl.read(b)
-}
-
-var zerobuf [0]byte
-
-func Write(fd int, b []byte) (int, error) {
-       if b == nil {
-               // avoid nil in syscalls; nacl doesn't like that.
-               b = zerobuf[:]
-       }
-       f, err := fdToFile(fd)
-       if err != nil {
-               return 0, err
-       }
-       return f.impl.write(b)
-}
-
-func Pread(fd int, b []byte, offset int64) (int, error) {
-       f, err := fdToFile(fd)
-       if err != nil {
-               return 0, err
-       }
-       return f.impl.pread(b, offset)
-}
-
-func Pwrite(fd int, b []byte, offset int64) (int, error) {
-       f, err := fdToFile(fd)
-       if err != nil {
-               return 0, err
-       }
-       return f.impl.pwrite(b, offset)
-}
-
-func Seek(fd int, offset int64, whence int) (int64, error) {
-       f, err := fdToFile(fd)
-       if err != nil {
-               return 0, err
-       }
-       return f.impl.seek(offset, whence)
-}
-
-// defaulFileImpl implements fileImpl.
-// It can be embedded to complete a partial fileImpl implementation.
-type defaultFileImpl struct{}
-
-func (*defaultFileImpl) close() error                      { return nil }
-func (*defaultFileImpl) stat(*Stat_t) error                { return ENOSYS }
-func (*defaultFileImpl) read([]byte) (int, error)          { return 0, ENOSYS }
-func (*defaultFileImpl) write([]byte) (int, error)         { return 0, ENOSYS }
-func (*defaultFileImpl) seek(int64, int) (int64, error)    { return 0, ENOSYS }
-func (*defaultFileImpl) pread([]byte, int64) (int, error)  { return 0, ENOSYS }
-func (*defaultFileImpl) pwrite([]byte, int64) (int, error) { return 0, ENOSYS }
-
-// naclFile is the fileImpl implementation for a Native Client file descriptor.
-type naclFile struct {
-       defaultFileImpl
-       naclFD int
-}
-
-func (f *naclFile) stat(st *Stat_t) error {
-       return naclFstat(f.naclFD, st)
-}
-
-func (f *naclFile) read(b []byte) (int, error) {
-       n, err := naclRead(f.naclFD, b)
-       if err != nil {
-               n = 0
-       }
-       return n, err
-}
-
-// implemented in package runtime, to add time header on playground
-func naclWrite(fd int, b []byte) int
-
-func (f *naclFile) write(b []byte) (int, error) {
-       n := naclWrite(f.naclFD, b)
-       if n < 0 {
-               return 0, Errno(-n)
-       }
-       return n, nil
-}
-
-func (f *naclFile) seek(off int64, whence int) (int64, error) {
-       old := off
-       err := naclSeek(f.naclFD, &off, whence)
-       if err != nil {
-               return old, err
-       }
-       return off, nil
-}
-
-func (f *naclFile) prw(b []byte, offset int64, rw func([]byte) (int, error)) (int, error) {
-       // NaCl has no pread; simulate with seek and hope for no races.
-       old, err := f.seek(0, io.SeekCurrent)
-       if err != nil {
-               return 0, err
-       }
-       if _, err := f.seek(offset, io.SeekStart); err != nil {
-               return 0, err
-       }
-       n, err := rw(b)
-       f.seek(old, io.SeekStart)
-       return n, err
-}
-
-func (f *naclFile) pread(b []byte, offset int64) (int, error) {
-       return f.prw(b, offset, f.read)
-}
-
-func (f *naclFile) pwrite(b []byte, offset int64) (int, error) {
-       return f.prw(b, offset, f.write)
-}
-
-func (f *naclFile) close() error {
-       err := naclClose(f.naclFD)
-       f.naclFD = -1
-       return err
-}
-
-// A pipeFile is an in-memory implementation of a pipe.
-// The byteq implementation is in net_nacl.go.
-type pipeFile struct {
-       defaultFileImpl
-       rd *byteq
-       wr *byteq
-}
-
-func (f *pipeFile) close() error {
-       if f.rd != nil {
-               f.rd.close()
-       }
-       if f.wr != nil {
-               f.wr.close()
-       }
-       return nil
-}
-
-func (f *pipeFile) read(b []byte) (int, error) {
-       if f.rd == nil {
-               return 0, EINVAL
-       }
-       n, err := f.rd.read(b, 0)
-       if err == EAGAIN {
-               err = nil
-       }
-       return n, err
-}
-
-func (f *pipeFile) write(b []byte) (int, error) {
-       if f.wr == nil {
-               return 0, EINVAL
-       }
-       n, err := f.wr.write(b, 0)
-       if err == EAGAIN {
-               err = EPIPE
-       }
-       return n, err
-}
-
-func Pipe(fd []int) error {
-       q := newByteq()
-       fd[0] = newFD(&pipeFile{rd: q})
-       fd[1] = newFD(&pipeFile{wr: q})
-       return nil
-}
diff --git a/src/syscall/fs_nacl.go b/src/syscall/fs_nacl.go
deleted file mode 100644 (file)
index dfe13d9..0000000
+++ /dev/null
@@ -1,846 +0,0 @@
-// Copyright 2013 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.
-
-// A simulated Unix-like file system for use within NaCl.
-//
-// The simulation is not particularly tied to NaCl other than the reuse
-// of NaCl's definition for the Stat_t structure.
-//
-// The file system need never be written to disk, so it is represented as
-// in-memory Go data structures, never in a serialized form.
-//
-// TODO: Perhaps support symlinks, although they muck everything up.
-
-package syscall
-
-import (
-       "io"
-       "sync"
-       "unsafe"
-)
-
-// Provided by package runtime.
-func now() (sec int64, nsec int32)
-
-// An fsys is a file system.
-// Since there is no I/O (everything is in memory),
-// the global lock mu protects the whole file system state,
-// and that's okay.
-type fsys struct {
-       mu   sync.Mutex
-       root *inode                    // root directory
-       cwd  *inode                    // process current directory
-       inum uint64                    // number of inodes created
-       dev  []func() (devFile, error) // table for opening devices
-}
-
-// A devFile is the implementation required of device files
-// like /dev/null or /dev/random.
-type devFile interface {
-       pread([]byte, int64) (int, error)
-       pwrite([]byte, int64) (int, error)
-}
-
-// An inode is a (possibly special) file in the file system.
-type inode struct {
-       Stat_t
-       data []byte
-       dir  []dirent
-}
-
-// A dirent describes a single directory entry.
-type dirent struct {
-       name  string
-       inode *inode
-}
-
-// An fsysFile is the fileImpl implementation backed by the file system.
-type fsysFile struct {
-       defaultFileImpl
-       fsys     *fsys
-       inode    *inode
-       openmode int
-       offset   int64
-       dev      devFile
-}
-
-// newFsys creates a new file system.
-func newFsys() *fsys {
-       fs := &fsys{}
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       ip := fs.newInode()
-       ip.Mode = 0555 | S_IFDIR
-       fs.dirlink(ip, ".", ip)
-       fs.dirlink(ip, "..", ip)
-       fs.cwd = ip
-       fs.root = ip
-       return fs
-}
-
-var fs = newFsys()
-var fsinit = func() {}
-
-func init() {
-       // do not trigger loading of zipped file system here
-       oldFsinit := fsinit
-       defer func() { fsinit = oldFsinit }()
-       fsinit = func() {}
-       Mkdir("/dev", 0555)
-       Mkdir("/tmp", 0777)
-       mkdev("/dev/null", 0666, openNull)
-       mkdev("/dev/random", 0444, openRandom)
-       mkdev("/dev/urandom", 0444, openRandom)
-       mkdev("/dev/zero", 0666, openZero)
-       chdirEnv()
-}
-
-func chdirEnv() {
-       pwd, ok := Getenv("NACLPWD")
-       if ok {
-               chdir(pwd)
-       }
-}
-
-// Except where indicated otherwise, unexported methods on fsys
-// expect fs.mu to have been locked by the caller.
-
-// newInode creates a new inode.
-func (fs *fsys) newInode() *inode {
-       fs.inum++
-       ip := &inode{
-               Stat_t: Stat_t{
-                       Ino:     fs.inum,
-                       Blksize: 512,
-               },
-       }
-       return ip
-}
-
-// atime sets ip.Atime to the current time.
-func (fs *fsys) atime(ip *inode) {
-       sec, nsec := now()
-       ip.Atime, ip.AtimeNsec = sec, int64(nsec)
-}
-
-// mtime sets ip.Mtime to the current time.
-func (fs *fsys) mtime(ip *inode) {
-       sec, nsec := now()
-       ip.Mtime, ip.MtimeNsec = sec, int64(nsec)
-}
-
-// dirlookup looks for an entry in the directory dp with the given name.
-// It returns the directory entry and its index within the directory.
-func (fs *fsys) dirlookup(dp *inode, name string) (de *dirent, index int, err error) {
-       fs.atime(dp)
-       for i := range dp.dir {
-               de := &dp.dir[i]
-               if de.name == name {
-                       fs.atime(de.inode)
-                       return de, i, nil
-               }
-       }
-       return nil, 0, ENOENT
-}
-
-// dirlink adds to the directory dp an entry for name pointing at the inode ip.
-// If dp already contains an entry for name, that entry is overwritten.
-func (fs *fsys) dirlink(dp *inode, name string, ip *inode) {
-       fs.mtime(dp)
-       fs.atime(ip)
-       ip.Nlink++
-       for i := range dp.dir {
-               if dp.dir[i].name == name {
-                       dp.dir[i] = dirent{name, ip}
-                       return
-               }
-       }
-       dp.dir = append(dp.dir, dirent{name, ip})
-       dp.dirSize()
-}
-
-func (dp *inode) dirSize() {
-       dp.Size = int64(len(dp.dir)) * (8 + 8 + 2 + 256) // Dirent
-}
-
-// skipelem splits path into the first element and the remainder.
-// the returned first element contains no slashes, and the returned
-// remainder does not begin with a slash.
-func skipelem(path string) (elem, rest string) {
-       for len(path) > 0 && path[0] == '/' {
-               path = path[1:]
-       }
-       if len(path) == 0 {
-               return "", ""
-       }
-       i := 0
-       for i < len(path) && path[i] != '/' {
-               i++
-       }
-       elem, path = path[:i], path[i:]
-       for len(path) > 0 && path[0] == '/' {
-               path = path[1:]
-       }
-       return elem, path
-}
-
-// namei translates a file system path name into an inode.
-// If parent is false, the returned ip corresponds to the given name, and elem is the empty string.
-// If parent is true, the walk stops at the next-to-last element in the name,
-// so that ip is the parent directory and elem is the final element in the path.
-func (fs *fsys) namei(path string, parent bool) (ip *inode, elem string, err error) {
-       // Reject NUL in name.
-       for i := 0; i < len(path); i++ {
-               if path[i] == '\x00' {
-                       return nil, "", EINVAL
-               }
-       }
-
-       // Reject empty name.
-       if path == "" {
-               return nil, "", EINVAL
-       }
-
-       if path[0] == '/' {
-               ip = fs.root
-       } else {
-               ip = fs.cwd
-       }
-
-       for len(path) > 0 && path[len(path)-1] == '/' {
-               path = path[:len(path)-1]
-       }
-
-       for {
-               elem, rest := skipelem(path)
-               if elem == "" {
-                       if parent && ip.Mode&S_IFMT == S_IFDIR {
-                               return ip, ".", nil
-                       }
-                       break
-               }
-               if ip.Mode&S_IFMT != S_IFDIR {
-                       return nil, "", ENOTDIR
-               }
-               if len(elem) >= 256 {
-                       return nil, "", ENAMETOOLONG
-               }
-               if parent && rest == "" {
-                       // Stop one level early.
-                       return ip, elem, nil
-               }
-               de, _, err := fs.dirlookup(ip, elem)
-               if err != nil {
-                       return nil, "", err
-               }
-               ip = de.inode
-               path = rest
-       }
-       if parent {
-               return nil, "", ENOTDIR
-       }
-       return ip, "", nil
-}
-
-// open opens or creates a file with the given name, open mode,
-// and permission mode bits.
-func (fs *fsys) open(name string, openmode int, mode uint32) (fileImpl, error) {
-       dp, elem, err := fs.namei(name, true)
-       if err != nil {
-               return nil, err
-       }
-       var (
-               ip  *inode
-               dev devFile
-       )
-       de, _, err := fs.dirlookup(dp, elem)
-       if err != nil {
-               if openmode&O_CREATE == 0 {
-                       return nil, err
-               }
-               ip = fs.newInode()
-               ip.Mode = mode
-               fs.dirlink(dp, elem, ip)
-               if ip.Mode&S_IFMT == S_IFDIR {
-                       fs.dirlink(ip, ".", ip)
-                       fs.dirlink(ip, "..", dp)
-               }
-       } else {
-               ip = de.inode
-               if openmode&(O_CREATE|O_EXCL) == O_CREATE|O_EXCL {
-                       return nil, EEXIST
-               }
-               if openmode&O_TRUNC != 0 {
-                       if ip.Mode&S_IFMT == S_IFDIR {
-                               return nil, EISDIR
-                       }
-                       ip.data = nil
-               }
-               if ip.Mode&S_IFMT == S_IFCHR {
-                       if ip.Rdev < 0 || ip.Rdev >= int64(len(fs.dev)) || fs.dev[ip.Rdev] == nil {
-                               return nil, ENODEV
-                       }
-                       dev, err = fs.dev[ip.Rdev]()
-                       if err != nil {
-                               return nil, err
-                       }
-               }
-       }
-
-       switch openmode & O_ACCMODE {
-       case O_WRONLY, O_RDWR:
-               if ip.Mode&S_IFMT == S_IFDIR {
-                       return nil, EISDIR
-               }
-       }
-
-       switch ip.Mode & S_IFMT {
-       case S_IFDIR:
-               if openmode&O_ACCMODE != O_RDONLY {
-                       return nil, EISDIR
-               }
-
-       case S_IFREG:
-               // ok
-
-       case S_IFCHR:
-               // handled above
-
-       default:
-               // TODO: some kind of special file
-               return nil, EPERM
-       }
-
-       f := &fsysFile{
-               fsys:     fs,
-               inode:    ip,
-               openmode: openmode,
-               dev:      dev,
-       }
-       if openmode&O_APPEND != 0 {
-               f.offset = ip.Size
-       }
-       return f, nil
-}
-
-// fsysFile methods to implement fileImpl.
-
-func (f *fsysFile) stat(st *Stat_t) error {
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       *st = f.inode.Stat_t
-       return nil
-}
-
-func (f *fsysFile) read(b []byte) (int, error) {
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       n, err := f.preadLocked(b, f.offset)
-       f.offset += int64(n)
-       return n, err
-}
-
-func ReadDirent(fd int, buf []byte) (int, error) {
-       f, err := fdToFsysFile(fd)
-       if err != nil {
-               return 0, err
-       }
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       if f.inode.Mode&S_IFMT != S_IFDIR {
-               return 0, EINVAL
-       }
-       n, err := f.preadLocked(buf, f.offset)
-       f.offset += int64(n)
-       return n, err
-}
-
-func (f *fsysFile) write(b []byte) (int, error) {
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       n, err := f.pwriteLocked(b, f.offset)
-       f.offset += int64(n)
-       return n, err
-}
-
-func (f *fsysFile) seek(offset int64, whence int) (int64, error) {
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       switch whence {
-       case io.SeekCurrent:
-               offset += f.offset
-       case io.SeekEnd:
-               offset += f.inode.Size
-       }
-       if offset < 0 {
-               return 0, EINVAL
-       }
-       if offset > f.inode.Size {
-               return 0, EINVAL
-       }
-       f.offset = offset
-       return offset, nil
-}
-
-func (f *fsysFile) pread(b []byte, offset int64) (int, error) {
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       return f.preadLocked(b, offset)
-}
-
-func (f *fsysFile) pwrite(b []byte, offset int64) (int, error) {
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       return f.pwriteLocked(b, offset)
-}
-
-func (f *fsysFile) preadLocked(b []byte, offset int64) (int, error) {
-       if f.openmode&O_ACCMODE == O_WRONLY {
-               return 0, EINVAL
-       }
-       if offset < 0 {
-               return 0, EINVAL
-       }
-       if f.dev != nil {
-               f.fsys.atime(f.inode)
-               f.fsys.mu.Unlock()
-               defer f.fsys.mu.Lock()
-               return f.dev.pread(b, offset)
-       }
-       if offset > f.inode.Size {
-               return 0, nil
-       }
-       if int64(len(b)) > f.inode.Size-offset {
-               b = b[:f.inode.Size-offset]
-       }
-
-       if f.inode.Mode&S_IFMT == S_IFDIR {
-               if offset%direntSize != 0 || len(b) != 0 && len(b) < direntSize {
-                       return 0, EINVAL
-               }
-               fs.atime(f.inode)
-               n := 0
-               for len(b) >= direntSize {
-                       src := f.inode.dir[int(offset/direntSize)]
-                       dst := (*Dirent)(unsafe.Pointer(&b[0]))
-                       dst.Ino = int64(src.inode.Ino)
-                       dst.Off = offset
-                       dst.Reclen = direntSize
-                       for i := range dst.Name {
-                               dst.Name[i] = 0
-                       }
-                       copy(dst.Name[:], src.name)
-                       n += direntSize
-                       offset += direntSize
-                       b = b[direntSize:]
-               }
-               return n, nil
-       }
-
-       fs.atime(f.inode)
-       n := copy(b, f.inode.data[offset:])
-       return n, nil
-}
-
-func (f *fsysFile) pwriteLocked(b []byte, offset int64) (int, error) {
-       if f.openmode&O_ACCMODE == O_RDONLY {
-               return 0, EINVAL
-       }
-       if offset < 0 {
-               return 0, EINVAL
-       }
-       if f.dev != nil {
-               f.fsys.atime(f.inode)
-               f.fsys.mu.Unlock()
-               defer f.fsys.mu.Lock()
-               return f.dev.pwrite(b, offset)
-       }
-       if offset > f.inode.Size {
-               return 0, EINVAL
-       }
-       f.fsys.mtime(f.inode)
-       n := copy(f.inode.data[offset:], b)
-       if n < len(b) {
-               f.inode.data = append(f.inode.data, b[n:]...)
-               f.inode.Size = int64(len(f.inode.data))
-       }
-       return len(b), nil
-}
-
-// Standard Unix system calls.
-
-func Open(path string, openmode int, perm uint32) (fd int, err error) {
-       fsinit()
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       f, err := fs.open(path, openmode, perm&0777|S_IFREG)
-       if err != nil {
-               return -1, err
-       }
-       return newFD(f), nil
-}
-
-func Mkdir(path string, perm uint32) error {
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       _, err := fs.open(path, O_CREATE|O_EXCL, perm&0777|S_IFDIR)
-       return err
-}
-
-func Getcwd(buf []byte) (n int, err error) {
-       // Force package os to default to the old algorithm using .. and directory reads.
-       return 0, ENOSYS
-}
-
-func Stat(path string, st *Stat_t) error {
-       fsinit()
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       ip, _, err := fs.namei(path, false)
-       if err != nil {
-               return err
-       }
-       *st = ip.Stat_t
-       return nil
-}
-
-func Lstat(path string, st *Stat_t) error {
-       return Stat(path, st)
-}
-
-func unlink(path string, isdir bool) error {
-       fsinit()
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       dp, elem, err := fs.namei(path, true)
-       if err != nil {
-               return err
-       }
-       if elem == "." || elem == ".." {
-               return EINVAL
-       }
-       de, _, err := fs.dirlookup(dp, elem)
-       if err != nil {
-               return err
-       }
-       if isdir {
-               if de.inode.Mode&S_IFMT != S_IFDIR {
-                       return ENOTDIR
-               }
-               if len(de.inode.dir) != 2 {
-                       return ENOTEMPTY
-               }
-       } else {
-               if de.inode.Mode&S_IFMT == S_IFDIR {
-                       return EISDIR
-               }
-       }
-       de.inode.Nlink--
-       *de = dp.dir[len(dp.dir)-1]
-       dp.dir = dp.dir[:len(dp.dir)-1]
-       dp.dirSize()
-       return nil
-}
-
-func Unlink(path string) error {
-       return unlink(path, false)
-}
-
-func Rmdir(path string) error {
-       return unlink(path, true)
-}
-
-func Chmod(path string, mode uint32) error {
-       fsinit()
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       ip, _, err := fs.namei(path, false)
-       if err != nil {
-               return err
-       }
-       ip.Mode = ip.Mode&^0777 | mode&0777
-       return nil
-}
-
-func Fchmod(fd int, mode uint32) error {
-       f, err := fdToFsysFile(fd)
-       if err != nil {
-               return err
-       }
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       f.inode.Mode = f.inode.Mode&^0777 | mode&0777
-       return nil
-}
-
-func Chown(path string, uid, gid int) error {
-       fsinit()
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       ip, _, err := fs.namei(path, false)
-       if err != nil {
-               return err
-       }
-       if uid != -1 {
-               ip.Uid = uint32(uid)
-       }
-       if gid != -1 {
-               ip.Gid = uint32(gid)
-       }
-       return nil
-}
-
-func Fchown(fd int, uid, gid int) error {
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       f, err := fdToFsysFile(fd)
-       if err != nil {
-               return err
-       }
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       f.inode.Uid = uint32(uid)
-       f.inode.Gid = uint32(gid)
-       return nil
-}
-
-func Lchown(path string, uid, gid int) error {
-       return Chown(path, uid, gid)
-}
-
-func UtimesNano(path string, ts []Timespec) error {
-       if len(ts) != 2 {
-               return EINVAL
-       }
-       fsinit()
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       ip, _, err := fs.namei(path, false)
-       if err != nil {
-               return err
-       }
-       ip.Atime = ts[0].Sec
-       ip.AtimeNsec = int64(ts[0].Nsec)
-       ip.Mtime = ts[1].Sec
-       ip.MtimeNsec = int64(ts[1].Nsec)
-       return nil
-}
-
-func Link(path, link string) error {
-       fsinit()
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       ip, _, err := fs.namei(path, false)
-       if err != nil {
-               return err
-       }
-       dp, elem, err := fs.namei(link, true)
-       if err != nil {
-               return err
-       }
-       if ip.Mode&S_IFMT == S_IFDIR {
-               return EPERM
-       }
-       _, _, err = fs.dirlookup(dp, elem)
-       if err == nil {
-               return EEXIST
-       }
-       fs.dirlink(dp, elem, ip)
-       return nil
-}
-
-func Rename(from, to string) error {
-       fsinit()
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       fdp, felem, err := fs.namei(from, true)
-       if err != nil {
-               return err
-       }
-       fde, _, err := fs.dirlookup(fdp, felem)
-       if err != nil {
-               return err
-       }
-       tdp, telem, err := fs.namei(to, true)
-       if err != nil {
-               return err
-       }
-       fs.dirlink(tdp, telem, fde.inode)
-       fde.inode.Nlink--
-       *fde = fdp.dir[len(fdp.dir)-1]
-       fdp.dir = fdp.dir[:len(fdp.dir)-1]
-       fdp.dirSize()
-       return nil
-}
-
-func (fs *fsys) truncate(ip *inode, length int64) error {
-       if length > 1e9 || ip.Mode&S_IFMT != S_IFREG {
-               return EINVAL
-       }
-       if length < int64(len(ip.data)) {
-               ip.data = ip.data[:length]
-       } else {
-               data := make([]byte, length)
-               copy(data, ip.data)
-               ip.data = data
-       }
-       ip.Size = int64(len(ip.data))
-       return nil
-}
-
-func Truncate(path string, length int64) error {
-       fsinit()
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       ip, _, err := fs.namei(path, false)
-       if err != nil {
-               return err
-       }
-       return fs.truncate(ip, length)
-}
-
-func Ftruncate(fd int, length int64) error {
-       f, err := fdToFsysFile(fd)
-       if err != nil {
-               return err
-       }
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       return f.fsys.truncate(f.inode, length)
-}
-
-func Chdir(path string) error {
-       fsinit()
-       return chdir(path)
-}
-
-func chdir(path string) error {
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       ip, _, err := fs.namei(path, false)
-       if err != nil {
-               return err
-       }
-       fs.cwd = ip
-       return nil
-}
-
-func Fchdir(fd int) error {
-       f, err := fdToFsysFile(fd)
-       if err != nil {
-               return err
-       }
-       f.fsys.mu.Lock()
-       defer f.fsys.mu.Unlock()
-       if f.inode.Mode&S_IFMT != S_IFDIR {
-               return ENOTDIR
-       }
-       fs.cwd = f.inode
-       return nil
-}
-
-func Readlink(path string, buf []byte) (n int, err error) {
-       return 0, ENOSYS
-}
-
-func Symlink(path, link string) error {
-       return ENOSYS
-}
-
-func Fsync(fd int) error {
-       return nil
-}
-
-// Special devices.
-
-func mkdev(path string, mode uint32, open func() (devFile, error)) error {
-       f, err := fs.open(path, O_CREATE|O_RDONLY|O_EXCL, S_IFCHR|mode)
-       if err != nil {
-               return err
-       }
-       ip := f.(*fsysFile).inode
-       ip.Rdev = int64(len(fs.dev))
-       fs.dev = append(fs.dev, open)
-       return nil
-}
-
-type nullFile struct{}
-
-func openNull() (devFile, error)                               { return &nullFile{}, nil }
-func (f *nullFile) close() error                               { return nil }
-func (f *nullFile) pread(b []byte, offset int64) (int, error)  { return 0, nil }
-func (f *nullFile) pwrite(b []byte, offset int64) (int, error) { return len(b), nil }
-
-type zeroFile struct{}
-
-func openZero() (devFile, error)                               { return &zeroFile{}, nil }
-func (f *zeroFile) close() error                               { return nil }
-func (f *zeroFile) pwrite(b []byte, offset int64) (int, error) { return len(b), nil }
-
-func (f *zeroFile) pread(b []byte, offset int64) (int, error) {
-       for i := range b {
-               b[i] = 0
-       }
-       return len(b), nil
-}
-
-type randomFile struct{}
-
-func openRandom() (devFile, error) {
-       return randomFile{}, nil
-}
-
-func (f randomFile) close() error {
-       return nil
-}
-
-func (f randomFile) pread(b []byte, offset int64) (int, error) {
-       if err := naclGetRandomBytes(b); err != nil {
-               return 0, err
-       }
-       return len(b), nil
-}
-
-func (f randomFile) pwrite(b []byte, offset int64) (int, error) {
-       return 0, EPERM
-}
-
-func fdToFsysFile(fd int) (*fsysFile, error) {
-       f, err := fdToFile(fd)
-       if err != nil {
-               return nil, err
-       }
-       impl := f.impl
-       fsysf, ok := impl.(*fsysFile)
-       if !ok {
-               return nil, EINVAL
-       }
-       return fsysf, nil
-}
-
-// create creates a file in the file system with the given name, mode, time, and data.
-// It is meant to be called when initializing the file system image.
-func create(name string, mode uint32, sec int64, data []byte) error {
-       fs.mu.Lock()
-       defer fs.mu.Unlock()
-       f, err := fs.open(name, O_CREATE|O_EXCL, mode)
-       if err != nil {
-               if mode&S_IFMT == S_IFDIR {
-                       ip, _, err := fs.namei(name, false)
-                       if err == nil && (ip.Mode&S_IFMT) == S_IFDIR {
-                               return nil // directory already exists
-                       }
-               }
-               return err
-       }
-       ip := f.(*fsysFile).inode
-       ip.Atime = sec
-       ip.Mtime = sec
-       ip.Ctime = sec
-       if len(data) > 0 {
-               ip.Size = int64(len(data))
-               ip.data = data
-       }
-       return nil
-}
index 62399676649b3dbc9d8f3bbe86bded3e5de1edc2..74bce4a6270e616016d7df0364a93d270f3021a5 100755 (executable)
@@ -265,12 +265,6 @@ linux_s390x)
        mksysnum="./mksysnum_linux.pl $unistd_h"
        mktypes="GOARCH=$GOARCH go tool cgo -godefs"
        ;;
-nacl_386)
-       mkerrors=""
-       mksyscall="./mksyscall.pl -l32 -nacl"
-       mksysnum=""
-       mktypes=""
-       ;;
 nacl_amd64p32)
        mkerrors=""
        mksyscall="./mksyscall.pl -nacl"
index d5bf1f4f99332a50943c01cf06386e10d7e14e18..25f171bda870a5c0c1815ac1d50034cb674906bd 100644 (file)
@@ -42,7 +42,7 @@ const (
 const (
        _ = iota
        F_DUPFD_CLOEXEC
-       SYS_FCNTL = 500 // unsupported; same value as net_nacl.go
+       SYS_FCNTL = 500 // unsupported
 )
 
 type Sockaddr interface {
diff --git a/src/syscall/net_nacl.go b/src/syscall/net_nacl.go
deleted file mode 100644 (file)
index 409a7a4..0000000
+++ /dev/null
@@ -1,973 +0,0 @@
-// Copyright 2013 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.
-
-// A simulated network for use within NaCl.
-// The simulation is not particularly tied to NaCl,
-// but other systems have real networks.
-
-// All int64 times are UnixNanos.
-
-package syscall
-
-import (
-       "sync"
-       "sync/atomic"
-)
-
-// Interface to timers implemented in package runtime.
-// Must be in sync with ../runtime/time.go:/^type timer
-// Really for use by package time, but we cannot import time here.
-
-type runtimeTimer struct {
-       tb uintptr
-       i  int
-
-       when   int64
-       period int64
-       f      func(interface{}, uintptr) // NOTE: must not be closure
-       arg    interface{}
-       seq    uintptr
-}
-
-func startTimer(*runtimeTimer)
-func stopTimer(*runtimeTimer) bool
-
-type timer struct {
-       expired bool
-       q       *queue
-       r       runtimeTimer
-}
-
-func (t *timer) start(q *queue, deadline int64) {
-       if deadline == 0 {
-               return
-       }
-       t.q = q
-       t.r.when = deadline
-       t.r.f = timerExpired
-       t.r.arg = t
-       startTimer(&t.r)
-}
-
-func (t *timer) stop() {
-       if t.r.f == nil {
-               return
-       }
-       stopTimer(&t.r)
-}
-
-func (t *timer) reset(q *queue, deadline int64) {
-       t.stop()
-       if deadline == 0 {
-               return
-       }
-       if t.r.f == nil {
-               t.q = q
-               t.r.f = timerExpired
-               t.r.arg = t
-       }
-       t.r.when = deadline
-       startTimer(&t.r)
-}
-
-func timerExpired(i interface{}, seq uintptr) {
-       t := i.(*timer)
-       go func() {
-               t.q.Lock()
-               defer t.q.Unlock()
-               t.expired = true
-               t.q.canRead.Broadcast()
-               t.q.canWrite.Broadcast()
-       }()
-}
-
-// Network constants and data structures. These match the traditional values.
-
-const (
-       AF_UNSPEC = iota
-       AF_UNIX
-       AF_INET
-       AF_INET6
-)
-
-const (
-       SHUT_RD = iota
-       SHUT_WR
-       SHUT_RDWR
-)
-
-const (
-       SOCK_STREAM = 1 + iota
-       SOCK_DGRAM
-       SOCK_RAW
-       SOCK_SEQPACKET
-)
-
-const (
-       IPPROTO_IP   = 0
-       IPPROTO_IPV4 = 4
-       IPPROTO_IPV6 = 0x29
-       IPPROTO_TCP  = 6
-       IPPROTO_UDP  = 0x11
-)
-
-// Misc constants expected by package net but not supported.
-const (
-       _ = iota
-       SOL_SOCKET
-       SO_TYPE
-       NET_RT_IFLIST
-       IFNAMSIZ
-       IFF_UP
-       IFF_BROADCAST
-       IFF_LOOPBACK
-       IFF_POINTOPOINT
-       IFF_MULTICAST
-       IPV6_V6ONLY
-       SOMAXCONN
-       F_DUPFD_CLOEXEC
-       SO_BROADCAST
-       SO_REUSEADDR
-       SO_REUSEPORT
-       SO_RCVBUF
-       SO_SNDBUF
-       SO_KEEPALIVE
-       SO_LINGER
-       SO_ERROR
-       IP_PORTRANGE
-       IP_PORTRANGE_DEFAULT
-       IP_PORTRANGE_LOW
-       IP_PORTRANGE_HIGH
-       IP_MULTICAST_IF
-       IP_MULTICAST_LOOP
-       IP_ADD_MEMBERSHIP
-       IPV6_PORTRANGE
-       IPV6_PORTRANGE_DEFAULT
-       IPV6_PORTRANGE_LOW
-       IPV6_PORTRANGE_HIGH
-       IPV6_MULTICAST_IF
-       IPV6_MULTICAST_LOOP
-       IPV6_JOIN_GROUP
-       TCP_NODELAY
-       TCP_KEEPINTVL
-       TCP_KEEPIDLE
-
-       SYS_FCNTL = 500 // unsupported
-)
-
-var SocketDisableIPv6 bool
-
-// A Sockaddr is one of the SockaddrXxx structs.
-type Sockaddr interface {
-       // copy returns a copy of the underlying data.
-       copy() Sockaddr
-
-       // key returns the value of the underlying data,
-       // for comparison as a map key.
-       key() interface{}
-}
-
-type SockaddrInet4 struct {
-       Port int
-       Addr [4]byte
-}
-
-func (sa *SockaddrInet4) copy() Sockaddr {
-       sa1 := *sa
-       return &sa1
-}
-
-func (sa *SockaddrInet4) key() interface{} { return *sa }
-
-func isIPv4Localhost(sa Sockaddr) bool {
-       sa4, ok := sa.(*SockaddrInet4)
-       return ok && sa4.Addr == [4]byte{127, 0, 0, 1}
-}
-
-type SockaddrInet6 struct {
-       Port   int
-       ZoneId uint32
-       Addr   [16]byte
-}
-
-func (sa *SockaddrInet6) copy() Sockaddr {
-       sa1 := *sa
-       return &sa1
-}
-
-func (sa *SockaddrInet6) key() interface{} { return *sa }
-
-type SockaddrUnix struct {
-       Name string
-}
-
-func (sa *SockaddrUnix) copy() Sockaddr {
-       sa1 := *sa
-       return &sa1
-}
-
-func (sa *SockaddrUnix) key() interface{} { return *sa }
-
-type SockaddrDatalink struct {
-       Len    uint8
-       Family uint8
-       Index  uint16
-       Type   uint8
-       Nlen   uint8
-       Alen   uint8
-       Slen   uint8
-       Data   [12]int8
-}
-
-func (sa *SockaddrDatalink) copy() Sockaddr {
-       sa1 := *sa
-       return &sa1
-}
-
-func (sa *SockaddrDatalink) key() interface{} { return *sa }
-
-// RoutingMessage represents a routing message.
-type RoutingMessage interface {
-       unimplemented()
-}
-
-type IPMreq struct {
-       Multiaddr [4]byte /* in_addr */
-       Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
-       Multiaddr [16]byte /* in6_addr */
-       Interface uint32
-}
-
-type Linger struct {
-       Onoff  int32
-       Linger int32
-}
-
-type ICMPv6Filter struct {
-       Filt [8]uint32
-}
-
-// A queue is the bookkeeping for a synchronized buffered queue.
-// We do not use channels because we need to be able to handle
-// writes after and during close, and because a chan byte would
-// require too many send and receive operations in real use.
-type queue struct {
-       sync.Mutex
-       canRead  sync.Cond
-       canWrite sync.Cond
-       rtimer   *timer // non-nil if in read
-       wtimer   *timer // non-nil if in write
-       r        int    // total read index
-       w        int    // total write index
-       m        int    // index mask
-       closed   bool
-}
-
-func (q *queue) init(size int) {
-       if size&(size-1) != 0 {
-               panic("invalid queue size - must be power of two")
-       }
-       q.canRead.L = &q.Mutex
-       q.canWrite.L = &q.Mutex
-       q.m = size - 1
-}
-
-func past(deadline int64) bool {
-       sec, nsec := now()
-       return deadline > 0 && deadline < sec*1e9+int64(nsec)
-}
-
-func (q *queue) waitRead(n int, deadline int64) (int, error) {
-       if past(deadline) {
-               return 0, EAGAIN
-       }
-       var t timer
-       t.start(q, deadline)
-       q.rtimer = &t
-       for q.w-q.r == 0 && !q.closed && !t.expired {
-               q.canRead.Wait()
-       }
-       q.rtimer = nil
-       t.stop()
-       m := q.w - q.r
-       if m == 0 && t.expired {
-               return 0, EAGAIN
-       }
-       if m > n {
-               m = n
-               q.canRead.Signal() // wake up next reader too
-       }
-       q.canWrite.Signal()
-       return m, nil
-}
-
-func (q *queue) waitWrite(n int, deadline int64) (int, error) {
-       if past(deadline) {
-               return 0, EAGAIN
-       }
-       var t timer
-       t.start(q, deadline)
-       q.wtimer = &t
-       for q.w-q.r > q.m && !q.closed && !t.expired {
-               q.canWrite.Wait()
-       }
-       q.wtimer = nil
-       t.stop()
-       m := q.m + 1 - (q.w - q.r)
-       if m == 0 && t.expired {
-               return 0, EAGAIN
-       }
-       if m == 0 {
-               return 0, EAGAIN
-       }
-       if m > n {
-               m = n
-               q.canWrite.Signal() // wake up next writer too
-       }
-       q.canRead.Signal()
-       return m, nil
-}
-
-func (q *queue) close() {
-       q.Lock()
-       defer q.Unlock()
-       q.closed = true
-       q.canRead.Broadcast()
-       q.canWrite.Broadcast()
-}
-
-// A byteq is a byte queue.
-type byteq struct {
-       queue
-       data []byte
-}
-
-func newByteq() *byteq {
-       q := &byteq{
-               data: make([]byte, 4096),
-       }
-       q.init(len(q.data))
-       return q
-}
-
-func (q *byteq) read(b []byte, deadline int64) (int, error) {
-       q.Lock()
-       defer q.Unlock()
-       n, err := q.waitRead(len(b), deadline)
-       if err != nil {
-               return 0, err
-       }
-       b = b[:n]
-       for len(b) > 0 {
-               m := copy(b, q.data[q.r&q.m:])
-               q.r += m
-               b = b[m:]
-       }
-       return n, nil
-}
-
-func (q *byteq) write(b []byte, deadline int64) (n int, err error) {
-       q.Lock()
-       defer q.Unlock()
-       for n < len(b) {
-               nn, err := q.waitWrite(len(b[n:]), deadline)
-               if err != nil {
-                       return n, err
-               }
-               bb := b[n : n+nn]
-               n += nn
-               for len(bb) > 0 {
-                       m := copy(q.data[q.w&q.m:], bb)
-                       q.w += m
-                       bb = bb[m:]
-               }
-       }
-       return n, nil
-}
-
-// A msgq is a queue of messages.
-type msgq struct {
-       queue
-       data []interface{}
-}
-
-func newMsgq() *msgq {
-       q := &msgq{
-               data: make([]interface{}, 32),
-       }
-       q.init(len(q.data))
-       return q
-}
-
-func (q *msgq) read(deadline int64) (interface{}, error) {
-       q.Lock()
-       defer q.Unlock()
-       n, err := q.waitRead(1, deadline)
-       if err != nil {
-               return nil, err
-       }
-       if n == 0 {
-               return nil, nil
-       }
-       m := q.data[q.r&q.m]
-       q.r++
-       return m, nil
-}
-
-func (q *msgq) write(m interface{}, deadline int64) error {
-       q.Lock()
-       defer q.Unlock()
-       _, err := q.waitWrite(1, deadline)
-       if err != nil {
-               return err
-       }
-       q.data[q.w&q.m] = m
-       q.w++
-       return nil
-}
-
-// An addr is a sequence of bytes uniquely identifying a network address.
-// It is not human-readable.
-type addr string
-
-// A conn is one side of a stream-based network connection.
-// That is, a stream-based network connection is a pair of cross-connected conns.
-type conn struct {
-       rd     *byteq
-       wr     *byteq
-       local  addr
-       remote addr
-}
-
-// A pktconn is one side of a packet-based network connection.
-// That is, a packet-based network connection is a pair of cross-connected pktconns.
-type pktconn struct {
-       rd     *msgq
-       wr     *msgq
-       local  addr
-       remote addr
-}
-
-// A listener accepts incoming stream-based network connections.
-type listener struct {
-       rd    *msgq
-       local addr
-}
-
-// A netFile is an open network file.
-type netFile struct {
-       defaultFileImpl
-       proto      *netproto
-       sotype     int
-       listener   *msgq
-       packet     *msgq
-       rd         *byteq
-       wr         *byteq
-       rddeadline int64
-       wrdeadline int64
-       addr       Sockaddr
-       raddr      Sockaddr
-}
-
-// A netAddr is a network address in the global listener map.
-// All the fields must have defined == operations.
-type netAddr struct {
-       proto  *netproto
-       sotype int
-       addr   interface{}
-}
-
-// net records the state of the network.
-// It maps a network address to the listener on that address.
-var net = struct {
-       sync.Mutex
-       listener map[netAddr]*netFile
-}{
-       listener: make(map[netAddr]*netFile),
-}
-
-// TODO(rsc): Some day, do a better job with port allocation.
-// For playground programs, incrementing is fine.
-var nextport = 2
-
-// A netproto contains protocol-specific functionality
-// (one for AF_INET, one for AF_INET6 and so on).
-// It is a struct instead of an interface because the
-// implementation needs no state, and I expect to
-// add some data fields at some point.
-type netproto struct {
-       bind func(*netFile, Sockaddr) error
-}
-
-var netprotoAF_INET = &netproto{
-       bind: func(f *netFile, sa Sockaddr) error {
-               if sa == nil {
-                       f.addr = &SockaddrInet4{
-                               Port: nextport,
-                               Addr: [4]byte{127, 0, 0, 1},
-                       }
-                       nextport++
-                       return nil
-               }
-               addr, ok := sa.(*SockaddrInet4)
-               if !ok {
-                       return EINVAL
-               }
-               addr = addr.copy().(*SockaddrInet4)
-               if addr.Port == 0 {
-                       addr.Port = nextport
-                       nextport++
-               }
-               f.addr = addr
-               return nil
-       },
-}
-
-var netprotos = map[int]*netproto{
-       AF_INET: netprotoAF_INET,
-}
-
-// These functions implement the usual BSD socket operations.
-
-func (f *netFile) bind(sa Sockaddr) error {
-       if f.addr != nil {
-               return EISCONN
-       }
-       if err := f.proto.bind(f, sa); err != nil {
-               return err
-       }
-       if f.sotype == SOCK_DGRAM {
-               _, ok := net.listener[netAddr{f.proto, f.sotype, f.addr.key()}]
-               if ok {
-                       f.addr = nil
-                       return EADDRINUSE
-               }
-               net.listener[netAddr{f.proto, f.sotype, f.addr.key()}] = f
-               f.packet = newMsgq()
-       }
-       return nil
-}
-
-func (f *netFile) listen(backlog int) error {
-       net.Lock()
-       defer net.Unlock()
-       if f.listener != nil {
-               return EINVAL
-       }
-       old, ok := net.listener[netAddr{f.proto, f.sotype, f.addr.key()}]
-       if ok && !old.listenerClosed() {
-               return EADDRINUSE
-       }
-       net.listener[netAddr{f.proto, f.sotype, f.addr.key()}] = f
-       f.listener = newMsgq()
-       return nil
-}
-
-func (f *netFile) accept() (fd int, sa Sockaddr, err error) {
-       msg, err := f.listener.read(f.readDeadline())
-       if err != nil {
-               return -1, nil, err
-       }
-       newf, ok := msg.(*netFile)
-       if !ok {
-               // must be eof
-               return -1, nil, EAGAIN
-       }
-       return newFD(newf), newf.raddr.copy(), nil
-}
-
-func (f *netFile) connect(sa Sockaddr) error {
-       if past(f.writeDeadline()) {
-               return EAGAIN
-       }
-       if f.addr == nil {
-               if err := f.bind(nil); err != nil {
-                       return err
-               }
-       }
-       net.Lock()
-       if sa == nil {
-               net.Unlock()
-               return EINVAL
-       }
-       sa = sa.copy()
-       if f.raddr != nil {
-               net.Unlock()
-               return EISCONN
-       }
-       if f.sotype == SOCK_DGRAM {
-               net.Unlock()
-               f.raddr = sa
-               return nil
-       }
-       if f.listener != nil {
-               net.Unlock()
-               return EISCONN
-       }
-       l, ok := net.listener[netAddr{f.proto, f.sotype, sa.key()}]
-       if !ok {
-               // If we're dialing 127.0.0.1 but found nothing, try
-               // 0.0.0.0 also. (Issue 20611)
-               if isIPv4Localhost(sa) {
-                       sa = &SockaddrInet4{Port: sa.(*SockaddrInet4).Port}
-                       l, ok = net.listener[netAddr{f.proto, f.sotype, sa.key()}]
-               }
-       }
-       if !ok || l.listenerClosed() {
-               net.Unlock()
-               return ECONNREFUSED
-       }
-       f.raddr = sa
-       f.rd = newByteq()
-       f.wr = newByteq()
-       newf := &netFile{
-               proto:  f.proto,
-               sotype: f.sotype,
-               addr:   f.raddr,
-               raddr:  f.addr,
-               rd:     f.wr,
-               wr:     f.rd,
-       }
-       net.Unlock()
-       l.listener.write(newf, f.writeDeadline())
-       return nil
-}
-
-func (f *netFile) read(b []byte) (int, error) {
-       if f.rd == nil {
-               if f.raddr != nil {
-                       n, _, err := f.recvfrom(b, 0)
-                       return n, err
-               }
-               return 0, ENOTCONN
-       }
-       return f.rd.read(b, f.readDeadline())
-}
-
-func (f *netFile) write(b []byte) (int, error) {
-       if f.wr == nil {
-               if f.raddr != nil {
-                       err := f.sendto(b, 0, f.raddr)
-                       var n int
-                       if err == nil {
-                               n = len(b)
-                       }
-                       return n, err
-               }
-               return 0, ENOTCONN
-       }
-       return f.wr.write(b, f.writeDeadline())
-}
-
-type pktmsg struct {
-       buf  []byte
-       addr Sockaddr
-}
-
-func (f *netFile) recvfrom(p []byte, flags int) (n int, from Sockaddr, err error) {
-       if f.sotype != SOCK_DGRAM {
-               return 0, nil, EINVAL
-       }
-       if f.packet == nil {
-               return 0, nil, ENOTCONN
-       }
-       msg1, err := f.packet.read(f.readDeadline())
-       if err != nil {
-               return 0, nil, err
-       }
-       msg, ok := msg1.(*pktmsg)
-       if !ok {
-               return 0, nil, EAGAIN
-       }
-       return copy(p, msg.buf), msg.addr, nil
-}
-
-func (f *netFile) sendto(p []byte, flags int, to Sockaddr) error {
-       if f.sotype != SOCK_DGRAM {
-               return EINVAL
-       }
-       if f.packet == nil {
-               if err := f.bind(nil); err != nil {
-                       return err
-               }
-       }
-       net.Lock()
-       if to == nil {
-               net.Unlock()
-               return EINVAL
-       }
-       to = to.copy()
-       l, ok := net.listener[netAddr{f.proto, f.sotype, to.key()}]
-       if !ok || l.packet == nil {
-               net.Unlock()
-               return ECONNREFUSED
-       }
-       net.Unlock()
-       msg := &pktmsg{
-               buf:  make([]byte, len(p)),
-               addr: f.addr,
-       }
-       copy(msg.buf, p)
-       l.packet.write(msg, f.writeDeadline())
-       return nil
-}
-
-func (f *netFile) listenerClosed() bool {
-       f.listener.Lock()
-       defer f.listener.Unlock()
-       return f.listener.closed
-}
-
-func (f *netFile) close() error {
-       if f.listener != nil {
-               f.listener.close()
-       }
-       if f.packet != nil {
-               f.packet.close()
-       }
-       if f.rd != nil {
-               f.rd.close()
-       }
-       if f.wr != nil {
-               f.wr.close()
-       }
-       return nil
-}
-
-func fdToNetFile(fd int) (*netFile, error) {
-       f, err := fdToFile(fd)
-       if err != nil {
-               return nil, err
-       }
-       impl := f.impl
-       netf, ok := impl.(*netFile)
-       if !ok {
-               return nil, EINVAL
-       }
-       return netf, nil
-}
-
-func Socket(proto, sotype, unused int) (fd int, err error) {
-       p := netprotos[proto]
-       if p == nil {
-               return -1, EPROTONOSUPPORT
-       }
-       if sotype != SOCK_STREAM && sotype != SOCK_DGRAM {
-               return -1, ESOCKTNOSUPPORT
-       }
-       f := &netFile{
-               proto:  p,
-               sotype: sotype,
-       }
-       return newFD(f), nil
-}
-
-func Bind(fd int, sa Sockaddr) error {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return err
-       }
-       return f.bind(sa)
-}
-
-func StopIO(fd int) error {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return err
-       }
-       f.close()
-       return nil
-}
-
-func Listen(fd int, backlog int) error {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return err
-       }
-       return f.listen(backlog)
-}
-
-func Accept(fd int) (newfd int, sa Sockaddr, err error) {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return 0, nil, err
-       }
-       return f.accept()
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return nil, err
-       }
-       if f.addr == nil {
-               return nil, ENOTCONN
-       }
-       return f.addr.copy(), nil
-}
-
-func Getpeername(fd int) (sa Sockaddr, err error) {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return nil, err
-       }
-       if f.raddr == nil {
-               return nil, ENOTCONN
-       }
-       return f.raddr.copy(), nil
-}
-
-func Connect(fd int, sa Sockaddr) error {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return err
-       }
-       return f.connect(sa)
-}
-
-func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return 0, nil, err
-       }
-       return f.recvfrom(p, flags)
-}
-
-func Sendto(fd int, p []byte, flags int, to Sockaddr) error {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return err
-       }
-       return f.sendto(p, flags, to)
-}
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn, recvflags int, from Sockaddr, err error) {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return
-       }
-       n, from, err = f.recvfrom(p, flags)
-       return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) error {
-       _, err := SendmsgN(fd, p, oob, to, flags)
-       return err
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return 0, err
-       }
-       switch f.sotype {
-       case SOCK_STREAM:
-               n, err = f.write(p)
-       case SOCK_DGRAM:
-               n = len(p)
-               err = f.sendto(p, flags, to)
-       }
-       if err != nil {
-               return 0, err
-       }
-       return n, nil
-}
-
-func GetsockoptInt(fd, level, opt int) (value int, err error) {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return 0, err
-       }
-       switch {
-       case level == SOL_SOCKET && opt == SO_TYPE:
-               return f.sotype, nil
-       }
-       return 0, ENOTSUP
-}
-
-func SetsockoptInt(fd, level, opt int, value int) error {
-       return nil
-}
-
-func SetsockoptByte(fd, level, opt int, value byte) error {
-       _, err := fdToNetFile(fd)
-       if err != nil {
-               return err
-       }
-       return ENOTSUP
-}
-
-func SetsockoptLinger(fd, level, opt int, l *Linger) error {
-       return nil
-}
-
-func SetReadDeadline(fd int, t int64) error {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return err
-       }
-       atomic.StoreInt64(&f.rddeadline, t)
-       if bq := f.rd; bq != nil {
-               bq.Lock()
-               if timer := bq.rtimer; timer != nil {
-                       timer.reset(&bq.queue, t)
-               }
-               bq.Unlock()
-       }
-       return nil
-}
-
-func (f *netFile) readDeadline() int64 {
-       return atomic.LoadInt64(&f.rddeadline)
-}
-
-func SetWriteDeadline(fd int, t int64) error {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return err
-       }
-       atomic.StoreInt64(&f.wrdeadline, t)
-       if bq := f.wr; bq != nil {
-               bq.Lock()
-               if timer := bq.wtimer; timer != nil {
-                       timer.reset(&bq.queue, t)
-               }
-               bq.Unlock()
-       }
-       return nil
-}
-
-func (f *netFile) writeDeadline() int64 {
-       return atomic.LoadInt64(&f.wrdeadline)
-}
-
-func Shutdown(fd int, how int) error {
-       f, err := fdToNetFile(fd)
-       if err != nil {
-               return err
-       }
-       switch how {
-       case SHUT_RD:
-               f.rd.close()
-       case SHUT_WR:
-               f.wr.close()
-       case SHUT_RDWR:
-               f.rd.close()
-               f.wr.close()
-       }
-       return nil
-}
-
-func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error { panic("SetsockoptICMPv") }
-func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) error               { panic("SetsockoptIPMreq") }
-func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) error           { panic("SetsockoptIPv") }
-func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) error           { panic("SetsockoptInet") }
-func SetsockoptString(fd, level, opt int, s string) error                   { panic("SetsockoptString") }
-func SetsockoptTimeval(fd, level, opt int, tv *Timeval) error               { panic("SetsockoptTimeval") }
-func Socketpair(domain, typ, proto int) (fd [2]int, err error)              { panic("Socketpair") }
-
-func SetNonblock(fd int, nonblocking bool) error { return nil }
diff --git a/src/syscall/syscall_nacl.go b/src/syscall/syscall_nacl.go
deleted file mode 100644 (file)
index c784d37..0000000
+++ /dev/null
@@ -1,318 +0,0 @@
-// Copyright 2013 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 syscall
-
-import (
-       "internal/oserror"
-       "sync"
-       "unsafe"
-)
-
-//sys  naclClose(fd int) (err error) = sys_close
-//sys  naclFstat(fd int, stat *Stat_t) (err error) = sys_fstat
-//sys  naclRead(fd int, b []byte) (n int, err error) = sys_read
-//sys  naclSeek(fd int, off *int64, whence int) (err error) = sys_lseek
-//sys  naclGetRandomBytes(b []byte) (err error) = sys_get_random_bytes
-
-const direntSize = 8 + 8 + 2 + 256
-
-// native_client/src/trusted/service_runtime/include/sys/dirent.h
-type Dirent struct {
-       Ino    int64
-       Off    int64
-       Reclen uint16
-       Name   [256]byte
-}
-
-func direntIno(buf []byte) (uint64, bool) {
-       return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
-}
-
-func direntReclen(buf []byte) (uint64, bool) {
-       return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
-}
-
-func direntNamlen(buf []byte) (uint64, bool) {
-       reclen, ok := direntReclen(buf)
-       if !ok {
-               return 0, false
-       }
-       return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
-}
-
-const PathMax = 256
-
-// An Errno is an unsigned number describing an error condition.
-// It implements the error interface. The zero Errno is by convention
-// a non-error, so code to convert from Errno to error should use:
-//     err = nil
-//     if errno != 0 {
-//             err = errno
-//     }
-//
-// Errno values can be tested against error values from the os package
-// using errors.Is. For example:
-//
-//     _, _, err := syscall.Syscall(...)
-//     if errors.Is(err, os.ErrNotExist) ...
-type Errno uintptr
-
-func (e Errno) Error() string {
-       if 0 <= int(e) && int(e) < len(errorstr) {
-               s := errorstr[e]
-               if s != "" {
-                       return s
-               }
-       }
-       return "errno " + itoa(int(e))
-}
-
-func (e Errno) Is(target error) bool {
-       switch target {
-       case oserror.ErrPermission:
-               return e == EACCES || e == EPERM
-       case oserror.ErrExist:
-               return e == EEXIST || e == ENOTEMPTY
-       case oserror.ErrNotExist:
-               return e == ENOENT
-       }
-       return false
-}
-
-func (e Errno) Temporary() bool {
-       return e == EINTR || e == EMFILE || e.Timeout()
-}
-
-func (e Errno) Timeout() bool {
-       return e == EAGAIN || e == EWOULDBLOCK || e == ETIMEDOUT
-}
-
-// A Signal is a number describing a process signal.
-// It implements the os.Signal interface.
-type Signal int
-
-const (
-       _ Signal = iota
-       SIGCHLD
-       SIGINT
-       SIGKILL
-       SIGTRAP
-       SIGQUIT
-)
-
-func (s Signal) Signal() {}
-
-func (s Signal) String() string {
-       if 0 <= s && int(s) < len(signals) {
-               str := signals[s]
-               if str != "" {
-                       return str
-               }
-       }
-       return "signal " + itoa(int(s))
-}
-
-var signals = [...]string{}
-
-// File system
-
-const (
-       Stdin  = 0
-       Stdout = 1
-       Stderr = 2
-)
-
-// native_client/src/trusted/service_runtime/include/sys/fcntl.h
-const (
-       O_RDONLY  = 0
-       O_WRONLY  = 1
-       O_RDWR    = 2
-       O_ACCMODE = 3
-
-       O_CREAT    = 0100
-       O_CREATE   = O_CREAT // for ken
-       O_TRUNC    = 01000
-       O_APPEND   = 02000
-       O_EXCL     = 0200
-       O_NONBLOCK = 04000
-       O_NDELAY   = O_NONBLOCK
-       O_SYNC     = 010000
-       O_FSYNC    = O_SYNC
-       O_ASYNC    = 020000
-
-       O_CLOEXEC = 0
-
-       FD_CLOEXEC = 1
-)
-
-// native_client/src/trusted/service_runtime/include/sys/fcntl.h
-const (
-       F_DUPFD   = 0
-       F_GETFD   = 1
-       F_SETFD   = 2
-       F_GETFL   = 3
-       F_SETFL   = 4
-       F_GETOWN  = 5
-       F_SETOWN  = 6
-       F_GETLK   = 7
-       F_SETLK   = 8
-       F_SETLKW  = 9
-       F_RGETLK  = 10
-       F_RSETLK  = 11
-       F_CNVT    = 12
-       F_RSETLKW = 13
-
-       F_RDLCK   = 1
-       F_WRLCK   = 2
-       F_UNLCK   = 3
-       F_UNLKSYS = 4
-)
-
-// native_client/src/trusted/service_runtime/include/bits/stat.h
-const (
-       S_IFMT        = 0000370000
-       S_IFSHM_SYSV  = 0000300000
-       S_IFSEMA      = 0000270000
-       S_IFCOND      = 0000260000
-       S_IFMUTEX     = 0000250000
-       S_IFSHM       = 0000240000
-       S_IFBOUNDSOCK = 0000230000
-       S_IFSOCKADDR  = 0000220000
-       S_IFDSOCK     = 0000210000
-
-       S_IFSOCK = 0000140000
-       S_IFLNK  = 0000120000
-       S_IFREG  = 0000100000
-       S_IFBLK  = 0000060000
-       S_IFDIR  = 0000040000
-       S_IFCHR  = 0000020000
-       S_IFIFO  = 0000010000
-
-       S_UNSUP = 0000370000
-
-       S_ISUID = 0004000
-       S_ISGID = 0002000
-       S_ISVTX = 0001000
-
-       S_IREAD  = 0400
-       S_IWRITE = 0200
-       S_IEXEC  = 0100
-
-       S_IRWXU = 0700
-       S_IRUSR = 0400
-       S_IWUSR = 0200
-       S_IXUSR = 0100
-
-       S_IRWXG = 070
-       S_IRGRP = 040
-       S_IWGRP = 020
-       S_IXGRP = 010
-
-       S_IRWXO = 07
-       S_IROTH = 04
-       S_IWOTH = 02
-       S_IXOTH = 01
-)
-
-// native_client/src/trusted/service_runtime/include/sys/stat.h
-// native_client/src/trusted/service_runtime/include/machine/_types.h
-type Stat_t struct {
-       Dev       int64
-       Ino       uint64
-       Mode      uint32
-       Nlink     uint32
-       Uid       uint32
-       Gid       uint32
-       Rdev      int64
-       Size      int64
-       Blksize   int32
-       Blocks    int32
-       Atime     int64
-       AtimeNsec int64
-       Mtime     int64
-       MtimeNsec int64
-       Ctime     int64
-       CtimeNsec int64
-}
-
-// Processes
-// Not supported on NaCl - just enough for package os.
-
-var ForkLock sync.RWMutex
-
-type WaitStatus uint32
-
-func (w WaitStatus) Exited() bool       { return false }
-func (w WaitStatus) ExitStatus() int    { return 0 }
-func (w WaitStatus) Signaled() bool     { return false }
-func (w WaitStatus) Signal() Signal     { return 0 }
-func (w WaitStatus) CoreDump() bool     { return false }
-func (w WaitStatus) Stopped() bool      { return false }
-func (w WaitStatus) Continued() bool    { return false }
-func (w WaitStatus) StopSignal() Signal { return 0 }
-func (w WaitStatus) TrapCause() int     { return 0 }
-
-// XXX made up
-type Rusage struct {
-       Utime Timeval
-       Stime Timeval
-}
-
-// XXX made up
-type ProcAttr struct {
-       Dir   string
-       Env   []string
-       Files []uintptr
-       Sys   *SysProcAttr
-}
-
-type SysProcAttr struct {
-}
-
-// System
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) { return 0, 0, ENOSYS }
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)           { return 0, 0, ENOSYS }
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) {
-       return 0, 0, ENOSYS
-}
-
-func Sysctl(key string) (string, error) {
-       if key == "kern.hostname" {
-               return "naclbox", nil
-       }
-       return "", ENOSYS
-}
-
-// Unimplemented Unix midden heap.
-
-const ImplementsGetwd = false
-
-func Getwd() (wd string, err error)     { return "", ENOSYS }
-func Getegid() int                      { return 1 }
-func Geteuid() int                      { return 1 }
-func Getgid() int                       { return 1 }
-func Getgroups() ([]int, error)         { return []int{1}, nil }
-func Getppid() int                      { return 2 }
-func Getpid() int                       { return 3 }
-func Gettimeofday(tv *Timeval) error    { return ENOSYS }
-func Getuid() int                       { return 1 }
-func Kill(pid int, signum Signal) error { return ENOSYS }
-func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-       return 0, ENOSYS
-}
-func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle uintptr, err error) {
-       return 0, 0, ENOSYS
-}
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
-       return 0, ENOSYS
-}
-func RouteRIB(facility, param int) ([]byte, error)                { return nil, ENOSYS }
-func ParseRoutingMessage(b []byte) ([]RoutingMessage, error)      { return nil, ENOSYS }
-func ParseRoutingSockaddr(msg RoutingMessage) ([]Sockaddr, error) { return nil, ENOSYS }
-func SysctlUint32(name string) (value uint32, err error)          { return 0, ENOSYS }
-
-type Iovec struct{} // dummy
diff --git a/src/syscall/syscall_nacl_386.go b/src/syscall/syscall_nacl_386.go
deleted file mode 100644 (file)
index 39112eb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 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 syscall
-
-type Timespec struct {
-       Sec  int64
-       Nsec int32
-}
-
-type Timeval struct {
-       Sec  int64
-       Usec int32
-}
-
-func setTimespec(sec, nsec int64) Timespec {
-       return Timespec{Sec: sec, Nsec: int32(nsec)}
-}
-
-func setTimeval(sec, usec int64) Timeval {
-       return Timeval{Sec: sec, Usec: int32(usec)}
-}
diff --git a/src/syscall/syscall_nacl_arm.go b/src/syscall/syscall_nacl_arm.go
deleted file mode 100644 (file)
index dec97b5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 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 syscall
-
-type Timespec struct {
-       Sec  int64
-       Nsec int32
-}
-
-type Timeval struct {
-       Sec  int64
-       Usec int32
-}
-
-func setTimespec(sec, nsec int64) Timespec {
-       return Timespec{Sec: sec, Nsec: int32(nsec)}
-}
-
-func setTimeval(sec, usec int64) Timeval {
-       return Timeval{Sec: sec, Usec: int32(usec)}
-}
index 2a9d90e64c646314c631aa9590a1dc56da235f26..5390f8aace996bbe364c39fa7891371925d143bb 100644 (file)
@@ -62,7 +62,7 @@ func TestExecErrPermutedFds(t *testing.T) {
 }
 
 func TestGettimeofday(t *testing.T) {
-       if runtime.GOOS == "nacl" || runtime.GOOS == "js" {
+       if runtime.GOOS == "js" {
                t.Skip("not implemented on " + runtime.GOOS)
        }
        tv := &syscall.Timeval{}
similarity index 99%
rename from src/syscall/tables_nacljs.go
rename to src/syscall/tables_js.go
index 1c265f25c7abcbeacb83ce7e4304226aaf15d37e..806fa104159897f5e12017ff25a61e2419819d2d 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build nacl js,wasm
+// +build js,wasm
 
 package syscall
 
diff --git a/src/syscall/time_nacl_386.s b/src/syscall/time_nacl_386.s
deleted file mode 100644 (file)
index 90cf366..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 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 "textflag.h"
-
-TEXT Â·startTimer(SB),NOSPLIT,$0
-       JMP time·startTimer(SB)
-
-TEXT Â·stopTimer(SB),NOSPLIT,$0
-       JMP time·stopTimer(SB)
diff --git a/src/syscall/time_nacl_arm.s b/src/syscall/time_nacl_arm.s
deleted file mode 100644 (file)
index 7864ec9..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 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 "textflag.h"
-
-TEXT Â·startTimer(SB),NOSPLIT,$0
-       B time·startTimer(SB)
-
-TEXT Â·stopTimer(SB),NOSPLIT,$0
-       B time·stopTimer(SB)
index 09be22c971a6d9223840762116f4915c7c54bd27..682c68cf9beee21f602cb62b78da43918a85edeb 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package syscall
 
diff --git a/src/syscall/unzip_nacl.go b/src/syscall/unzip_nacl.go
deleted file mode 100644 (file)
index 14b5bd1..0000000
+++ /dev/null
@@ -1,685 +0,0 @@
-// 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.
-
-// Small in-memory unzip implementation.
-// A simplified copy of the pre-Go 1 compress/flate/inflate.go
-// and a modified copy of the zip reader in package time.
-// (The one in package time does not support decompression; this one does.)
-
-package syscall
-
-const (
-       maxCodeLen = 16    // max length of Huffman code
-       maxHist    = 32768 // max history required
-       maxLit     = 286
-       maxDist    = 32
-       numCodes   = 19 // number of codes in Huffman meta-code
-)
-
-type decompressor struct {
-       in  string // compressed input
-       out []byte // uncompressed output
-       b   uint32 // input bits, at top of b
-       nb  uint
-       err bool // invalid input
-       eof bool // reached EOF
-
-       h1, h2   huffmanDecoder        // decoders for literal/length, distance
-       bits     [maxLit + maxDist]int // lengths defining Huffman codes
-       codebits [numCodes]int
-}
-
-func (f *decompressor) nextBlock() {
-       for f.nb < 1+2 {
-               if f.moreBits(); f.err {
-                       return
-               }
-       }
-       f.eof = f.b&1 == 1
-       f.b >>= 1
-       typ := f.b & 3
-       f.b >>= 2
-       f.nb -= 1 + 2
-       switch typ {
-       case 0:
-               f.dataBlock()
-       case 1:
-               // compressed, fixed Huffman tables
-               f.huffmanBlock(&fixedHuffmanDecoder, nil)
-       case 2:
-               // compressed, dynamic Huffman tables
-               if f.readHuffman(); f.err {
-                       break
-               }
-               f.huffmanBlock(&f.h1, &f.h2)
-       default:
-               // 3 is reserved.
-               f.err = true
-       }
-}
-
-// RFC 1951 section 3.2.7.
-// Compression with dynamic Huffman codes
-
-var codeOrder = [...]int{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}
-
-func (f *decompressor) readHuffman() {
-       // HLIT[5], HDIST[5], HCLEN[4].
-       for f.nb < 5+5+4 {
-               if f.moreBits(); f.err {
-                       return
-               }
-       }
-       nlit := int(f.b&0x1F) + 257
-       f.b >>= 5
-       ndist := int(f.b&0x1F) + 1
-       f.b >>= 5
-       nclen := int(f.b&0xF) + 4
-       f.b >>= 4
-       f.nb -= 5 + 5 + 4
-
-       // (HCLEN+4)*3 bits: code lengths in the magic codeOrder order.
-       for i := 0; i < nclen; i++ {
-               for f.nb < 3 {
-                       if f.moreBits(); f.err {
-                               return
-                       }
-               }
-               f.codebits[codeOrder[i]] = int(f.b & 0x7)
-               f.b >>= 3
-               f.nb -= 3
-       }
-       for i := nclen; i < len(codeOrder); i++ {
-               f.codebits[codeOrder[i]] = 0
-       }
-       if !f.h1.init(f.codebits[0:]) {
-               f.err = true
-               return
-       }
-
-       // HLIT + 257 code lengths, HDIST + 1 code lengths,
-       // using the code length Huffman code.
-       for i, n := 0, nlit+ndist; i < n; {
-               x := f.huffSym(&f.h1)
-               if f.err {
-                       return
-               }
-               if x < 16 {
-                       // Actual length.
-                       f.bits[i] = x
-                       i++
-                       continue
-               }
-               // Repeat previous length or zero.
-               var rep int
-               var nb uint
-               var b int
-               switch x {
-               default:
-                       f.err = true
-                       return
-               case 16:
-                       rep = 3
-                       nb = 2
-                       if i == 0 {
-                               f.err = true
-                               return
-                       }
-                       b = f.bits[i-1]
-               case 17:
-                       rep = 3
-                       nb = 3
-                       b = 0
-               case 18:
-                       rep = 11
-                       nb = 7
-                       b = 0
-               }
-               for f.nb < nb {
-                       if f.moreBits(); f.err {
-                               return
-                       }
-               }
-               rep += int(f.b & uint32(1<<nb-1))
-               f.b >>= nb
-               f.nb -= nb
-               if i+rep > n {
-                       f.err = true
-                       return
-               }
-               for j := 0; j < rep; j++ {
-                       f.bits[i] = b
-                       i++
-               }
-       }
-
-       if !f.h1.init(f.bits[0:nlit]) || !f.h2.init(f.bits[nlit:nlit+ndist]) {
-               f.err = true
-               return
-       }
-}
-
-// Decode a single Huffman block from f.
-// hl and hd are the Huffman states for the lit/length values
-// and the distance values, respectively. If hd == nil, using the
-// fixed distance encoding associated with fixed Huffman blocks.
-func (f *decompressor) huffmanBlock(hl, hd *huffmanDecoder) {
-       for {
-               v := f.huffSym(hl)
-               if f.err {
-                       return
-               }
-               var n uint // number of bits extra
-               var length int
-               switch {
-               case v < 256:
-                       f.out = append(f.out, byte(v))
-                       continue
-               case v == 256:
-                       // Done with huffman block; read next block.
-                       return
-               // otherwise, reference to older data
-               case v < 265:
-                       length = v - (257 - 3)
-                       n = 0
-               case v < 269:
-                       length = v*2 - (265*2 - 11)
-                       n = 1
-               case v < 273:
-                       length = v*4 - (269*4 - 19)
-                       n = 2
-               case v < 277:
-                       length = v*8 - (273*8 - 35)
-                       n = 3
-               case v < 281:
-                       length = v*16 - (277*16 - 67)
-                       n = 4
-               case v < 285:
-                       length = v*32 - (281*32 - 131)
-                       n = 5
-               default:
-                       length = 258
-                       n = 0
-               }
-               if n > 0 {
-                       for f.nb < n {
-                               if f.moreBits(); f.err {
-                                       return
-                               }
-                       }
-                       length += int(f.b & uint32(1<<n-1))
-                       f.b >>= n
-                       f.nb -= n
-               }
-
-               var dist int
-               if hd == nil {
-                       for f.nb < 5 {
-                               if f.moreBits(); f.err {
-                                       return
-                               }
-                       }
-                       dist = int(reverseByte[(f.b&0x1F)<<3])
-                       f.b >>= 5
-                       f.nb -= 5
-               } else {
-                       if dist = f.huffSym(hd); f.err {
-                               return
-                       }
-               }
-
-               switch {
-               case dist < 4:
-                       dist++
-               case dist >= 30:
-                       f.err = true
-                       return
-               default:
-                       nb := uint(dist-2) >> 1
-                       // have 1 bit in bottom of dist, need nb more.
-                       extra := (dist & 1) << nb
-                       for f.nb < nb {
-                               if f.moreBits(); f.err {
-                                       return
-                               }
-                       }
-                       extra |= int(f.b & uint32(1<<nb-1))
-                       f.b >>= nb
-                       f.nb -= nb
-                       dist = 1<<(nb+1) + 1 + extra
-               }
-
-               // Copy [-dist:-dist+length] into output.
-               // Encoding can be prescient, so no check on length.
-               if dist > len(f.out) {
-                       f.err = true
-                       return
-               }
-
-               p := len(f.out) - dist
-               for i := 0; i < length; i++ {
-                       f.out = append(f.out, f.out[p])
-                       p++
-               }
-       }
-}
-
-// Copy a single uncompressed data block from input to output.
-func (f *decompressor) dataBlock() {
-       // Uncompressed.
-       // Discard current half-byte.
-       f.nb = 0
-       f.b = 0
-
-       if len(f.in) < 4 {
-               f.err = true
-               return
-       }
-
-       buf := f.in[:4]
-       f.in = f.in[4:]
-       n := int(buf[0]) | int(buf[1])<<8
-       nn := int(buf[2]) | int(buf[3])<<8
-       if uint16(nn) != uint16(^n) {
-               f.err = true
-               return
-       }
-
-       if len(f.in) < n {
-               f.err = true
-               return
-       }
-       f.out = append(f.out, f.in[:n]...)
-       f.in = f.in[n:]
-}
-
-func (f *decompressor) moreBits() {
-       if len(f.in) == 0 {
-               f.err = true
-               return
-       }
-       c := f.in[0]
-       f.in = f.in[1:]
-       f.b |= uint32(c) << f.nb
-       f.nb += 8
-}
-
-// Read the next Huffman-encoded symbol from f according to h.
-func (f *decompressor) huffSym(h *huffmanDecoder) int {
-       for n := uint(h.min); n <= uint(h.max); n++ {
-               lim := h.limit[n]
-               if lim == -1 {
-                       continue
-               }
-               for f.nb < n {
-                       if f.moreBits(); f.err {
-                               return 0
-                       }
-               }
-               v := int(f.b & uint32(1<<n-1))
-               v <<= 16 - n
-               v = int(reverseByte[v>>8]) | int(reverseByte[v&0xFF])<<8 // reverse bits
-               if v <= lim {
-                       f.b >>= n
-                       f.nb -= n
-                       return h.codes[v-h.base[n]]
-               }
-       }
-       f.err = true
-       return 0
-}
-
-var reverseByte = [256]byte{
-       0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
-       0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
-       0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
-       0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
-       0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
-       0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
-       0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
-       0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
-       0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
-       0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
-       0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
-       0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
-       0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
-       0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
-       0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
-       0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
-       0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
-       0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
-       0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
-       0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
-       0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
-       0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
-       0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
-       0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
-       0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
-       0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
-       0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
-       0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
-       0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
-       0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
-       0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
-       0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
-}
-
-// Hard-coded Huffman tables for DEFLATE algorithm.
-// See RFC 1951, section 3.2.6.
-var fixedHuffmanDecoder = huffmanDecoder{
-       7, 9,
-       [maxCodeLen + 1]int{7: 23, 199, 511},
-       [maxCodeLen + 1]int{7: 0, 24, 224},
-       []int{
-               // length 7: 256-279
-               256, 257, 258, 259, 260, 261, 262,
-               263, 264, 265, 266, 267, 268, 269,
-               270, 271, 272, 273, 274, 275, 276,
-               277, 278, 279,
-
-               // length 8: 0-143
-               0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
-               12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
-               22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
-               32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
-               42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
-               52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
-               62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
-               72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
-               82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
-               92, 93, 94, 95, 96, 97, 98, 99, 100,
-               101, 102, 103, 104, 105, 106, 107, 108,
-               109, 110, 111, 112, 113, 114, 115, 116,
-               117, 118, 119, 120, 121, 122, 123, 124,
-               125, 126, 127, 128, 129, 130, 131, 132,
-               133, 134, 135, 136, 137, 138, 139, 140,
-               141, 142, 143,
-
-               // length 8: 280-287
-               280, 281, 282, 283, 284, 285, 286, 287,
-
-               // length 9: 144-255
-               144, 145, 146, 147, 148, 149, 150, 151,
-               152, 153, 154, 155, 156, 157, 158, 159,
-               160, 161, 162, 163, 164, 165, 166, 167,
-               168, 169, 170, 171, 172, 173, 174, 175,
-               176, 177, 178, 179, 180, 181, 182, 183,
-               184, 185, 186, 187, 188, 189, 190, 191,
-               192, 193, 194, 195, 196, 197, 198, 199,
-               200, 201, 202, 203, 204, 205, 206, 207,
-               208, 209, 210, 211, 212, 213, 214, 215,
-               216, 217, 218, 219, 220, 221, 222, 223,
-               224, 225, 226, 227, 228, 229, 230, 231,
-               232, 233, 234, 235, 236, 237, 238, 239,
-               240, 241, 242, 243, 244, 245, 246, 247,
-               248, 249, 250, 251, 252, 253, 254, 255,
-       },
-}
-
-// Huffman decoder is based on
-// J. Brian Connell, ``A Huffman-Shannon-Fano Code,''
-// Proceedings of the IEEE, 61(7) (July 1973), pp 1046-1047.
-type huffmanDecoder struct {
-       // min, max code length
-       min, max int
-
-       // limit[i] = largest code word of length i
-       // Given code v of length n,
-       // need more bits if v > limit[n].
-       limit [maxCodeLen + 1]int
-
-       // base[i] = smallest code word of length i - seq number
-       base [maxCodeLen + 1]int
-
-       // codes[seq number] = output code.
-       // Given code v of length n, value is
-       // codes[v - base[n]].
-       codes []int
-}
-
-// Initialize Huffman decoding tables from array of code lengths.
-func (h *huffmanDecoder) init(bits []int) bool {
-       // Count number of codes of each length,
-       // compute min and max length.
-       var count [maxCodeLen + 1]int
-       var min, max int
-       for _, n := range bits {
-               if n == 0 {
-                       continue
-               }
-               if min == 0 || n < min {
-                       min = n
-               }
-               if n > max {
-                       max = n
-               }
-               count[n]++
-       }
-       if max == 0 {
-               return false
-       }
-
-       h.min = min
-       h.max = max
-
-       // For each code range, compute
-       // nextcode (first code of that length),
-       // limit (last code of that length), and
-       // base (offset from first code to sequence number).
-       code := 0
-       seq := 0
-       var nextcode [maxCodeLen]int
-       for i := min; i <= max; i++ {
-               n := count[i]
-               nextcode[i] = code
-               h.base[i] = code - seq
-               code += n
-               seq += n
-               h.limit[i] = code - 1
-               code <<= 1
-       }
-
-       // Make array mapping sequence numbers to codes.
-       if len(h.codes) < len(bits) {
-               h.codes = make([]int, len(bits))
-       }
-       for i, n := range bits {
-               if n == 0 {
-                       continue
-               }
-               code := nextcode[n]
-               nextcode[n]++
-               seq := code - h.base[n]
-               h.codes[seq] = i
-       }
-       return true
-}
-
-func inflate(in string) (out []byte) {
-       var d decompressor
-       d.in = in
-       for !d.err && !d.eof {
-               d.nextBlock()
-       }
-       if len(d.in) != 0 {
-               println("fs unzip: junk at end of compressed data")
-               return nil
-       }
-       return d.out
-}
-
-// get4 returns the little-endian 32-bit value in b.
-func zget4(b string) int {
-       if len(b) < 4 {
-               return 0
-       }
-       return int(b[0]) | int(b[1])<<8 | int(b[2])<<16 | int(b[3])<<24
-}
-
-// get2 returns the little-endian 16-bit value in b.
-func zget2(b string) int {
-       if len(b) < 2 {
-               return 0
-       }
-       return int(b[0]) | int(b[1])<<8
-}
-
-func unzip(data string) {
-       const (
-               zecheader   = 0x06054b50
-               zcheader    = 0x02014b50
-               ztailsize   = 22
-               zheadersize = 30
-               zheader     = 0x04034b50
-       )
-
-       buf := data[len(data)-ztailsize:]
-       n := zget2(buf[10:])
-       size := zget4(buf[12:])
-       off := zget4(buf[16:])
-
-       hdr := data[off : off+size]
-       for i := 0; i < n; i++ {
-               // zip entry layout:
-               //      0       magic[4]
-               //      4       madevers[1]
-               //      5       madeos[1]
-               //      6       extvers[1]
-               //      7       extos[1]
-               //      8       flags[2]
-               //      10      meth[2]
-               //      12      modtime[2]
-               //      14      moddate[2]
-               //      16      crc[4]
-               //      20      csize[4]
-               //      24      uncsize[4]
-               //      28      namelen[2]
-               //      30      xlen[2]
-               //      32      fclen[2]
-               //      34      disknum[2]
-               //      36      iattr[2]
-               //      38      eattr[4]
-               //      42      off[4]
-               //      46      name[namelen]
-               //      46+namelen+xlen+fclen - next header
-               //
-               if zget4(hdr) != zcheader {
-                       println("fs unzip: bad magic")
-                       break
-               }
-               meth := zget2(hdr[10:])
-               mtime := zget2(hdr[12:])
-               mdate := zget2(hdr[14:])
-               csize := zget4(hdr[20:])
-               size := zget4(hdr[24:])
-               namelen := zget2(hdr[28:])
-               xlen := zget2(hdr[30:])
-               fclen := zget2(hdr[32:])
-               xattr := uint32(zget4(hdr[38:])) >> 16
-               off := zget4(hdr[42:])
-               name := hdr[46 : 46+namelen]
-               hdr = hdr[46+namelen+xlen+fclen:]
-
-               // zip per-file header layout:
-               //      0       magic[4]
-               //      4       extvers[1]
-               //      5       extos[1]
-               //      6       flags[2]
-               //      8       meth[2]
-               //      10      modtime[2]
-               //      12      moddate[2]
-               //      14      crc[4]
-               //      18      csize[4]
-               //      22      uncsize[4]
-               //      26      namelen[2]
-               //      28      xlen[2]
-               //      30      name[namelen]
-               //      30+namelen+xlen - file data
-               //
-               buf := data[off : off+zheadersize+namelen]
-               if zget4(buf) != zheader ||
-                       zget2(buf[8:]) != meth ||
-                       zget2(buf[26:]) != namelen ||
-                       buf[30:30+namelen] != name {
-                       println("fs unzip: inconsistent zip file")
-                       return
-               }
-               xlen = zget2(buf[28:])
-
-               off += zheadersize + namelen + xlen
-
-               var fdata []byte
-               switch meth {
-               case 0:
-                       // buf is uncompressed
-                       buf = data[off : off+size]
-                       fdata = []byte(buf)
-               case 8:
-                       // buf is deflate-compressed
-                       buf = data[off : off+csize]
-                       fdata = inflate(buf)
-                       if len(fdata) != size {
-                               println("fs unzip: inconsistent size in zip file")
-                               return
-                       }
-               }
-
-               if xattr&S_IFMT == 0 {
-                       if xattr&0777 == 0 {
-                               xattr |= 0666
-                       }
-                       if len(name) > 0 && name[len(name)-1] == '/' {
-                               xattr |= S_IFDIR
-                               xattr |= 0111
-                       } else {
-                               xattr |= S_IFREG
-                       }
-               }
-
-               if err := create(name, xattr, zipToTime(mdate, mtime), fdata); err != nil {
-                       print("fs unzip: create ", name, ": ", err.Error(), "\n")
-               }
-       }
-
-       chdirEnv()
-}
-
-func zipToTime(date, time int) int64 {
-       dd := date & 0x1f
-       mm := date >> 5 & 0xf
-       yy := date >> 9 // since 1980
-
-       sec := int64(315532800) // jan 1 1980
-       sec += int64(yy) * 365 * 86400
-       sec += int64(yy) / 4 * 86400
-       if yy%4 > 0 || mm >= 3 {
-               sec += 86400
-       }
-       sec += int64(daysBeforeMonth[mm]) * 86400
-       sec += int64(dd-1) * 86400
-
-       h := time >> 11
-       m := time >> 5 & 0x3F
-       s := time & 0x1f * 2
-       sec += int64(h*3600 + m*60 + s)
-
-       return sec
-}
-
-var daysBeforeMonth = [...]int32{
-       0,
-       0,
-       31,
-       31 + 28,
-       31 + 28 + 31,
-       31 + 28 + 31 + 30,
-       31 + 28 + 31 + 30 + 31,
-       31 + 28 + 31 + 30 + 31 + 30,
-       31 + 28 + 31 + 30 + 31 + 30 + 31,
-       31 + 28 + 31 + 30 + 31 + 30 + 31 + 31,
-       31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30,
-       31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31,
-       31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30,
-       31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31,
-}
diff --git a/src/syscall/zsyscall_nacl_386.go b/src/syscall/zsyscall_nacl_386.go
deleted file mode 100644 (file)
index fb286ba..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-// mksyscall.pl -l32 -nacl -tags nacl,386 syscall_nacl.go syscall_nacl_386.go
-// Code generated by the command above; DO NOT EDIT.
-
-// +build nacl,386
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclClose(fd int) (err error) {
-       _, _, e1 := Syscall(sys_close, uintptr(fd), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclFstat(fd int, stat *Stat_t) (err error) {
-       _, _, e1 := Syscall(sys_fstat, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclRead(fd int, b []byte) (n int, err error) {
-       var _p0 unsafe.Pointer
-       if len(b) > 0 {
-               _p0 = unsafe.Pointer(&b[0])
-       } else {
-               _p0 = unsafe.Pointer(&_zero)
-       }
-       r0, _, e1 := Syscall(sys_read, uintptr(fd), uintptr(_p0), uintptr(len(b)))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclSeek(fd int, off *int64, whence int) (err error) {
-       _, _, e1 := Syscall(sys_lseek, uintptr(fd), uintptr(unsafe.Pointer(off)), uintptr(whence))
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclGetRandomBytes(b []byte) (err error) {
-       var _p0 unsafe.Pointer
-       if len(b) > 0 {
-               _p0 = unsafe.Pointer(&b[0])
-       } else {
-               _p0 = unsafe.Pointer(&_zero)
-       }
-       _, _, e1 := Syscall(sys_get_random_bytes, uintptr(_p0), uintptr(len(b)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
diff --git a/src/syscall/zsyscall_nacl_arm.go b/src/syscall/zsyscall_nacl_arm.go
deleted file mode 100644 (file)
index d06d02c..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-// mksyscall.pl -l32 -nacl -arm -tags nacl,arm syscall_nacl.go syscall_nacl_arm.go
-// Code generated by the command above; DO NOT EDIT.
-
-// +build nacl,arm
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclClose(fd int) (err error) {
-       _, _, e1 := Syscall(sys_close, uintptr(fd), 0, 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclFstat(fd int, stat *Stat_t) (err error) {
-       _, _, e1 := Syscall(sys_fstat, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclRead(fd int, b []byte) (n int, err error) {
-       var _p0 unsafe.Pointer
-       if len(b) > 0 {
-               _p0 = unsafe.Pointer(&b[0])
-       } else {
-               _p0 = unsafe.Pointer(&_zero)
-       }
-       r0, _, e1 := Syscall(sys_read, uintptr(fd), uintptr(_p0), uintptr(len(b)))
-       n = int(r0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclSeek(fd int, off *int64, whence int) (err error) {
-       _, _, e1 := Syscall(sys_lseek, uintptr(fd), uintptr(unsafe.Pointer(off)), uintptr(whence))
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func naclGetRandomBytes(b []byte) (err error) {
-       var _p0 unsafe.Pointer
-       if len(b) > 0 {
-               _p0 = unsafe.Pointer(&b[0])
-       } else {
-               _p0 = unsafe.Pointer(&_zero)
-       }
-       _, _, e1 := Syscall(sys_get_random_bytes, uintptr(_p0), uintptr(len(b)), 0)
-       if e1 != 0 {
-               err = errnoErr(e1)
-       }
-       return
-}
index f4756b18a629b228a26178f179181e44f1a09aa1..97b1140bbcff95e59a51b3cfc3cbc674ac259c57 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
 
 package time
 
index d6bcabfb8083bd066a25259fef5d763c1dbcec30..74aa5212a1face327e847ba3f6ec6a774cc90d7e 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin,386 darwin,amd64 dragonfly freebsd linux,!android nacl netbsd openbsd solaris
+// +build aix darwin,386 darwin,amd64 dragonfly freebsd linux,!android netbsd openbsd solaris
 
 // Parse "zoneinfo" time zone file.
 // This is a fairly standard file format used on OS X, Linux, BSD, Sun, and others.