Commit Graph

25 Commits

Author SHA1 Message Date
Alex Brainman
1caf55eba1 windows: use FILE_FLAG_BACKUP_SEMANTICS in Utimes/UtimesNano
This is a copy of https://golang.org/cl/154020043 in the syscall package.

Fixes golang/go#10804

Change-Id: I6f6177e30c105c8065fdc8cc351e899090e160a9
Reviewed-on: https://go-review.googlesource.com/10076
Reviewed-by: Minux Ma <minux@golang.org>
2015-05-14 05:04:03 +00:00
Alex Brainman
65705ef9e9 windows/svc: add new package to help create and manage Windows services
Change-Id: I58bb446aaa387b31d8a9ff4217793a170b96a7e2
Reviewed-on: https://go-review.googlesource.com/9104
Reviewed-by: Rob Pike <r@golang.org>
2015-05-01 05:26:56 +00:00
Alex Brainman
bbc47fbbc8 windows/registry: mark string end with 0 before calling Windows ExpandEnvironmentStrings
Change-Id: I02bfcdeac44167d1dbeb15bcd5c82111fba3f527
Reviewed-on: https://go-review.googlesource.com/9234
Reviewed-by: Rob Pike <r@golang.org>
2015-04-23 02:52:27 +00:00
Alex Brainman
e961698092 windows/registry: add new package to manipulate Windows registry
Change-Id: Ia7c3d6250c041b95aa43ca5ca2a92251c480ef77
Reviewed-on: https://go-review.googlesource.com/8843
Reviewed-by: Rob Pike <r@golang.org>
2015-04-15 07:18:44 +00:00
Yasuhiro Matsumoto
61f8ff32f5 windows: change Readlink to handle junction
Related issue golang/go#10150

Change-Id: I38e3e13238624655bb828d501bc865ff8a4312e9
Reviewed-on: https://go-review.googlesource.com/7493
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-04-10 22:14:33 +00:00
Pawel Knap
d008cdcf32 go.sys/windows: Add missing FILE_NOTIFY_CHANGE_SECURITY filter
According to ReadDirectoryChangesW documentation, this parameter is
perfectly valid and its absence in current enumeration makes it incomplete.

Internal flags like FILE_NOTIFY_CHANGE_EA were not added.

Change-Id: I9d4182dcfa67e67289c0cc35155a64bf5e5152db
Reviewed-on: https://go-review.googlesource.com/6560
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-04-09 09:14:14 +00:00
Alex Brainman
ddd1cdae39 windows: fix race when allocating buffer for some windows syscalls
From main repo: https://go-review.googlesource.com/#/c/4940

Change-Id: I56fe7f6aedc0fd350abb94299ad500fcb80c049a
Reviewed-on: https://go-review.googlesource.com/8604
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-09 00:47:30 +00:00
Alex Brainman
40756181e9 windows: use go generate to build zsyscall_windows.go
Also remove some empty source files while we are at it.

Change-Id: Ia3a35b274a0428196aee63ee2daacc533285d0ea
Reviewed-on: https://go-review.googlesource.com/2530
Reviewed-by: Rob Pike <r@golang.org>
2015-03-15 23:59:38 +00:00
Carlos Castillo
5b683257ff x/sys/windows: Add GetComputerNameEx
Provides access to the GetComputerNameEx syscall.

This mirrors the change golang.org/cl/5852 in the standard library, but
provides public access to all name types provided by windows.

Change-Id: I5fbad5abe721de70e9d2b5dda2fafb7a9c419220
Reviewed-on: https://go-review.googlesource.com/6320
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-03-04 23:29:43 +00:00
David Symonds
1da8e6ee6d sys: add import comments.
Change-Id: I0ebbb4f2da41bea7871f893332f2e4847b1bfefa
Reviewed-on: https://go-review.googlesource.com/1241
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-09 22:46:33 +00:00
Andrew Gerrand
dea3d764c2 go.sys: use golang.org/x/... import paths
LGTM=bradfitz, rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/171050043
2014-11-10 08:56:17 +11:00
Alex Brainman
7c39a4f50c go.sys/windows: add SIO_UDP_CONNRESET const
It was part of recently submitted CL 149510043.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/155320044
2014-11-06 11:00:43 +11:00
Alex Brainman
c17938b803 go.sys/windows: keep windows syscall pointers live
apply latest changes made to syscall/mksyscall_windows.go

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/152200043
2014-10-06 10:48:58 +11:00
Brad Fitzpatrick
c65f27ffe6 go.sys: add Unsetenv
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/153810043
2014-10-01 12:10:37 -07:00
Rob Pike
c1f6f8bcc5 go.sys/unix: use "use" in syscall interface
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/144980043
2014-09-16 13:36:53 -07:00
Rob Pike
9782d98bb0 go.sys/windows: delete StartProcess and Exec
These are being deleted from go.sys because in general they can
only be implemented in close coordination with the runtime.

