unix: redefine TIPC_WAIT_FOREVER as a uint32 value

The code generator produces -0x1 for (~0) from the tipc.h C header, but this
value is unusable in Go as a uint32. Undefine and replace this value with
the appropriate constant for TIPC_WAIT_FOREVER.

Fixes golang/go#34310

Change-Id: Ic6ab0ddd14394e15868085e2123a9a97a841bc6d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/195757
Run-TryBot: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Matt Layher 2019-09-16 15:53:49 -04:00
Родитель 8a69140bde
Коммит b4ddaad3f8
14 изменённых файлов: 18 добавлений и 13 удалений

Просмотреть файл

@ -267,6 +267,11 @@ struct ltchars {
#define FS_KEY_DESC_PREFIX "fscrypt:"
#define FS_KEY_DESC_PREFIX_SIZE 8
#define FS_MAX_KEY_SIZE 64
// The code generator produces -0x1 for (~0), but an unsigned value is necessary
// for the tipc_subscr timeout __u32 field.
#undef TIPC_WAIT_FOREVER
#define TIPC_WAIT_FOREVER 0xffffffff
'
includes_NetBSD='

Просмотреть файл

@ -2525,7 +2525,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2526,7 +2526,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2532,7 +2532,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2519,7 +2519,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2527,7 +2527,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2527,7 +2527,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2527,7 +2527,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2527,7 +2527,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2587,7 +2587,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2587,7 +2587,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2513,7 +2513,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2586,7 +2586,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000

Просмотреть файл

@ -2575,7 +2575,7 @@ const (
TIPC_SUB_PORTS = 0x1
TIPC_SUB_SERVICE = 0x2
TIPC_TOP_SRV = 0x1
TIPC_WAIT_FOREVER = -0x1
TIPC_WAIT_FOREVER = 0xffffffff
TIPC_WITHDRAWN = 0x2
TIPC_ZONE_BITS = 0x8
TIPC_ZONE_CLUSTER_MASK = 0xfffff000