Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3569)

Unified Diff: src/pkg/syscall/types_freebsd.go

Issue 56770044: code review 56770044: syscall: regenerate z-files on FreeBSD 10 (Closed)
Patch Set: diff -r d99a2e24dd10 https://code.google.com/p/go Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/syscall/mksysnum_freebsd.pl ('k') | src/pkg/syscall/zerrors_freebsd_386.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/syscall/types_freebsd.go
===================================================================
--- a/src/pkg/syscall/types_freebsd.go
+++ b/src/pkg/syscall/types_freebsd.go
@@ -60,6 +60,91 @@
char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
};
+// This structure is a duplicate of stat on FreeBSD 8-STABLE.
+// See /usr/include/sys/stat.h.
+struct stat8 {
+#undef st_atimespec st_atim
+#undef st_mtimespec st_mtim
+#undef st_ctimespec st_ctim
+#undef st_birthtimespec st_birthtim
+ __dev_t st_dev;
+ ino_t st_ino;
+ mode_t st_mode;
+ nlink_t st_nlink;
+ uid_t st_uid;
+ gid_t st_gid;
+ __dev_t st_rdev;
+#if __BSD_VISIBLE
+ struct timespec st_atimespec;
+ struct timespec st_mtimespec;
+ struct timespec st_ctimespec;
+#else
+ time_t st_atime;
+ long __st_atimensec;
+ time_t st_mtime;
+ long __st_mtimensec;
+ time_t st_ctime;
+ long __st_ctimensec;
+#endif
+ off_t st_size;
+ blkcnt_t st_blocks;
+ blksize_t st_blksize;
+ fflags_t st_flags;
+ __uint32_t st_gen;
+ __int32_t st_lspare;
+#if __BSD_VISIBLE
+ struct timespec st_birthtimespec;
+ unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
+ unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
+#else
+ time_t st_birthtime;
+ long st_birthtimensec;
+ unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
+ unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
+#endif
+};
+
+// This structure is a duplicate of if_data on FreeBSD 8-STABLE.
+// See /usr/include/net/if.h.
+struct if_data8 {
+ u_char ifi_type;
+ u_char ifi_physical;
+ u_char ifi_addrlen;
+ u_char ifi_hdrlen;
+ u_char ifi_link_state;
+ u_char ifi_spare_char1;
+ u_char ifi_spare_char2;
+ u_char ifi_datalen;
+ u_long ifi_mtu;
+ u_long ifi_metric;
+ u_long ifi_baudrate;
+ u_long ifi_ipackets;
+ u_long ifi_ierrors;
+ u_long ifi_opackets;
+ u_long ifi_oerrors;
+ u_long ifi_collisions;
+ u_long ifi_ibytes;
+ u_long ifi_obytes;
+ u_long ifi_imcasts;
+ u_long ifi_omcasts;
+ u_long ifi_iqdrops;
+ u_long ifi_noproto;
+ u_long ifi_hwassist;
+ time_t ifi_epoch;
+ struct timeval ifi_lastchange;
+};
+
+// This structure is a duplicate of if_msghdr on FreeBSD 8-STABLE.
+// See /usr/include/net/if.h.
+struct if_msghdr8 {
+ u_short ifm_msglen;
+ u_char ifm_version;
+ u_char ifm_type;
+ int ifm_addrs;
+ int ifm_flags;
+ u_short ifm_index;
+ struct if_data8 ifm_data;
+};
*/
import "C"
@@ -98,10 +183,6 @@
// Files
-const (
- O_CLOEXEC = 0 // not supported
-)
-
const ( // Directory mode bits
S_IFMT = C.S_IFMT
S_IFIFO = C.S_IFIFO
@@ -119,7 +200,7 @@
S_IXUSR = C.S_IXUSR
)
-type Stat_t C.struct_stat
+type Stat_t C.struct_stat8
type Statfs_t C.struct_statfs
@@ -201,8 +282,10 @@
// Routing and interface messages
const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
+ sizeofIfMsghdr = C.sizeof_struct_if_msghdr
+ SizeofIfMsghdr = C.sizeof_struct_if_msghdr8
+ sizeofIfData = C.sizeof_struct_if_data
+ SizeofIfData = C.sizeof_struct_if_data8
SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
@@ -210,9 +293,13 @@
SizeofRtMetrics = C.sizeof_struct_rt_metrics
)
-type IfMsghdr C.struct_if_msghdr
+type ifMsghdr C.struct_if_msghdr
-type IfData C.struct_if_data
+type IfMsghdr C.struct_if_msghdr8
+
+type ifData C.struct_if_data
+
+type IfData C.struct_if_data8
type IfaMsghdr C.struct_ifa_msghdr
« no previous file with comments | « src/pkg/syscall/mksysnum_freebsd.pl ('k') | src/pkg/syscall/zerrors_freebsd_386.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b