Commit Graph

188 Commits

Author SHA1 Message Date
Joe Richey
21f2569f6f unix: update syscall numbers to 4.10 kernel
The syscall numbers for Linux were out of date, so with the release of
the 4.10 kernel, now seemed like a reasonable time to update them. Note
that this change is mostly additive except that it removes some invalid
syscalls for arm, and it removes all constants that refer to either the
syscall base or total number of syscalls. Previous versions had only
removed some of them.

The updated syscall numbers were pulled directly from a header build
of the 4.10 kernel. This required some minor adjustements to the sysnum
generating perl script and is why the comments at the tops of the
generated files look slightly different. I could include the script I
used to do this, but right now it cannot generate the zerrors and ztypes
files.

Change-Id: Id94b967eb917f8f87500f818f2e494df9bccf2e0
Reviewed-on: https://go-review.googlesource.com/37570
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-02-28 21:18:07 +00:00
Matt Layher
e4594059fe unix: add missing netlink constants on Linux
Fixes golang/go#19262

Change-Id: I67ceb187cd68e90a9387a706a89aafded0befe53
Reviewed-on: https://go-review.googlesource.com/37344
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-02-23 22:51:00 +00:00
Matt Layher
075e574b89 unix: implement Vmsplice, add SPLICE_F_* constants
Fixes golang/go#19125

Change-Id: I822b6f260f980178da29a552c6170cb261c8e254
Reviewed-on: https://go-review.googlesource.com/37152
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-02-17 00:34:42 +00:00
Matt Layher
e24f485414 unix: add support for AF_ALG sockets on Linux
Fixes golang/go#19033.

Change-Id: Icbd249f63cd4a9035a1decaa8bf4c521303b4494
Reviewed-on: https://go-review.googlesource.com/36805
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-13 22:57:39 +00:00
Sameer Ajmani
0ed46b70d9 unix: delete asm.s
This contains a stub for func "use", which was deleted.

See issue https://golang.org/issue/16607

Change-Id: I7165ca55ad956ac449e950f2be6f53cfeb8e6ffa
Reviewed-on: https://go-review.googlesource.com/36720
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-13 21:28:12 +00:00
Maxime de Roucy
ce7380f5b0 x/sys/unix: add fallocate constants
Add FALLOC_* constants from /usr/include/linux/falloc.h to use with
Fallocate (golang.org/x/sys/unix package).

Fix golang/go#10599

Change-Id: Ie001e554250bb12472c612adcb4b79c6f72cac34
Reviewed-on: https://go-review.googlesource.com/36336
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-13 20:02:47 +00:00
Sameer Ajmani
aaabbdc969 x/sys/unix: remove the "use" function and its calls.
Update mksyscall*.pl to skip generating calls to "use".
Make build tag handling match what's used in the syscall package.

See issue https://golang.org/issue/16607
and CL https://golang.org/cl/36616

Change-Id: I2d2e823fe1846d2110c07eb1bf976852706ecf60
Reviewed-on: https://go-review.googlesource.com/36715
Run-TryBot: Sameer Ajmani <sameer@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-02-10 16:30:38 +00:00
Steven Hartland
7a6e5648d1 unix: fix SysctlUint64 on 32bit machines
TestSysctlUint64 was using vm.max_kernel_address which is only 64bit
on 64bit machines or 32bit machines with PAE. Switch to using
security.mac.labeled which is a SYSCTL_UQUAD so 64bit on all platforms.

Also:
* Correct typo in test name.

Fixes golang/go#15186

Change-Id: I88b5b6ee6a04dec0730bca1e1f0e282f3c18d20d
Reviewed-on: https://go-review.googlesource.com/36058
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-02-01 05:12:45 +00:00
Samuel Tan
d75a526598 x/sys/unix: move gccgo redeclared functions to separate files
These functions are redeclared in gccgo builds, so move them
to separate files with the "!gccgo" build constraint.

Fixes golang/go#18312

