aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/unix/mkerrors.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/unix/mkerrors.sh')
-rwxr-xr-xvendor/golang.org/x/sys/unix/mkerrors.sh54
1 files changed, 3 insertions, 51 deletions
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 1bd1c9e..bbc6d19 100755
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -16,15 +16,6 @@ if test -z "$GOARCH" -o -z "$GOOS"; then
exit 1
fi
-# Check that we are using the new build system if we should
-if [[ "$GOOS" -eq "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
- if [[ "$GOLANG_SYS_BUILD" -ne "docker" ]]; then
- echo 1>&2 "In the new build system, mkerrors should not be called directly."
- echo 1>&2 "See README.md"
- exit 1
- fi
-fi
-
CC=${CC:-cc}
if [[ "$GOOS" -eq "solaris" ]]; then
@@ -111,36 +102,6 @@ includes_Linux='
#endif
#define _GNU_SOURCE
-// <sys/ioctl.h> is broken on powerpc64, as it fails to include definitions of
-// these structures. We just include them copied from <bits/termios.h>.
-#if defined(__powerpc__)
-struct sgttyb {
- char sg_ispeed;
- char sg_ospeed;
- char sg_erase;
- char sg_kill;
- short sg_flags;
-};
-
-struct tchars {
- char t_intrc;
- char t_quitc;
- char t_startc;
- char t_stopc;
- char t_eofc;
- char t_brkc;
-};
-
-struct ltchars {
- char t_suspc;
- char t_dsuspc;
- char t_rprntc;
- char t_flushc;
- char t_werasc;
- char t_lnextc;
-};
-#endif
-
#include <bits/sockaddr.h>
#include <sys/epoll.h>
#include <sys/inotify.h>
@@ -161,7 +122,6 @@ struct ltchars {
#include <linux/if_addr.h>
#include <linux/falloc.h>
#include <linux/filter.h>
-#include <linux/fs.h>
#include <linux/netlink.h>
#include <linux/random.h>
#include <linux/reboot.h>
@@ -172,7 +132,6 @@ struct ltchars {
#include <linux/icmpv6.h>
#include <linux/serial.h>
#include <linux/can.h>
-#include <linux/vm_sockets.h>
#include <net/route.h>
#include <asm/termbits.h>
@@ -197,11 +156,6 @@ struct ltchars {
// but it is already in bluetooth_linux.go
#undef SOL_BLUETOOTH
#endif
-
-// Certain constants are missing from the fs/crypto UAPI
-#define FS_KEY_DESC_PREFIX "fscrypt:"
-#define FS_KEY_DESC_PREFIX_SIZE 8
-#define FS_MAX_KEY_SIZE 64
'
includes_NetBSD='
@@ -396,13 +350,11 @@ ccflags="$@"
$2 ~ /^CLOCK_/ ||
$2 ~ /^CAN_/ ||
$2 ~ /^ALG_/ ||
- $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ ||
$2 ~ /^GRND_/ ||
$2 ~ /^SPLICE_/ ||
- $2 ~ /^(VM|VMADDR)_/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||
- $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
+ $2 ~ /^BLK/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
@@ -437,7 +389,7 @@ echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
sort >_signal.grep
echo '// mkerrors.sh' "$@"
-echo '// Code generated by the command above; see README.md. DO NOT EDIT.'
+echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT'
echo
echo "// +build ${GOARCH},${GOOS}"
echo
@@ -499,7 +451,7 @@ intcmp(const void *a, const void *b)
int
main(void)
{
- int i, e;
+ int i, j, e;
char buf[1024], *p;
printf("\n\n// Error table\n");