aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/golang.org/x/sys/unix/types_freebsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/unix/types_freebsd.go')
-rw-r--r--vendor/golang.org/x/sys/unix/types_freebsd.go79
1 files changed, 25 insertions, 54 deletions
diff --git a/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go
index e84a892..7470798 100644
--- a/vendor/golang.org/x/sys/unix/types_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/types_freebsd.go
@@ -14,7 +14,11 @@ Input to cgo -godefs. See README.md
package unix
/*
-#define KERNEL
+#define _WANT_FREEBSD11_STAT 1
+#define _WANT_FREEBSD11_STATFS 1
+#define _WANT_FREEBSD11_DIRENT 1
+#define _WANT_FREEBSD11_KEVENT 1
+
#include <dirent.h>
#include <fcntl.h>
#include <poll.h>
@@ -22,7 +26,7 @@ package unix
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
-#include <sys/capability.h>
+#include <sys/capsicum.h>
#include <sys/event.h>
#include <sys/mman.h>
#include <sys/mount.h>
@@ -63,50 +67,6 @@ struct sockaddr_any {
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 {
@@ -154,14 +114,14 @@ struct if_msghdr8 {
*/
import "C"
-// Machine characteristics; for internal use.
+// Machine characteristics
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
@@ -189,14 +149,25 @@ type _Gid_t C.gid_t
// Files
-type Stat_t C.struct_stat8
+const (
+ _statfsVersion = C.STATFS_VERSION
+ _dirblksiz = C.DIRBLKSIZ
+)
+
+type Stat_t C.struct_stat
+
+type stat_freebsd11_t C.struct_freebsd11_stat
type Statfs_t C.struct_statfs
+type statfs_freebsd11_t C.struct_freebsd11_statfs
+
type Flock_t C.struct_flock
type Dirent C.struct_dirent
+type dirent_freebsd11 C.struct_freebsd11_dirent
+
type Fsid C.struct_fsid
// File system limits
@@ -279,7 +250,7 @@ const (
// Events (kqueue, kevent)
-type Kevent_t C.struct_kevent
+type Kevent_t C.struct_kevent_freebsd11
// Select