Change-Id: I868cfb77fc394e5e96cee78af0f3abf43db6082a
Reviewed-on: https://go-review.googlesource.com/34379
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-12-14 19:05:18 +00:00
Vladimir Stefanovic
478fcf5431 x/sys/unix: added linux/mips{,le} support
Change-Id: Ibf7a9e16ba0e1dde922748a34d61e197a985ed40
Reviewed-on: https://go-review.googlesource.com/33952
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-05 17:08:28 +00:00
Alex Brainman
f5a6bd4305 windows/registry: add code to access remote pc registry
Introduce OpenRemoteKey function that opens some
root registry keys on remote computer.

Also add PERFORMANCE_DATA key, since it is one of
root keys accessible via OpenRemoteKey.

Change-Id: I738fdfee52a34acd4dc09ddb91fcf0e4c707bd83
Reviewed-on: https://go-review.googlesource.com/33814
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-04 22:43:27 +00:00
Alex Brainman
ca83bd2cb9 windows: run "go generate"
Change-Id: Ide01e409af85a5e2615ba647b44eda67bc14c07f
Reviewed-on: https://go-review.googlesource.com/33812
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-12-02 08:03:26 +00:00
Julian Kornberger
d564595380 unix: Use syscall.SysctlRaw in Sysctl
Remove redundant code

Fixes golang/go#18053

Change-Id: Ic8a2b85819ce86e5ebf2cc6274c604fdb69a5495
Reviewed-on: https://go-review.googlesource.com/33612
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-29 18:14:19 +00:00
Elliot Morrison-Reed
30237cf4ee x/sys/unix: added SockaddrCAN struct to allow creation of AF_CAN sockets
Fixes golang/go#16188

Change-Id: I396ccbf6ce14147bc03ecdf180c2657c22b477b4
Reviewed-on: https://go-review.googlesource.com/33392
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-11-22 21:48:34 +00:00
Alexander Menzhinsky
b699b70325 x/sys/unix: add Getsid on linux
Fixes golang/go#17872

Change-Id: I4bfe7b47c36c3d2f0c08a2adeba595231e507b81
Reviewed-on: https://go-review.googlesource.com/33050
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-10 16:12:52 +00:00
Ian Lance Taylor
9a2e24c373 unix: fix name of prlimit parameters
Update golang/go#17606.

Change-Id: I922525561d81a8b7d805729028825953424f6ecc
Reviewed-on: https://go-review.googlesource.com/32912
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2016-11-08 15:13:28 +00:00
Alexander Neumann
c200b10b5d unix: Add FADV_* constants for linux/arm
This is a followup commit for 9eef40adf0
and adds the constants needed for fadvise() on Linux for ARM that were
missing.

Fixes golang/go#16816

Change-Id: Ib7409f48bc07511d7014cb5791a6cc117a9a471e
Reviewed-on: https://go-review.googlesource.com/31641
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-10-23 15:05:41 +00:00
James Clarke
002cbb5f95 unix: Fix *linkat on sparc64 and s390x
This fixes I8dc87401bb1025c2404e7304ecc4561edd67a452, which failed to
include the changes for s390x and sparc64, breaking the build for them.

Change-Id: I4899350580c36e4efbec9801345b5e32d624c849
Reviewed-on: https://go-review.googlesource.com/31185
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-10-16 22:21:06 +00:00
Hiroshi Ioka
9bb9f0998d x/sys/unix: add *linkat functions on linux
* expose readlinkat, symlinkat

Fixes golang/go#14459

Change-Id: I8dc87401bb1025c2404e7304ecc4561edd67a452
Reviewed-on: https://go-review.googlesource.com/30890
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-10-12 00:19:20 +00:00
James Clarke
67f277b6fe unix: Added linux/sparc64 gccgo support
Change-Id: Iff763334a2efbd44af68048d1de700af7d271647
Reviewed-on: https://go-review.googlesource.com/30755
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-10-11 00:35:16 +00:00
Brad Fitzpatrick
8d1157a435 Revert "x/sys/unix: add *linkat functions on linux"
This reverts commit I44d8dd8020bc61b9c75e0566c34ca9cc56b23f9d.

