Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Sorry, revert unintentional parts of the...
details: https://anonhg.NetBSD.org/src/rev/03ab99240264
branches: trunk
changeset: 461180:03ab99240264
user: rin <rin%NetBSD.org@localhost>
date: Mon Nov 18 04:17:08 2019 +0000
description:
Sorry, revert unintentional parts of the previous commit:
http://mail-index.netbsd.org/source-changes/2019/11/18/msg110946.html
I was going to commit only netbsd32_signal.c.
diffstat:
sys/compat/netbsd32/netbsd32.h | 23 ++++++++++++-------
sys/compat/netbsd32/netbsd32_conv.h | 6 ++--
sys/compat/netbsd32/netbsd32_ioctl.c | 42 ++---------------------------------
sys/compat/netbsd32/netbsd32_ioctl.h | 7 +-----
4 files changed, 21 insertions(+), 57 deletions(-)
diffs (202 lines):
diff -r 6634dfd79d46 -r 03ab99240264 sys/compat/netbsd32/netbsd32.h
--- a/sys/compat/netbsd32/netbsd32.h Mon Nov 18 04:09:53 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32.h Mon Nov 18 04:17:08 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32.h,v 1.129 2019/11/18 04:09:53 rin Exp $ */
+/* $NetBSD: netbsd32.h,v 1.130 2019/11/18 04:17:08 rin Exp $ */
/*
* Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -37,7 +37,6 @@
*/
#include <sys/param.h> /* precautionary upon removal from ucred.h */
-#include <sys/types.h>
#include <sys/systm.h>
#include <sys/mount.h>
#include <sys/stat.h>
@@ -73,11 +72,7 @@
typedef int32_t netbsd32_intptr_t;
typedef uint32_t netbsd32_uintptr_t;
-/*
- * netbsd32_[u]int64 are machine dependent and defined in <sys/types.h>:
- * 64 bit integers only have 4-byte alignment on some 32 bit ports,
- * but always have 8-byte alignment on 64 bit systems.
- */
+/* netbsd32_[u]int64 are machine dependent and defined below */
/*
* machine dependant section; must define:
@@ -159,6 +154,15 @@
#undef NETBSD32_POINTER_TYPE
/*
+ * 64 bit integers only have 4-byte alignment on some 32 bit ports,
+ * but always have 8-byte alignment on 64 bit systems.
+ * NETBSD32_INT64_ALIGN may be __attribute__((__aligned__(4)))
+ */
+typedef int64_t netbsd32_int64 NETBSD32_INT64_ALIGN;
+typedef uint64_t netbsd32_uint64 NETBSD32_INT64_ALIGN;
+#undef NETBSD32_INT64_ALIGN
+
+/*
* all pointers are netbsd32_pointer_t (defined in <machine/netbsd32_machdep.h>)
*/
@@ -208,13 +212,14 @@
/* from <sys/time.h> */
typedef int32_t netbsd32_timer_t;
+typedef int32_t netbsd32_time50_t;
typedef netbsd32_int64 netbsd32_time_t;
typedef netbsd32_pointer_t netbsd32_timerp_t;
typedef netbsd32_pointer_t netbsd32_clockidp_t;
typedef netbsd32_pointer_t netbsd32_timespec50p_t;
struct netbsd32_timespec50 {
- int32_t tv_sec; /* seconds */
+ netbsd32_time50_t tv_sec; /* seconds */
netbsd32_long tv_nsec; /* and nanoseconds */
};
@@ -226,7 +231,7 @@
typedef netbsd32_pointer_t netbsd32_timeval50p_t;
struct netbsd32_timeval50 {
- netbsd32_long tv_sec; /* seconds */
+ netbsd32_time50_t tv_sec; /* seconds */
netbsd32_long tv_usec; /* and microseconds */
};
diff -r 6634dfd79d46 -r 03ab99240264 sys/compat/netbsd32/netbsd32_conv.h
--- a/sys/compat/netbsd32/netbsd32_conv.h Mon Nov 18 04:09:53 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_conv.h Mon Nov 18 04:17:08 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_conv.h,v 1.41 2019/11/18 04:09:53 rin Exp $ */
+/* $NetBSD: netbsd32_conv.h,v 1.42 2019/11/18 04:17:08 rin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -58,7 +58,7 @@
struct netbsd32_timeval50 *tv32)
{
- tv32->tv_sec = (netbsd32_long)tv->tv_sec;
+ tv32->tv_sec = (netbsd32_time50_t)tv->tv_sec;
tv32->tv_usec = (netbsd32_long)tv->tv_usec;
}
@@ -152,7 +152,7 @@
struct netbsd32_timespec50 *s32p)
{
- s32p->tv_sec = (int32_t)p->tv_sec;
+ s32p->tv_sec = (netbsd32_time50_t)p->tv_sec;
s32p->tv_nsec = (netbsd32_long)p->tv_nsec;
}
diff -r 6634dfd79d46 -r 03ab99240264 sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c Mon Nov 18 04:09:53 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c Mon Nov 18 04:17:08 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.c,v 1.105 2019/11/18 04:09:53 rin Exp $ */
+/* $NetBSD: netbsd32_ioctl.c,v 1.106 2019/11/18 04:17:08 rin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.105 2019/11/18 04:09:53 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.106 2019/11/18 04:17:08 rin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
@@ -1066,30 +1066,6 @@
}
#endif
-#ifdef COMPAT_50
-static void
-netbsd32_ioctl_to_timeval50(
- const struct netbsd32_timeval50 *s32p,
- struct timeval50 *p,
- u_long cmd)
-{
-
- p->tv_sec = s32p->tv_sec;
- p->tv_usec = s32p->tv_usec;
-}
-
-static void
-netbsd32_ioctl_from_timeval50(
- const struct timeval50 *p,
- struct netbsd32_timeval50 *s32p,
- u_long cmd)
-{
-
- s32p->tv_sec = (netbsd32_long)p->tv_sec;
- s32p->tv_usec = (netbsd32_long)p->tv_usec;
-}
-#endif
-
/*
* main ioctl syscall.
*
@@ -1427,28 +1403,16 @@
case BIOCSETF32:
IOCTL_STRUCT_CONV_TO(BIOCSETF, bpf_program);
-#ifdef COMPAT_50
-#define netbsd32_to_timeval50 netbsd32_ioctl_to_timeval50
-#define netbsd32_from_timeval50 netbsd32_ioctl_from_timeval50
- case BIOCSORTIMEOUT32:
- IOCTL_STRUCT_CONV_TO(BIOCSORTIMEOUT, timeval50);
- case BIOCGORTIMEOUT32:
- IOCTL_STRUCT_CONV_TO(BIOCGORTIMEOUT, timeval50);
-#undef netbsd32_to_timeval50
-#undef netbsd32_from_timeval50
-#endif
case BIOCSTCPF32:
IOCTL_STRUCT_CONV_TO(BIOCSTCPF, bpf_program);
case BIOCSUDPF32:
IOCTL_STRUCT_CONV_TO(BIOCSUDPF, bpf_program);
case BIOCGDLTLIST32:
IOCTL_STRUCT_CONV_TO(BIOCGDLTLIST, bpf_dltlist);
+ case BIOCSRTIMEOUT32:
#define netbsd32_to_timeval(s32p, p, cmd) netbsd32_to_timeval(s32p, p)
#define netbsd32_from_timeval(p, s32p, cmd) netbsd32_from_timeval(p, s32p)
- case BIOCSRTIMEOUT32:
IOCTL_STRUCT_CONV_TO(BIOCSRTIMEOUT, timeval);
- case BIOCGRTIMEOUT32:
- IOCTL_STRUCT_CONV_TO(BIOCGRTIMEOUT, timeval);
#undef netbsd32_to_timeval
#undef netbsd32_from_timeval
diff -r 6634dfd79d46 -r 03ab99240264 sys/compat/netbsd32/netbsd32_ioctl.h
--- a/sys/compat/netbsd32/netbsd32_ioctl.h Mon Nov 18 04:09:53 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.h Mon Nov 18 04:17:08 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.h,v 1.69 2019/11/18 04:09:53 rin Exp $ */
+/* $NetBSD: netbsd32_ioctl.h,v 1.70 2019/11/18 04:17:08 rin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -116,15 +116,10 @@
};
#define BIOCSETF32 _IOW('B',103, struct netbsd32_bpf_program)
-#ifdef COMPAT_50
-#define BIOCSORTIMEOUT32 _IOW('B',109, struct netbsd32_timeval50)
-#define BIOCGORTIMEOUT32 _IOR('B',110, struct netbsd32_timeval50)
-#endif
#define BIOCSTCPF32 _IOW('B',114, struct netbsd32_bpf_program)
#define BIOCSUDPF32 _IOW('B',115, struct netbsd32_bpf_program)
#define BIOCGDLTLIST32 _IOWR('B',119, struct netbsd32_bpf_dltlist)
#define BIOCSRTIMEOUT32 _IOW('B',122, struct netbsd32_timeval)
-#define BIOCGRTIMEOUT32 _IOR('B',123, struct netbsd32_timeval)
struct netbsd32_wsdisplay_addscreendata {
Home |
Main Index |
Thread Index |
Old Index