Browse Source

unix: export sizeof consts

Export the sizeof(Ptr|Short|Int|Long|LongLong) consts. This allows users
to get this information (e.g. for alignment purposes) without using cgo
or generating these constants themselves.

Change-Id: I8640482bf67b89c2f2b6e9a116ba7bc268f8135a
Reviewed-on: https://go-review.googlesource.com/c/139617
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Tobias Klauser 7 years ago
parent
commit
8469e31483

+ 6 - 6
unix/linux/types.go

@@ -328,14 +328,14 @@ struct my_blkpg_partition {
 */
 */
 import "C"
 import "C"
 
 
-// Machine characteristics; for internal use.
+// Machine characteristics
 
 
 const (
 const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
+	SizeofPtr      = C.sizeofPtr
+	SizeofShort    = C.sizeof_short
+	SizeofInt      = C.sizeof_int
+	SizeofLong     = C.sizeof_long
+	SizeofLongLong = C.sizeof_longlong
 	PathMax        = C.PATH_MAX
 	PathMax        = C.PATH_MAX
 )
 )
 
 

+ 1 - 1
unix/sockcmsg_unix.go

@@ -12,7 +12,7 @@ import "unsafe"
 
 
 // Round the length of a raw sockaddr up to align it properly.
 // Round the length of a raw sockaddr up to align it properly.
 func cmsgAlignOf(salen int) int {
 func cmsgAlignOf(salen int) int {
-	salign := sizeofPtr
+	salign := SizeofPtr
 	// NOTE: It seems like 64-bit Darwin, DragonFly BSD and
 	// NOTE: It seems like 64-bit Darwin, DragonFly BSD and
 	// Solaris kernels still require 32-bit aligned access to
 	// Solaris kernels still require 32-bit aligned access to
 	// network subsystem.
 	// network subsystem.

+ 13 - 13
unix/syscall_linux.go

@@ -1122,7 +1122,7 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
 	// The ptrace syscall differs from glibc's ptrace.
 	// The ptrace syscall differs from glibc's ptrace.
 	// Peeks returns the word in *data, not as the return value.
 	// Peeks returns the word in *data, not as the return value.
 
 
-	var buf [sizeofPtr]byte
+	var buf [SizeofPtr]byte
 
 
 	// Leading edge. PEEKTEXT/PEEKDATA don't require aligned
 	// Leading edge. PEEKTEXT/PEEKDATA don't require aligned
 	// access (PEEKUSER warns that it might), but if we don't
 	// access (PEEKUSER warns that it might), but if we don't
@@ -1130,12 +1130,12 @@ func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err erro
 	// boundary and not get the bytes leading up to the page
 	// boundary and not get the bytes leading up to the page
 	// boundary.
 	// boundary.
 	n := 0
 	n := 0
-	if addr%sizeofPtr != 0 {
-		err = ptrace(req, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
+	if addr%SizeofPtr != 0 {
+		err = ptrace(req, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
 		if err != nil {
 		if err != nil {
 			return 0, err
 			return 0, err
 		}
 		}
-		n += copy(out, buf[addr%sizeofPtr:])
+		n += copy(out, buf[addr%SizeofPtr:])
 		out = out[n:]
 		out = out[n:]
 	}
 	}
 
 
@@ -1173,15 +1173,15 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
 
 
 	// Leading edge.
 	// Leading edge.
 	n := 0
 	n := 0
-	if addr%sizeofPtr != 0 {
-		var buf [sizeofPtr]byte
-		err = ptrace(peekReq, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
+	if addr%SizeofPtr != 0 {
+		var buf [SizeofPtr]byte
+		err = ptrace(peekReq, pid, addr-addr%SizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
 		if err != nil {
 		if err != nil {
 			return 0, err
 			return 0, err
 		}
 		}
-		n += copy(buf[addr%sizeofPtr:], data)
+		n += copy(buf[addr%SizeofPtr:], data)
 		word := *((*uintptr)(unsafe.Pointer(&buf[0])))
 		word := *((*uintptr)(unsafe.Pointer(&buf[0])))
-		err = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word)
+		err = ptrace(pokeReq, pid, addr-addr%SizeofPtr, word)
 		if err != nil {
 		if err != nil {
 			return 0, err
 			return 0, err
 		}
 		}
@@ -1189,19 +1189,19 @@ func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (c
 	}
 	}
 
 
 	// Interior.
 	// Interior.
-	for len(data) > sizeofPtr {
+	for len(data) > SizeofPtr {
 		word := *((*uintptr)(unsafe.Pointer(&data[0])))
 		word := *((*uintptr)(unsafe.Pointer(&data[0])))
 		err = ptrace(pokeReq, pid, addr+uintptr(n), word)
 		err = ptrace(pokeReq, pid, addr+uintptr(n), word)
 		if err != nil {
 		if err != nil {
 			return n, err
 			return n, err
 		}
 		}
-		n += sizeofPtr
-		data = data[sizeofPtr:]
+		n += SizeofPtr
+		data = data[SizeofPtr:]
 	}
 	}
 
 
 	// Trailing edge.
 	// Trailing edge.
 	if len(data) > 0 {
 	if len(data) > 0 {
-		var buf [sizeofPtr]byte
+		var buf [SizeofPtr]byte
 		err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
 		err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
 		if err != nil {
 		if err != nil {
 			return n, err
 			return n, err

+ 4 - 4
unix/syscall_unix.go

@@ -22,10 +22,10 @@ var (
 )
 )
 
 
 const (
 const (
-	darwin64Bit    = runtime.GOOS == "darwin" && sizeofPtr == 8
-	dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8
-	netbsd32Bit    = runtime.GOOS == "netbsd" && sizeofPtr == 4
-	solaris64Bit   = runtime.GOOS == "solaris" && sizeofPtr == 8
+	darwin64Bit    = runtime.GOOS == "darwin" && SizeofPtr == 8
+	dragonfly64Bit = runtime.GOOS == "dragonfly" && SizeofPtr == 8
+	netbsd32Bit    = runtime.GOOS == "netbsd" && SizeofPtr == 4
+	solaris64Bit   = runtime.GOOS == "solaris" && SizeofPtr == 8
 )
 )
 
 
 // Do the interface allocations only once for common
 // Do the interface allocations only once for common

+ 6 - 6
unix/types_aix.go

@@ -59,14 +59,14 @@ struct sockaddr_any {
 */
 */
 import "C"
 import "C"
 
 
-// Machine characteristics; for internal use.
+// Machine characteristics
 
 
 const (
 const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
+	SizeofPtr      = C.sizeofPtr
+	SizeofShort    = C.sizeof_short
+	SizeofInt      = C.sizeof_int
+	SizeofLong     = C.sizeof_long
+	SizeofLongLong = C.sizeof_longlong
 	PathMax        = C.PATH_MAX
 	PathMax        = C.PATH_MAX
 )
 )
 
 

+ 6 - 6
unix/types_darwin.go

@@ -70,14 +70,14 @@ struct sockaddr_any {
 */
 */
 import "C"
 import "C"
 
 
-// Machine characteristics; for internal use.
+// Machine characteristics
 
 
 const (
 const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
+	SizeofPtr      = C.sizeofPtr
+	SizeofShort    = C.sizeof_short
+	SizeofInt      = C.sizeof_int
+	SizeofLong     = C.sizeof_long
+	SizeofLongLong = C.sizeof_longlong
 )
 )
 
 
 // Basic types
 // Basic types

+ 6 - 6
unix/types_dragonfly.go

@@ -65,14 +65,14 @@ struct sockaddr_any {
 */
 */
 import "C"
 import "C"
 
 
-// Machine characteristics; for internal use.
+// Machine characteristics
 
 
 const (
 const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
+	SizeofPtr      = C.sizeofPtr
+	SizeofShort    = C.sizeof_short
+	SizeofInt      = C.sizeof_int
+	SizeofLong     = C.sizeof_long
+	SizeofLongLong = C.sizeof_longlong
 )
 )
 
 
 // Basic types
 // Basic types

+ 6 - 6
unix/types_freebsd.go

@@ -154,14 +154,14 @@ struct if_msghdr8 {
 */
 */
 import "C"
 import "C"
 
 
-// Machine characteristics; for internal use.
+// Machine characteristics
 
 
 const (
 const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
+	SizeofPtr      = C.sizeofPtr
+	SizeofShort    = C.sizeof_short
+	SizeofInt      = C.sizeof_int
+	SizeofLong     = C.sizeof_long
+	SizeofLongLong = C.sizeof_longlong
 )
 )
 
 
 // Basic types
 // Basic types

+ 6 - 6
unix/types_netbsd.go

@@ -67,14 +67,14 @@ struct sockaddr_any {
 */
 */
 import "C"
 import "C"
 
 
-// Machine characteristics; for internal use.
+// Machine characteristics
 
 
 const (
 const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
+	SizeofPtr      = C.sizeofPtr
+	SizeofShort    = C.sizeof_short
+	SizeofInt      = C.sizeof_int
+	SizeofLong     = C.sizeof_long
+	SizeofLongLong = C.sizeof_longlong
 )
 )
 
 
 // Basic types
 // Basic types

+ 6 - 6
unix/types_openbsd.go

@@ -67,14 +67,14 @@ struct sockaddr_any {
 */
 */
 import "C"
 import "C"
 
 
-// Machine characteristics; for internal use.
+// Machine characteristics
 
 
 const (
 const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
+	SizeofPtr      = C.sizeofPtr
+	SizeofShort    = C.sizeof_short
+	SizeofInt      = C.sizeof_int
+	SizeofLong     = C.sizeof_long
+	SizeofLongLong = C.sizeof_longlong
 )
 )
 
 
 // Basic types
 // Basic types

+ 6 - 6
unix/types_solaris.go

@@ -75,14 +75,14 @@ struct sockaddr_any {
 */
 */
 import "C"
 import "C"
 
 
-// Machine characteristics; for internal use.
+// Machine characteristics
 
 
 const (
 const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
+	SizeofPtr      = C.sizeofPtr
+	SizeofShort    = C.sizeof_short
+	SizeofInt      = C.sizeof_int
+	SizeofLong     = C.sizeof_long
+	SizeofLongLong = C.sizeof_longlong
 	PathMax        = C.PATH_MAX
 	PathMax        = C.PATH_MAX
 	MaxHostNameLen = C.MAXHOSTNAMELEN
 	MaxHostNameLen = C.MAXHOSTNAMELEN
 )
 )

+ 5 - 5
unix/ztypes_aix_ppc.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 	PathMax        = 0x3ff
 	PathMax        = 0x3ff
 )
 )
 
 

+ 5 - 5
unix/ztypes_aix_ppc64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x3ff
 	PathMax        = 0x3ff
 )
 )
 
 

+ 5 - 5
unix/ztypes_darwin_386.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_darwin_amd64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_darwin_arm.go

@@ -7,11 +7,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_darwin_arm64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_dragonfly_amd64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_freebsd_386.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_freebsd_amd64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_freebsd_arm.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_linux_386.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_amd64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_arm.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_arm64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_mips.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_mips64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_mips64le.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_mipsle.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_ppc64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_ppc64le.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_riscv64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_s390x.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_linux_sparc64.go

@@ -5,11 +5,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x1000
 	PathMax        = 0x1000
 )
 )
 
 

+ 5 - 5
unix/ztypes_netbsd_386.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_netbsd_amd64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_netbsd_arm.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_openbsd_386.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_openbsd_amd64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_openbsd_arm.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x4
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x4
+	SizeofLongLong = 0x8
 )
 )
 
 
 type (
 type (

+ 5 - 5
unix/ztypes_solaris_amd64.go

@@ -6,11 +6,11 @@
 package unix
 package unix
 
 
 const (
 const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
+	SizeofPtr      = 0x8
+	SizeofShort    = 0x2
+	SizeofInt      = 0x4
+	SizeofLong     = 0x8
+	SizeofLongLong = 0x8
 	PathMax        = 0x400
 	PathMax        = 0x400
 	MaxHostNameLen = 0x100
 	MaxHostNameLen = 0x100
 )
 )