From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eMDbIt8R6mR0NQAA9RJhRA:P1 (envelope-from ) for ; Sat, 26 Aug 2023 16:53:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eMDbIt8R6mR0NQAA9RJhRA (envelope-from ) for ; Sat, 26 Aug 2023 16:53:19 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2A92C571B6 for ; Sat, 26 Aug 2023 16:53:19 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20221208 header.b=EpdZ0Dcv; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693061599; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=vqvDTWpjb6Wf3sxe+anOzbwx+3jQ6dNb0uAMZJMAXXQ=; b=uThWh/AHhaL1StK0VC5VXIngdQa74AB3ZXi/av++yJHHLJrdtv2B8n/xRhzIK2NUR4it4c htH9oif/R9ugq5NrzpgYA38wS42tmKkfYsGIljx6FWL28uizk9zZeQzemQDZSL3U6P88+g tqfYPdVZfDFB5DeIpNbYPPSfHbERWvVEAWedGxi4Ph9W7sxMzZ7HD8k0QPm0jd+XXDFSVq i7IQSK8LxxNhybaSAWFU//5xtqMdFYB9HsZDc3xXGmS/bHiPJH4w1OusgEPfZdkvXqIoCX nJrF3vrZxwgp7UUgqT2Tqg+8+eDJNeP7GL13wPeEplURdwxEE5E2Z8WD5ajP3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20221208 header.b=EpdZ0Dcv; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693061599; a=rsa-sha256; cv=none; b=kvpvkrGfpTgO0NJ40906GJWV3ci23/7KuF2gu8Lhj2SxlZ1yBLJ3wegKz/OLiCqu5b+heF 0UqNUlVQM8hutBLNDOs3/yvnFQpDZ+yEUCnW0oJSxV9aroP+XErz+QON166MEspk/+R/qU 1xAr4oekxaka2mU5IGEhm2VzA2Jc5ElEdWojsmeO2bZ8zMgMBEzgEAKAhCBiRRdruTq6X/ E/LmYdKrZDP8pk9/Yz4BZ497lld2RkCVBSQkY87HQIdrJYtMgoGGUEQKcc80qnG1u2PF3/ hNCVbTWRXAeOctxkc8l0zJVgnSPYoq1U9L038kfkv4BG9ZGvobsqGBznnYcD9A== Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id CEFC75F3E4; Sat, 26 Aug 2023 14:53:16 +0000 (UTC) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by mail.notmuchmail.org (Postfix) with ESMTPS id 2DB745E01C for ; Sat, 26 Aug 2023 14:53:15 +0000 (UTC) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-52a4818db4aso2449055a12.2 for ; Sat, 26 Aug 2023 07:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693061594; x=1693666394; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=NGAbWYgPf6T+N8Hm6Yjq3GpSuCUZee6/m4oyEGmlR/c=; b=EpdZ0DcvfoFquL8YDddM+eBxF4HnEF4H65P7ELM1xMSllWko6xN9wNxuGcYlUO50pq ZbFnnx/Q/blo4LGJeT7UcPoZRafKnXjjPSvMuuCY+ivFeoCuTwLS2qoFLhnRPFaiOY2g kh1wNm6TeFoN1YbnnnDHuRMRdtOnw/ruf8v/8o978pOB1+ZtneKCVErsbLdBHD2wZ+fH llA24egZ9/9niTFL0SfGUImKK1iFVIp7qkbqUpWk1ARYLTurCKh3G7bzoEaQjvLkjzHN TaRIiHq4tYFeoTEIhA15P84+i+n9jBblQ9WQgwKOTPLYNQHiJisgd5tWsTB5EYtvdVSs Pb/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693061594; x=1693666394; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NGAbWYgPf6T+N8Hm6Yjq3GpSuCUZee6/m4oyEGmlR/c=; b=Eb/5mJfmQA/oGx7SK/TvS5tPDeQTwhekXJW4cdyU9/7Ek9idOQ/GbEsMdR9Amybkh0 6oZSW3QrvpJbCoryuoOZEX+jkai0TybkD3OTf78H3bmGbD4MlM67MOq6WGil5QTf7oTa CwVjkfVFw4bf+XxbeUOiZ2CprKjjtZsAKPNXNzgL3Fgb/nBQxtL0KS80DC1OglSAK0Yv SuoW8wnSSJmRWyQYiEMFlXQStOpDv7x62+A17q7SvrNVRXoL4wqoNs/gBPxDroVR2uHc qwWj5r+4w3aFns3pS5/mmKeufDHb5ImZMrGbDfrIyQHBXj3rvtOliWxFpztNoJ0Ggx/Z rJjA== X-Gm-Message-State: AOJu0Yx5iLBS4SDh5Lv3zp/DUQs0ThIaOqmpx0UgZfNiHH5qrmg64BoS z5nR426fxyonCuPz++/5qOA9VUDYsvq1Eg== X-Google-Smtp-Source: AGHT+IFNyh9AIk+Gt5nk+KFg9qGzrUAPpTq6WeOunAp1omBZjspYNaKXgEtnoW/rzEwF2cEbBTEdcw== X-Received: by 2002:aa7:d6cd:0:b0:526:9cfb:c12 with SMTP id x13-20020aa7d6cd000000b005269cfb0c12mr15793943edr.38.1693061593915; Sat, 26 Aug 2023 07:53:13 -0700 (PDT) Received: from localhost ([2001:9e8:6a5b:8700:d2c9:abff:daa4:c590]) by smtp.gmail.com with ESMTPSA id b14-20020a05640202ce00b00522572f323dsm2235428edx.16.2023.08.26.07.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Aug 2023 07:53:13 -0700 (PDT) Sender: Michael J Gruber From: michaeljgruber+grubix+git@gmail.com To: notmuch@notmuchmail.org Subject: [PATCH] compat: probe for strcasestr more thoroughly Date: Sat, 26 Aug 2023 16:53:12 +0200 Message-ID: X-Mailer: git-send-email 2.42.0.290.gfcfb41f205 MIME-Version: 1.0 Message-ID-Hash: C5RB4VWSTMUNS623SK46VR6KAVLKLQL2 X-Message-ID-Hash: C5RB4VWSTMUNS623SK46VR6KAVLKLQL2 X-MailFrom: michaeljgruber+grubix+git@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Michael J Gruber , Thomas Schneider , Florian Weimer , Tomi Ollila X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: 3.44 X-Spam-Score: 3.44 X-Migadu-Queue-Id: 2A92C571B6 X-TUID: 1fcA6XD3OpKf From: Michael J Gruber Depending on compiler (gcc, g++, clang) and standard options (c99, c11), string.h may or may not include strings.h, leading to possibly missing or conflicting declarations of strcasestr. Include both so that both detection and compilation phases use the same (possibly optimised) implementations. Suggested-by: Thomas Schneider Suggested-by: Florian Weimer Suggested-by: Tomi Ollila --- This is related to the discussion here: https://nmbug.notmuchmail.org/nmweb/show/20221202191908.848227-1-qsx%40chaotikum.eu> We've been carrying FW's version of the patch in Fedora since January. The one here is TO's version of TS's original and tested in Fedora. compat/have_strcasestr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compat/have_strcasestr.c b/compat/have_strcasestr.c index 3cd1838d..8e004572 100644 --- a/compat/have_strcasestr.c +++ b/compat/have_strcasestr.c @@ -1,5 +1,6 @@ #define _GNU_SOURCE -#include +#include /* strcasecmp() in POSIX */ +#include /* strcasecmp() in *BSD */ int main () -- 2.42.0.290.gfcfb41f205