Reason for revert: Broke the build. (Fixes #17352)

Original change's description:
> x/sys/unix: add *linkat functions on linux
> 
> * expose linkat, readlinkat, symlinkat
> 
> Fixes golang/go#14459
> 
> Change-Id: I44d8dd8020bc61b9c75e0566c34ca9cc56b23f9d
> Reviewed-on: https://go-review.googlesource.com/20129
> Reviewed-by: Russ Cox <rsc@golang.org>
> 

Change-Id: Ic114a5e60b0caef82c21123156963b2a8232d9d4
Reviewed-on: https://go-review.googlesource.com/30491
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-10-06 02:51:42 +00:00
Hiroshi Ioka
1f5e250e11 x/sys/unix: add *linkat functions on linux
* expose linkat, readlinkat, symlinkat

Fixes golang/go#14459

Change-Id: I44d8dd8020bc61b9c75e0566c34ca9cc56b23f9d
Reviewed-on: https://go-review.googlesource.com/20129
Reviewed-by: Russ Cox <rsc@golang.org>
2016-10-06 00:30:26 +00:00
Hiroshi Ioka
c47cb47a30 x/sys/unix: remove unused constants
Change-Id: Ib80ad194eda478c1e6653a3fe34a20ecf785c6ca
Reviewed-on: https://go-review.googlesource.com/20005
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-10-06 00:19:50 +00:00
Shawn Walker-Salas
8f0908ab3b unix: implement Gethostname, Pipe, and Wait4 for Solaris
Fixes golang/go#17107

Change-Id: Ibc18c6595ab6482a2feacaf51b93516fbc7cb2d6
Reviewed-on: https://go-review.googlesource.com/29166
Run-TryBot: Shawn Walker-Salas <shawn.walker@oracle.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-09-16 18:19:09 +00:00
Brad Fitzpatrick
30de6d19a3 unix: fix TestGetfsstat the same way as CL 28550 in pkg syscall
Same as https://golang.org/cl/28550 but for x/sys/unix.

Updates golang/go#16937

Change-Id: Ie93df8ff1c40a7f2d98f1fb3ecf6110330bf1cbc
Reviewed-on: https://go-review.googlesource.com/28585
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-09-07 14:59:46 +00:00
Alex Brainman
a646d33e2e windows: make "go generate" command work on any OS
See issue golang/go#16368 for details.

Updates golang/go#16368

Change-Id: Ic3294385a350aee41887f59cbcf5b0af7742ff3b
Reviewed-on: https://go-review.googlesource.com/24952
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-07-17 07:19:31 +00:00
Alex Brainman
b518c298ac windows: use //go:uintptrescapes comment
CL 24551 introduced //go:uintptrescapes comment to make
syscall.Proc.Call and syscall.LazyProc.Call parameters escape.
Use new comment in this package too.

Updates golang/go#16035.

Change-Id: I57ec3b4778195ca4a1ce9a8eec331f0f69285926
Reviewed-on: https://go-review.googlesource.com/24870
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-07-12 23:56:41 +00:00
Mikio Hara
a408501be4 unix: fix missing use of use function in Getfsstat and Getwd
Updates golang/go#13372.

Change-Id: I623de97eb19880356148cbcb7d17759df82684aa
Reviewed-on: https://go-review.googlesource.com/24751
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-07-04 03:17:55 +00:00
kortschak
62bee03759 unix: fix Ppoll for arm64
Fixes golang/go#16065.

Change-Id: I97d06b7038e7c7507e765736899cfa243f45805c
Reviewed-on: https://go-review.googlesource.com/24121
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-15 01:27:01 +00:00
kortschak
5a8c7f28c1 unix: add Ppoll support for linux
Use a shim for Poll on arm64.

Fixes golang/go#16052.

Change-Id: I929e7a2293561bddb9355bf65f98bc68b91905b2
Reviewed-on: https://go-review.googlesource.com/24062
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-14 16:43:59 +00:00
kortschak
7f918dd405 unix: add Poll for linux
Change-Id: I273bd852f85d204694872a1615be51dc027b97ee
Reviewed-on: https://go-review.googlesource.com/23661
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-11 01:26:39 +00:00
Jess Frazelle
b44883b474 unix: add CLONE_NEWCGROUP for linux kernel >=4.6
Change-Id: I827a97ad2b43f9b33281d0da36fe4cfdf24b928f
Reviewed-on: https://go-review.googlesource.com/23965
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-10 01:22:07 +00:00
kortschak
076b546753 unix: fix typo
Change-Id: Ic7bd0c26cd4ac63861c2ed3541560919d133cd14
Reviewed-on: https://go-review.googlesource.com/23621
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-01 13:32:25 +00:00
Michael Munday
d4feaf1a7e unix: add build tags to s390x files
Needed for old versions of the compiler.

Fixes golang/go#15697.

Change-Id: I913a4baef537775f037b736252b093a87e3b1015
Reviewed-on: https://go-review.googlesource.com/23130
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-05-16 13:23:47 +00:00
Mikio Hara
f78f5183ff unix: fix missing use of use function in sysctl
Updates golang/go#13372.

Change-Id: Idfd5001f4ad7bc80a4283df1c310f97612eba85c
Reviewed-on: https://go-review.googlesource.com/23124
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-05-15 20:56:54 +00:00
Michael Munday
33267e036f unix: add s390x support
This commit adds linux/s390x support to the unix package. It is
based on the changes made to the syscall package in
https://golang.org/cl/20961/. It also adds mkpost.go which is
used to cleanup the API generated by cgo -godefs.

The biggest departure that is made with the syscall package is
the use of the -fsigned-char flag to force signed chars. We
couldn't do this in the syscall package because of the need to
maintain compatibility with the gccgo implementation of the syscall
package (gccgo has supported s390x for a longer time than the Go
toolchain). The unix package does not have this constraint.

Using the -fsigned-char flag makes the API look more like the one
generated on amd64 and arm64 and also more consistent with itself
(the syscall package represents chars using both int8 and uint8
types, the sys package will only ever use int8). Unfortunately it
also means that applications transitioning from the syscall package
to the unix package will see a different API on s390x which might
be confusing. I think the tradeoff is worth it though.

Change-Id: I40b90c18ed787e74ba7a2ebd004bd6bd1ba6279a
Reviewed-on: https://go-review.googlesource.com/23045
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-05-13 18:30:25 +00:00
Alex Brainman
e82cb4d7df windows: remove non-existing now mksyscall_windows.go -xsys flag
Updates golang/go#15167

Change-Id: I58bd7e4e6ba88a2ffba11506e5ac0495de303b5b
Reviewed-on: https://go-review.googlesource.com/23023
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
2016-05-12 03:25:10 +00:00
Brad Fitzpatrick
806cb00533 unix: remove dragonfly/386 support
It was removed from Go (and Dragonfly) already.

Fixes golang/go#10840

Change-Id: If7a86123f2a6120f99946dbd57a5e62a72f30af5
Reviewed-on: https://go-review.googlesource.com/23050
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-05-11 18:08:12 +00:00
Christy Perez
b776ec39b3 unix: fix epoll and missing syscalls for ppc64x
The epoll_event struct was not correct for ppc64* arches. This has
been fixed in the syscall package by CL 22207. This patch makes
the same change, in addition to adding some missing syscalls needed
by fsnotify.

See the following for more info:
https://github.com/fsnotify/fsnotify/issues/130
https://github.com/golang/go/issues/15393

Fixes #15393

Change-Id: Iedad28274ec1d3e48787c34991a725690f3b204d
Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
Reviewed-on: https://go-review.googlesource.com/22605
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-04-29 19:32:39 +00:00
Damien Neil
c8bc69bc2d unix: fix uint64->int cast of control message header
Change-Id: I533233a08472b686d03573bcbae664c76919b18e
Reviewed-on: https://go-review.googlesource.com/22527
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-27 20:20:20 +00:00
Riku Voipio
f64b50fbea unix: fix Pause on linux-arm64
Pause is a legacy syscall not available on linux-arm64. Use ppoll with
all args as 0 to emulate - this is the way musl libc does Pause when the
pause syscall isn't available.

With the changes in syscall_linux* and regenerating zsyscall_linux*,
this calling Pause on linux-arm64 works and returns EINTR as expected.

Change-Id: I88236290313f18c742d826e759e86ff260a8b383
Reviewed-on: https://go-review.googlesource.com/22014
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-15 13:58:44 +00:00
Riku Voipio
324e137580 unix: fix EpollWait for arm64
epoll_wait syscall doesn't exist on arm64. Implement it with
by callign epoll_pwait(). According to man epoll_pwait,
calling epoll_pwait with sigmask of NULL is identical to
epoll_wait.

Testing exposed that EpollEvent needs padding on arm64
like on arm.

This changeset is to fix:
https://github.com/fsnotify/fsnotify/issues/130

Testcase: go test with fsnotify ported from syscall to x/sys:
https://github.com/suihkulokki/fsnotify/tree/go-sys

Change-Id: I76136bf4c82c2ee597549133848f490da46dd488
Reviewed-on: https://go-review.googlesource.com/21971
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-04-13 20:47:32 +00:00
Alexander Neumann
9eef40adf0 unix: Add FADV_* constants
These constants are used for fadvise() on Linux and were missing from
the ztypes_linux_*.go files.

Including the bluetooth headers is necessary so that cgo can resolve
struct sockaddr_hci.

Fixes golang/go#15114

Change-Id: I1538b5a7b9b24f910c0520d446b2fa5bd8a09013
Reviewed-on: https://go-review.googlesource.com/21753
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-09 16:46:36 +00:00
Tzu-Jung Lee
a80ff226bd unix: add sockaddr_hci support for linux.
Change-Id: Ic2eb52d4e9f7b80992707b125c11be54d7973314
Reviewed-on: https://go-review.googlesource.com/21674
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-08 05:48:20 +00:00
Brad Fitzpatrick
8fdfb00a6a unix: skip failing test on freebsd-386
Updates golang/go#15186

Change-Id: I02403cbc9b3f1c786ee8093e1480edff891ecf13
Reviewed-on: https://go-review.googlesource.com/21676
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-04-08 01:25:32 +00:00
Tzu-Jung Lee
8aa0c605e5 syscall: add bluetooth constants for linux
Tried to generate them with mkerrors.sh by including
bluetooth/bluetooth.h, but it introduces way much more
than necessary stuff.

Change-Id: I380f66892f55dbe4cbfc76a0e3f9817f81d269b9
Reviewed-on: https://go-review.googlesource.com/21675
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-08 01:02:42 +00:00
Alex Brainman
042a8f53ce windows: add NewLazySystemDLL and use it in zsyscall_windows.go
If we want new secure DLL approach to be adopted, we should make
conversion as simple as possible to explain and implement.
I think that replacing

syscall.NewLazyDLL(...) -> windows.NewLazySystemDLL(...)

is easier than

syscall.NewLazyDLL(...) -> &windows.LazyDLL{Name: ..., System: true}

So I propose we introduce convenience function NewLazySystemDLL.

$GOROOT/src/mksyscall_windows.go changes in the following CL.

Change-Id: If3432aff301c347cb355e4e837834696191b2219
Reviewed-on: https://go-review.googlesource.com/21592
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-06 06:33:47 +00:00
Alex Brainman
b323466d0b windows: remove unused asm.s
Change-Id: I1a2b96f71c9f39a46827e9414e1058894fd2a5e1
Reviewed-on: https://go-review.googlesource.com/21523
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-05 06:12:01 +00:00
Brad Fitzpatrick
a60af9cbbc windows: make all files in the package require windows
env_unset.go didn't have a the windows build tag (or filename), so it
was compiling for all operating systems and as a result had weird docs
at https://godoc.org/golang.org/x/sys/windows showing only Unsetenv.

Updates golang/gddo#188

Change-Id: I58f2c27c3d267660c97fce5a1b28da24988c62c8
Reviewed-on: https://go-review.googlesource.com/21460
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2016-04-02 02:39:15 +00:00
Brad Fitzpatrick
3dff6e19a5 windows: add LoadLibraryEx, add LazyDLL.System
Updates golang/go#14959

Change-Id: Ib91c359c3df919df0b30e584d38e56f79f3e3dc9
Reviewed-on: https://go-review.googlesource.com/21388
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-02 00:33:28 +00:00