[PATCH] hurd: Exclude more headers when generating errno.h

Samuel Thibault samuel.thibault@gnu.org
Sun Aug 6 20:38:33 GMT 2023


Hello,

Sergey Bugaev, le dim. 04 juin 2023 23:18:30 +0300, a ecrit:
> This both works around ordering issues, and removes an x86-specific file
> from the list.

I completely reworked the way to generate this, to avoid the issue
entirely.

Samuel

> Suggested-by: Joseph Myers <joseph@codesourcery.com>
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
> We could maybe clean this up even further, but -- diminishing returns :|
> 
>  sysdeps/mach/hurd/bits/errno.h | 4 ----
>  sysdeps/mach/hurd/errnos.awk   | 3 +++
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/sysdeps/mach/hurd/bits/errno.h b/sysdeps/mach/hurd/bits/errno.h
> index a0794f96..8b0ee0d7 100644
> --- a/sysdeps/mach/hurd/bits/errno.h
> +++ b/sysdeps/mach/hurd/bits/errno.h
> @@ -1,6 +1,5 @@
>  /* This file generated by errnos.awk from
>       errno.texi
> -     stdc-predef.h
>       libc-symbols.h
>       mach/message.h
>       mach/kern_return.h
> @@ -12,9 +11,6 @@
>       features.h
>       features-time64.h
>       ../sysdeps/generic/features-time64.h
> -     sys/cdefs.h
> -     ../misc/sys/cdefs.h
> -     ../sysdeps/x86/bits/wordsize.h
>       ../sysdeps/ieee754/ldbl-96/bits/long-double.h
>       gnu/stubs.h
>       bits/types.h
> diff --git a/sysdeps/mach/hurd/errnos.awk b/sysdeps/mach/hurd/errnos.awk
> index b9f717c1..6085aad6 100644
> --- a/sysdeps/mach/hurd/errnos.awk
> +++ b/sysdeps/mach/hurd/errnos.awk
> @@ -29,6 +29,9 @@ BEGIN {
>  	if (arg ~ /mach\/.*\/kern_return.h/) continue;
>  	if (arg ~ /mach\/.*\/boolean.h/) continue;
>  	if (arg ~ /mach\/.*\/vm_types.h/) continue;
> +	if (arg ~/.*\/bits\/wordsize.h/) continue;
> +	if (arg ~/.*sys\/cdefs.h/) continue;
> +	if (arg == "stdc-predef.h") continue;
>  	print "     " arg;
>        }
>      print "   Do not edit this file; edit errnos.awk and regenerate it.  */";
> -- 
> 2.40.1


More information about the Libc-alpha mailing list