Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/sys
Hi,
Thanks for your fix.
It works fine for me.
"Taylor R Campbell" <riastradh%netbsd.org@localhost> writes:
> Module Name: src
> Committed By: riastradh
> Date: Sat May 25 13:44:48 UTC 2024
>
> Modified Files:
> src/sys/sys: ucontext.h
>
> Log Message:
> ucontext.h: Expose __UCONTEXT_SIZE to userland.
>
> But don't expose __CTASSERT(__UCONTEXT_SIZE == sizeof(ucontext_t)) to
> userland.
>
> - __UCONTEXT_SIZE will be needed soon by libc and signal trampolines
> in order to version ucontext so we can safely expand it with
> architecture extensions.
>
> - __CTASSERT is not safe to use in header files in arbitrary
> compilation environments (although in the NetBSD kernel build it is
> safe). Exposing the __CTASSERT in a header file used by userland
> appears to have the side effect of breaking the Firefox build in
> rustc, though the mechanism isn't entirely clear.
>
> Firefox/rustc discussion here:
> https://mail-index.netbsd.org/pkgsrc-users/2024/05/18/msg039578.html
>
> Let's see if this makes a difference -- if it works, great; if not,
> maybe it will help us to narrow down what's happening with rustc and
> Firefox.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.23 -r1.24 src/sys/sys/ucontext.h
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
> Modified files:
>
> Index: src/sys/sys/ucontext.h
> diff -u src/sys/sys/ucontext.h:1.23 src/sys/sys/ucontext.h:1.24
> --- src/sys/sys/ucontext.h:1.23 Fri May 24 13:50:30 2024
> +++ src/sys/sys/ucontext.h Sat May 25 13:44:48 2024
> @@ -1,4 +1,4 @@
> -/* $NetBSD: ucontext.h,v 1.23 2024/05/24 13:50:30 ryoon Exp $ */
> +/* $NetBSD: ucontext.h,v 1.24 2024/05/25 13:44:48 riastradh Exp $ */
>
> /*-
> * Copyright (c) 1999, 2003, 2024 The NetBSD Foundation, Inc.
> @@ -82,6 +82,10 @@ struct __ucontext {
> #define _UC_UCONTEXT_ALIGN (~0)
> #endif
>
> +#ifndef __UCONTEXT_SIZE
> +#define __UCONTEXT_SIZE sizeof(ucontext_t)
> +#endif
> +
> #ifndef _UC_TLSBASE
> #error _UC_TLSBASE not defined.
> #endif
> @@ -105,8 +109,6 @@ int cpu_mcontext_validate(struct lwp *,
>
> #ifdef __UCONTEXT_SIZE
> __CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
> -#else
> -#define __UCONTEXT_SIZE sizeof(ucontext_t)
> #endif
> #endif /* _KERNEL */
>
>
--
Ryo ONODERA // ryo%tetera.org@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
Home |
Main Index |
Thread Index |
Old Index