]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: include mmap constants in openbsd zerror* files
authorJoel Sing <jsing@google.com>
Mon, 13 Jan 2014 00:25:48 +0000 (11:25 +1100)
committerJoel Sing <jsing@google.com>
Mon, 13 Jan 2014 00:25:48 +0000 (11:25 +1100)
Include the <sys/mman.h> header for OpenBSD mkerrors.sh. This brings
in constants used with madvise(2), mmap(2), msync(2) and mlockall(2).

Fixes #4929

R=golang-codereviews, minux.ma
CC=golang-codereviews
https://golang.org/cl/50930043

src/pkg/syscall/mkerrors.sh
src/pkg/syscall/zerrors_openbsd_386.go
src/pkg/syscall/zerrors_openbsd_amd64.go

index 870af1490559b9e2bd3d4a3d3aa03355de7bc9c0..d60d1be97a3e84347d7872ebdb75079c0731df1d 100755 (executable)
@@ -143,6 +143,7 @@ includes_OpenBSD='
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/event.h>
+#include <sys/mman.h>
 #include <sys/socket.h>
 #include <sys/sockio.h>
 #include <sys/sysctl.h>
index 4c9c357573f5314bee16a043118a3ee60e22534d..c52a67c37d8e942d78adfea1466c6ee145b92a62 100644 (file)
@@ -854,6 +854,32 @@ const (
        LOCK_NB                           = 0x4
        LOCK_SH                           = 0x1
        LOCK_UN                           = 0x8
+       MADV_DONTNEED                     = 0x4
+       MADV_FREE                         = 0x6
+       MADV_NORMAL                       = 0x0
+       MADV_RANDOM                       = 0x1
+       MADV_SEQUENTIAL                   = 0x2
+       MADV_SPACEAVAIL                   = 0x5
+       MADV_WILLNEED                     = 0x3
+       MAP_ANON                          = 0x1000
+       MAP_COPY                          = 0x4
+       MAP_FILE                          = 0x0
+       MAP_FIXED                         = 0x10
+       MAP_FLAGMASK                      = 0x1ff7
+       MAP_HASSEMAPHORE                  = 0x200
+       MAP_INHERIT                       = 0x80
+       MAP_INHERIT_COPY                  = 0x1
+       MAP_INHERIT_DONATE_COPY           = 0x3
+       MAP_INHERIT_NONE                  = 0x2
+       MAP_INHERIT_SHARE                 = 0x0
+       MAP_NOEXTEND                      = 0x100
+       MAP_NORESERVE                     = 0x40
+       MAP_PRIVATE                       = 0x2
+       MAP_RENAME                        = 0x20
+       MAP_SHARED                        = 0x1
+       MAP_TRYFIXED                      = 0x400
+       MCL_CURRENT                       = 0x1
+       MCL_FUTURE                        = 0x2
        MSG_BCAST                         = 0x100
        MSG_CTRUNC                        = 0x20
        MSG_DONTROUTE                     = 0x4
@@ -865,6 +891,9 @@ const (
        MSG_PEEK                          = 0x2
        MSG_TRUNC                         = 0x10
        MSG_WAITALL                       = 0x40
+       MS_ASYNC                          = 0x1
+       MS_INVALIDATE                     = 0x4
+       MS_SYNC                           = 0x2
        NAME_MAX                          = 0xff
        NET_RT_DUMP                       = 0x1
        NET_RT_FLAGS                      = 0x2
@@ -926,6 +955,10 @@ const (
        PRIO_PGRP                         = 0x1
        PRIO_PROCESS                      = 0x0
        PRIO_USER                         = 0x2
+       PROT_EXEC                         = 0x4
+       PROT_NONE                         = 0x0
+       PROT_READ                         = 0x1
+       PROT_WRITE                        = 0x2
        PT_MASK                           = 0x3ff000
        RLIMIT_CORE                       = 0x4
        RLIMIT_CPU                        = 0x0
index c480bab97305028c93efaf32bfc88de0e1d9df95..3a074119c154d9a35f57a6a100a741875fad673a 100644 (file)
@@ -854,6 +854,32 @@ const (
        LOCK_NB                           = 0x4
        LOCK_SH                           = 0x1
        LOCK_UN                           = 0x8
+       MADV_DONTNEED                     = 0x4
+       MADV_FREE                         = 0x6
+       MADV_NORMAL                       = 0x0
+       MADV_RANDOM                       = 0x1
+       MADV_SEQUENTIAL                   = 0x2
+       MADV_SPACEAVAIL                   = 0x5
+       MADV_WILLNEED                     = 0x3
+       MAP_ANON                          = 0x1000
+       MAP_COPY                          = 0x4
+       MAP_FILE                          = 0x0
+       MAP_FIXED                         = 0x10
+       MAP_FLAGMASK                      = 0x1ff7
+       MAP_HASSEMAPHORE                  = 0x200
+       MAP_INHERIT                       = 0x80
+       MAP_INHERIT_COPY                  = 0x1
+       MAP_INHERIT_DONATE_COPY           = 0x3
+       MAP_INHERIT_NONE                  = 0x2
+       MAP_INHERIT_SHARE                 = 0x0
+       MAP_NOEXTEND                      = 0x100
+       MAP_NORESERVE                     = 0x40
+       MAP_PRIVATE                       = 0x2
+       MAP_RENAME                        = 0x20
+       MAP_SHARED                        = 0x1
+       MAP_TRYFIXED                      = 0x400
+       MCL_CURRENT                       = 0x1
+       MCL_FUTURE                        = 0x2
        MSG_BCAST                         = 0x100
        MSG_CTRUNC                        = 0x20
        MSG_DONTROUTE                     = 0x4
@@ -865,6 +891,9 @@ const (
        MSG_PEEK                          = 0x2
        MSG_TRUNC                         = 0x10
        MSG_WAITALL                       = 0x40
+       MS_ASYNC                          = 0x1
+       MS_INVALIDATE                     = 0x4
+       MS_SYNC                           = 0x2
        NAME_MAX                          = 0xff
        NET_RT_DUMP                       = 0x1
        NET_RT_FLAGS                      = 0x2
@@ -926,6 +955,10 @@ const (
        PRIO_PGRP                         = 0x1
        PRIO_PROCESS                      = 0x0
        PRIO_USER                         = 0x2
+       PROT_EXEC                         = 0x4
+       PROT_NONE                         = 0x0
+       PROT_READ                         = 0x1
+       PROT_WRITE                        = 0x2
        RLIMIT_CORE                       = 0x4
        RLIMIT_CPU                        = 0x0
        RLIMIT_DATA                       = 0x2