From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 962B41F451 for ; Wed, 3 Jan 2024 21:09:03 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=DkZ4asmA; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 49904385828D for ; Wed, 3 Jan 2024 21:09:02 +0000 (GMT) Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by sourceware.org (Postfix) with ESMTPS id BFD4C3858D38 for ; Wed, 3 Jan 2024 21:08:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BFD4C3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BFD4C3858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704316121; cv=none; b=dwX9HKnJ2t03h18ZzAVJQg9uwVkbvmMqS1XuEbkzlUE+OHCDozuv+uRhjOOyF/KQpQwpv81zi2jQnIdVMH8IWyl/ch2xpnTg/VZ7o0yvSLnUi5MV3YTINi4qHsIIuljHGf+PrOPlk3D0W3PHpMz3vG3RQ0KTfftDHB/GR4eFLLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704316121; c=relaxed/simple; bh=k+ROCwSJynY8JLO3aDFpGOu2ylDw8yBwiUWUF4I2uMw=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=SlC6BkXDug2mUWpR/Tg+G/iUXYbkM14N0WvkfmbNebk9tc88TNLruiHpEAawp2/uvBxUi4BtqL4C2ctCfyZjwb2rDmj0NeaB85AKnujFOQ3uxeDn8jAZwPGjrxa0LZrfPSxd2V7iEMzsRvljUXa5XTb0worfb8GP6+YqU0CPQ4M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-2055f5ad1f2so718166fac.0 for ; Wed, 03 Jan 2024 13:08:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704316119; x=1704920919; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ImicscodPaZ3w8N7rrUJKoewVAohWljZaODOvjELLrU=; b=DkZ4asmAQEJBJXU97iwx2MwYiezoJ71ydqEAoLPKCLdmJQJOHQ5Q4x3scw0hStd2Od yLqaxajXNo3GJifwnnj9nff0mWyBvroIXUkSf/J+ezHJ6Mea3u5M/kDBnp3U2uoghmnz FzZSOMXG2rf+xodXYa2/SvrlnizKZUfqiQLEIOp6imj3BqV+UHfx407E6NadhYB25KkP E5eXyvUwVHjfDR0Xogl/Z62kvnqJKVbwoRdl4F0Fi+JslJM1iIMDtYd6yU2UkSM0euTy g2f9Eh5DBWRLml1SY2OdQ1oYEIvglWpiHrgB31iqExfP64Fjsd7IPH34g4P5mkWDoa+4 Tavw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704316119; x=1704920919; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ImicscodPaZ3w8N7rrUJKoewVAohWljZaODOvjELLrU=; b=VKjcRLw/JyY5FOZ2Db263Rc20BbLo7Y5iHYRBlaT6NXT+TMcvKYiwxtbe1f0RcVtHY 71ONFJtoSLJC5ilBADcU221PvC8bNqbDEDlEXZBm0FcMIVs3Suw2f+K2VFxxD0Lz99Su aR1WvRlFv2gZLsOYHXFttDF+etbWkBygzMzP4B0TvBNo2p/OnfP/021rb/w7tfy/Rh7S 30SZgfe3qI0p2pu+dSDxrTDKeQgwG/j45IhTcEBBxOnip6/DHQxNb+85EOPEhchuIVGk 21AKCmhXKcmQuGoiDA4dYD2zkV4w6EsAjbL58yhJddxyzAFDMhtGX0L8i41ftootm7v/ kdGg== X-Gm-Message-State: AOJu0Yw0NKuSgPkn40kbAdxAsq+BxyQIV52NLhfgtcxZ38kYYrYAtLZp xSiFujBaVFwDgZPpsAIjflUSIVNld56DHrJZOMOoqZZXxPY= X-Google-Smtp-Source: AGHT+IEzj5sViAYXmCguI24NnDBpHLwkj6yK7cT2PBtQBz428j2/y6Zn/3kaRP1a30Ut36IwwDqOwOA6PX7BEp69jxU= X-Received: by 2002:a05:6870:e2ce:b0:204:3fd6:dd7b with SMTP id w14-20020a056870e2ce00b002043fd6dd7bmr9367447oad.70.1704316118591; Wed, 03 Jan 2024 13:08:38 -0800 (PST) MIME-Version: 1.0 References: <20240103171502.1358371-1-bugaevc@gmail.com> <20240103171502.1358371-2-bugaevc@gmail.com> <20240103204314.wpyy2tv33x4sdl37@begin> In-Reply-To: <20240103204314.wpyy2tv33x4sdl37@begin> From: Sergey Bugaev Date: Thu, 4 Jan 2024 00:08:27 +0300 Message-ID: Subject: Re: [PATCH 01/23] hurd: Add some missing includes To: Samuel Thibault Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org On Wed, Jan 3, 2024 at 11:43=E2=80=AFPM Samuel Thibault wrote: > Sergey Bugaev, le mer. 03 janv. 2024 20:14:34 +0300, a ecrit: > > diff --git a/sysdeps/hurd/include/hurd.h b/sysdeps/hurd/include/hurd.h > > index 568092d6..189fd44e 100644 > > --- a/sysdeps/hurd/include/hurd.h > > +++ b/sysdeps/hurd/include/hurd.h > > @@ -1,4 +1,5 @@ > > #ifndef _HURD_H > > +#include > > #include_next > > > > void _hurd_libc_proc_init (char **argv); > > diff --git a/sysdeps/hurd/include/hurd/signal.h b/sysdeps/hurd/include/= hurd/signal.h > > index 1dc8a1f3..9b1bf3df 100644 > > --- a/sysdeps/hurd/include/hurd/signal.h > > +++ b/sysdeps/hurd/include/hurd/signal.h > > @@ -6,6 +6,7 @@ extern struct hurd_sigstate *_hurd_self_sigstate (void)= __attribute__ ((__const_ > > libc_hidden_proto (_hurd_self_sigstate) > > #endif > > > > +#include > > #include_next > > > > #ifndef _ISOMAC > > Why? Because hurd/hurd/signal.h is using tls.h macros (THREAD_GETMEM / THREAD_SETMEM / THREAD_SELF), guarded under "defined _LIBC", and sysdeps/hurd/include/hurd/signal.h being the internal version of that header seemed to be the appropriate place to add the missing #include . Otherwise, I get this: In file included from ../sysdeps/hurd/include/hurd/signal.h:9, from siginfo.c:18: ../hurd/hurd/signal.h: In function =E2=80=98_hurd_self_sigstate=E2=80=99: ../hurd/hurd/signal.h:169:30: error: implicit declaration of function =E2=80=98THREAD_GETMEM=E2=80=99 [-Wimplicit-function-declaration] 169 | struct hurd_sigstate *ss =3D THREAD_GETMEM (THREAD_SELF, _hurd_sigstate); and so on. This must have happened to work on both x86 architectures due to some other header implicitly pulling in, but we should not rely on that. Perhaps a better solution would be to move the inline versions of _hurd_self_sigstate and _hurd_critical_section_lock/unlock to the internal header. Is there any reason why they have to be in the public one? > These are breaking hurd/check-installed-headers-c Indeed, thanks for pointing that out. But the error I seem to get: :: hurd.h :::: In file included from ../sysdeps/unix/i386/sysdep.h:18, from ../sysdeps/mach/x86/sysdep.h:47, from ../sysdeps/mach/hurd/tls.h:27, from ../sysdeps/mach/hurd/i386/tls.h:24, from ../sysdeps/hurd/include/hurd.h:2, from /tmp/cih_test_z99fCI.c:10: ../sysdeps/unix/sysdep.h:111:5: error: "IS_IN" is not defined, evaluates to 0 [-Werror=3Dundef] 111 | #if IS_IN (rtld) | ^~~~~ ../sysdeps/unix/sysdep.h:111:11: error: missing binary operator before toke= n "(" 111 | #if IS_IN (rtld) | ^ ../sysdeps/mach/hurd/i386/tls.h:123:32: error: missing binary operator before token "(" 123 | #if !defined (SHARED) || IS_IN (rtld) | ^ ../sysdeps/mach/hurd/i386/tls.h: In function =E2=80=98_hurd_tls_fork=E2=80= =99: ../sysdeps/mach/hurd/i386/tls.h:379:3: error: unknown type name =E2=80=98er= ror_t=E2=80=99 379 | error_t err; | ^~~~~~~ ...makes no sense. This is testing installed headers, isn't it? =E2=80=94 t= hen how come sysdeps/hurd/include/hurd.h is what gets found for ? I'm rather sure the installed is a different file. So it would look like the test setup is broken, and this patch just exposes that. Sergey