]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: add constants for flock() system call under Linux.
authorAndrea Spadaccini <spadaccio@google.com>
Thu, 8 Dec 2011 06:12:08 +0000 (15:12 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Thu, 8 Dec 2011 06:12:08 +0000 (15:12 +0900)
The values have been generated only for the i386 and amd64 architectures.

R=golang-dev, mikioh.mikioh, dsymonds
CC=bradfitz, dsymonds, golang-dev
https://golang.org/cl/5452060

src/pkg/syscall/mkerrors.sh
src/pkg/syscall/zerrors_linux_386.go
src/pkg/syscall/zerrors_linux_amd64.go

index 91093a1373701a5017dbd63856a1ac65fbffda19..ff9ece9a89ea0d69a4fe816deb1ec957f66e8bfa 100755 (executable)
@@ -108,6 +108,7 @@ includes_OpenBSD='
 
 includes='
 #include <sys/types.h>
+#include <sys/file.h>
 #include <fcntl.h>
 #include <dirent.h>
 #include <sys/socket.h>
@@ -153,6 +154,7 @@ ccflags="$@"
                $2 ~ /^E[A-Z0-9_]+$/ ||
                $2 ~ /^SIG[^_]/ ||
                $2 ~ /^IN_/ ||
+               $2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
                $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|EVFILT|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV)_/ ||
                $2 == "SOMAXCONN" ||
                $2 == "NAME_MAX" ||
index bbcc74b31a4b56148ca4247a4b03b12b963bea43..53ce2fab5077aa99cf2196c2249018e1944b9c99 100644 (file)
@@ -478,6 +478,10 @@ const (
        LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
        LINUX_REBOOT_MAGIC1              = 0xfee1dead
        LINUX_REBOOT_MAGIC2              = 0x28121969
+       LOCK_EX                          = 0x2
+       LOCK_NB                          = 0x4
+       LOCK_SH                          = 0x1
+       LOCK_UN                          = 0x8
        MADV_DOFORK                      = 0xb
        MADV_DONTFORK                    = 0xa
        MADV_DONTNEED                    = 0x4
index 59c36c56926432640038540ad17c3c55d07157b4..e37eb41422741a0e05a7244b1f7db04f2a5781db 100644 (file)
@@ -478,6 +478,10 @@ const (
        LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
        LINUX_REBOOT_MAGIC1              = 0xfee1dead
        LINUX_REBOOT_MAGIC2              = 0x28121969
+       LOCK_EX                          = 0x2
+       LOCK_NB                          = 0x4
+       LOCK_SH                          = 0x1
+       LOCK_UN                          = 0x8
        MADV_DOFORK                      = 0xb
        MADV_DONTFORK                    = 0xa
        MADV_DONTNEED                    = 0x4