LGTM=alex.brainman
R=alex.brainman
CC=golang-codereviews
https://golang.org/cl/132010043
2014-08-21 16:07:11 -07:00
Alex Brainman
d1ee94ce83 go.sys/windows: apply latest syscall changes
71db3dc120af os: make SameFile handle paths like c:a.txt properly
ff34a3e84dc0 net: fix CNAME resolving on Windows

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/130250043
2014-08-20 12:25:19 +10:00
Alex Brainman
7d091bfd99 go.sys/windows: use $GOROOT/src/pkg/syscall/mksyscall_windows.go to generate syscalls
Also zsyscall_windows_386.go and zsyscall_windows_amd64.go
have same contents, so merge them into single file.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/124430043
2014-08-19 15:20:17 +10:00
Alex Brainman
70c4b52aa0 go.sys/windows: delete errors_windows.go (except APPLICATION_ERROR) and Errno
All consts in errors_windows.go (except APPLICATION_ERROR) were
"invented" at the start of windows port to have minimal impact on
existing Go packages. No point keeping them around.
Also remove Errno, since we will be using syscall.Errno everywhere anyway.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/128290044
2014-08-15 13:37:15 +10:00
Rob Pike
4faa336c56 go.sys/windows: use syscall.Errno for windows errors
If we use a local type, it won't compare properly with errors from
the rest of the standard library. Errors are the one type from syscall
that propagates through the system, so it's important to have only
one type for them.

mkerrors_windows.sh is gone, so:
 - rename zerrors_windows.go and delete its DO NOT EDIT mark
 - delete the contentless zerrors_windows_*.go files

LGTM=rsc
R=rsc
CC=alex.brainman, golang-codereviews
https://golang.org/cl/122600043
2014-08-14 10:28:19 -07:00
Rob Pike
73a4d37962 go.sys/windows: import syscall
Simple oversight.

LGTM=alex.brainman
R=alex.brainman
CC=golang-codereviews, rsc
https://golang.org/cl/121660043
2014-08-13 17:45:19 -07:00
Rob Pike
7118195da3 go.sys/windows: grab Syscall interface from the standard syscall package
Also provide stubs to call loadlibrary and getprocaddress, which are implemented
for package syscall by runtime/syscall_windows.goc.
Should get the windows go.sys build closer to green.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/126170043
2014-08-13 14:08:39 -07:00
Rob Pike
279b3782ad go.sys: fix imports to cgc/p/go.sys, add build tags
Approach but probably not achieve a green build.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/126120043
2014-08-12 22:59:00 -07:00
Rob Pike
8442dd2c63 go.sys: update package names
Semi-automatic migration from package syscall to package {plan9,windows,unix}.
No builds attempted yet, but this gets a lot of noise behind us so subsequent
CLs will be more concise and easier to follow.
Subsequent CLs will have semantic content.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/121520043
2014-08-11 15:58:26 -07:00
Rob Pike
20acc5cf31 go.sys: copy files from syscall package to go.sys/{plan9,windows,unix}
This CL copies to each package of go.sys the files from syscall it will need.
Different directories have different files, but these:
        mkall.sh
        str.go
        syscall.go
        mksyscall.pl
        race.go
        race0.go
        syscall_test.go
are copied to all three.
No changes yet, these are just copies. They are not ready to use yet:
package names are wrong, for starters. But this clean copy will make
it easier to follow the changes as the packages are enabled.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/126960043
2014-08-11 14:48:46 -07:00