From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 080AB1F8C6 for ; Sat, 21 Aug 2021 22:37:06 +0000 (UTC) Received: from localhost ([::1]:40250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHZbs-0006bz-NS for normalperson@yhbt.net; Sat, 21 Aug 2021 18:37:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHZbm-0006bX-Ay for bug-gnulib@gnu.org; Sat, 21 Aug 2021 18:36:58 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.21]:29967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHZbk-0000sa-Bi for bug-gnulib@gnu.org; Sat, 21 Aug 2021 18:36:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1629585403; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=a+aN5czEcNnSGYzdl7XS82bkwhYscLXHgFhxx+3qb9E=; b=dL6QWsWCXd7rpAx8MA3U4vR0M1p7bRKmGMO5ZveYlvI2GsuqYcQxnj6aEaU+gJqyKl zPDvQ4ha9JJm8Sevq56K39caG1JyZw29EjJZFj4olsUCMPH0ZAdUWhe+izQZoJQUDA0j 1BiuFZHS9JyFM18Mq38T3r8HNRTKvCCRgMgi2jealZcFFCAXW95HFPTvlaUTLFxgbNkQ nMpWVtQIf0iktF2dcIAeiVri66e4HktDQsOJfQTb898h6jZWz2+Mry56HrWRJcvk2m2Y KFR3a570us4e8MHoOnbv3qgOkkcgGGBdIL1fuk9KYhWYXkBWqMtAoiDuhtSEpU9rYC7O GjqQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94z26ll5ip69pkxF+mpsrYqBZwb0PZI/d+N5vZA==" X-RZG-CLASS-ID: mo00 Received: from omega.localnet by smtp.strato.de (RZmta 47.31.0 AUTH) with ESMTPSA id I0a189x7LMahVJU (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 22 Aug 2021 00:36:43 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: [PATCH] rawmemchr: modernize and simplify Date: Sun, 22 Aug 2021 00:36:42 +0200 Message-ID: <6862331.lOV4Wx5bFT@omega> In-Reply-To: <20210821022616.945879-1-eggert@cs.ucla.edu> References: <20210821022616.945879-1-eggert@cs.ucla.edu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Received-SPF: none client-ip=85.215.255.21; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Eggert Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Paul, > * lib/rawmemchr.c (HAVE_RAWMEMCHR): Assume it=E2=80=99s not defined; > otherwise this file would not be compiled. Unfortunately, this assumption does not hold. This file, when used as part of the 'relocatable-prog-wrapper' module, is compiled unconditionally. $ ./gnulib-tool --find lib/rawmemchr.c rawmemchr relocatable-prog-wrapper In build-aux/install-reloc lines 225..253 the compilation command compiles this file always. The patch thus causes a definition of rawmemchr to be included in the trampoline executables even on platforms that don't need it. This patch should fix it. 2021-08-21 Bruno Haible rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20). * lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR. * modules/relocatable-prog-wrapper (Depends-on): Add stdalign. diff --git a/lib/rawmemchr.c b/lib/rawmemchr.c index 469bfa3cd..e7a00b803 100644 =2D-- a/lib/rawmemchr.c +++ b/lib/rawmemchr.c @@ -19,11 +19,14 @@ /* Specification. */ #include =20 =2D#include =2D#include =2D#include +/* A function definition is only needed if HAVE_RAWMEMCHR is not defined. = */ +#if !HAVE_RAWMEMCHR =20 =2D#include "verify.h" +# include +# include +# include + +# include "verify.h" =20 /* Find the first occurrence of C in S. */ void * @@ -118,3 +121,5 @@ rawmemchr (const void *s, int c_in) char_ptr++; return (void *) char_ptr; } + +#endif diff --git a/modules/relocatable-prog-wrapper b/modules/relocatable-prog-wr= apper index d816033ee..fa5691621 100644 =2D-- a/modules/relocatable-prog-wrapper +++ b/modules/relocatable-prog-wrapper @@ -64,6 +64,7 @@ largefile libc-config pathmax ssize_t +stdalign stdbool stddef stdint