From patchwork Fri May 26 10:48:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 41845 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c51c:b0:10c:5e6f:955f with SMTP id gm28csp1228190pzb; Fri, 26 May 2023 03:48:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4h77IMiFVPPbkhv62kSZcwM+oFnUDRBIJdFo3FQKw5LzPLkalMfRbJJF558faHmSSyVpwk X-Received: by 2002:a05:6402:70b:b0:506:b228:7b03 with SMTP id w11-20020a056402070b00b00506b2287b03mr1154230edx.13.1685098129355; Fri, 26 May 2023 03:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685098129; cv=none; d=google.com; s=arc-20160816; b=hJNG+VBaxK/ILuecRfrZIXMG1cEqO1ZCab0jXokq+NW0cvmQshAAH+QfWfnvWb9Ei+ jWAjnu0dVy1X9lVLTjbIAYHCoKf6lYqWsqK2C+RkmWgqRj2PTxhmASFrI/9RQU3HBwVb VUWXHV9opFuRa1l4yDIToIx2BX984GORLFmzn/944YWPRUlC8FXQcvjXwfxs7xQwyQht MvRzJI1KQVbzF5/PD+QO1lEzdNSe901HlqpWK709hNSf8fGThjG/KBrEcEvuodxBP1Hk ttyBre5EwTUghg3QuZaDuRyWGMigP7iW0pZh0vk8Gf19Ehk7ViFrjwPZ5fehDOco30nx F8ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=XLR2XzPMRBPLU+fwaF5oGVZRUdJKOrMs0CN9ZDScWRc=; b=RHCNlXyP8Inq4+xcn5YIvxdZiIB6wSh1l0yDQwyB+dVHG/ZmSyZuROUQPsSB7wEWFW AASs75LT4UIlMd4v0dno5Dd7Ua39RJQzosTTScilzzaOwt+G36iH9900h8unw84xY2hU ueFsQ5vVNhPA+byWhztpVUtnp7R7C9pfZ5WeQuv3HTX3mo7NiJkqI8eY7/hQ7ns9V3xP KMz2ekmd14OjfDFpNg97Yyk15pPPFg7D7dhIlwlVi0PAgvAJZ/NL85csbMcTAx3I+1Zs tYTXIeLBvjVL2/vMbLfqcSCNuYqiF++VsGbUZ37bu+GsuQOHaLJRxkbeK7mtzvxqu0AB iqdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20221208.gappssmtp.com header.s=20221208 header.b=SyZPtK8z; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a18-20020aa7d752000000b0050be0149dccsi147139eds.198.2023.05.26.03.48.48; Fri, 26 May 2023 03:48:49 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20221208.gappssmtp.com header.s=20221208 header.b=SyZPtK8z; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A235768C1CA; Fri, 26 May 2023 13:48:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 57EB468C16A for ; Fri, 26 May 2023 13:48:39 +0300 (EEST) Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2afb2874e83so6294111fa.0 for ; Fri, 26 May 2023 03:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20221208.gappssmtp.com; s=20221208; t=1685098118; x=1687690118; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=YCdPUYeL7UgkGja9yByMMLZTlenlqCkg/M/gU3vNEAY=; b=SyZPtK8zfwkC19g3AGTME1RbhcDXxodwWHzAS48o2ZhAFmPQ2EoF/7Pi9kSOkfR8to B13P7+sqdQpG2V38C2lxj5eJuuYJJapxEu7jNAzQJgCXPE4UyARKMvvUVdhDIqq6fdc7 DJ3hg8COEd+WrApYthUnJnx6VnxqysmhQh7G8hyJ7SFVY96lL9J9I0zzhF57BfbZ/Zkd uXRd39EBDdMoVtd4VNhr0LTTH2a2pZccFnngACzqJhiOyyUM6+1W2Q0FeyKqcBkCCuoN FM4mp4oGgipfv6FsVXTcQkpe3q6LX+w/KiiOv+6/bL0aQdoi5YwHfleI32MnkdXfHWuE L2+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685098118; x=1687690118; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YCdPUYeL7UgkGja9yByMMLZTlenlqCkg/M/gU3vNEAY=; b=VtrDSZYPARa/Hvu6LYyiQsTvV/M6S356dfoorlbDuhWH1UIg9mmbXEIdxZM3U4iD2A H1+9V+I5hufnc8Lj2OOsjiq/J6fviCpVOzPW7/EhrBH+voSN4fgzd/BSVDAmpMMKu5d2 CMPiD6QEUDXzlNLevyTUoSauFHaYs3m/1t8WJjCffGXJbJ5yyrMensQLlC9j/5U/9q0w LURIRIlOvlxEzgxLEDAiRkA0veZb0DIAfipKnL6ZkixV1aFGrPip0FKMClIHkrXtPCk0 ySjR7LjW+viBQIB+1U2m65nPimv7H/krRdFmogfTJjiNB2AAfwAR6syhDVLCJRTPZJ6x 33oQ== X-Gm-Message-State: AC+VfDzDVKwxd18QatLohRKD/DQWDlYw+vaIdF/itzsJrmpU4cyM5ZXM jyD/3A23WGBV12INEosiEbrpPbP7ZDnXUerx9EYmEg== X-Received: by 2002:a2e:7401:0:b0:2ac:7d7e:a503 with SMTP id p1-20020a2e7401000000b002ac7d7ea503mr456462ljc.36.1685098118438; Fri, 26 May 2023 03:48:38 -0700 (PDT) Received: from localhost (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id r26-20020a2e80da000000b002ac7a25c001sm656810ljg.24.2023.05.26.03.48.38 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 26 May 2023 03:48:38 -0700 (PDT) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 May 2023 13:48:37 +0300 Message-Id: <20230526104837.20594-1-martin@martin.st> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] configure: Stop undeffing __STRICT_ANSI__ for mingw/cygwin targets X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mrm4DiKGeqQN The undeffing of __STRICT_ANSI__ was introduced for mingw in 5666a9f20c6ef2b207e0517c8eeb9556badf76a3 (in March 2011) and for Cygwin and DOS in a7a187a1beb8551101b592bf85f0f31a0db22f61 (in May 2011). The reason for undeffing it was that it hides some functions which we might rely on; in particular, strcasecmp was mentioned. We stopped using the strcasecmp function in November 2011 in bb3244dee26e3c500b14830e9500cb2d3658f809, by making our own locale independent version. Building with both old (not too old for building to fail otherwise) and current versions of mingw-w64 still seem to work without this. This avoids a warning with Clang 17 (present since https://reviews.llvm.org/D144654), warning about undeffing a builtin macro for each compilation command, with warnings like this: In file included from :394: :4:8: warning: undefining builtin macro [-Wbuiltin-macro-redefined] Keep the undef for DOS targets; DJGPP's errno.h omits the definition of most constants if __STRICT_ANSI__ is defined (but building with that toolchain fails is somewhat broken anyway). --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 87f7afc2e1..563a101b64 100755 --- a/configure +++ b/configure @@ -5778,7 +5778,7 @@ probe_libc(){ # MinGW headers can be installed on Cygwin, so check for newlib first. elif test_${pfx}cpp_condition newlib.h "defined _NEWLIB_VERSION"; then eval ${pfx}libc_type=newlib - add_${pfx}cppflags -U__STRICT_ANSI__ -D_XOPEN_SOURCE=600 + add_${pfx}cppflags -D_XOPEN_SOURCE=600 # MinGW64 is backwards compatible with MinGW32, so check for it first. elif test_${pfx}cpp_condition _mingw.h "defined __MINGW64_VERSION_MAJOR"; then eval ${pfx}libc_type=mingw64 @@ -5786,7 +5786,7 @@ probe_libc(){ add_compat msvcrt/snprintf.o add_cflags "-include $source_path/compat/msvcrt/snprintf.h" fi - add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 + add_${pfx}cppflags -D__USE_MINGW_ANSI_STDIO=1 eval test \$${pfx_no_}cc_type = "gcc" && add_${pfx}cppflags -D__printf__=__gnu_printf__ test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" && @@ -5798,7 +5798,7 @@ probe_libc(){ test_${pfx}cpp_condition _mingw.h "__MINGW32_MAJOR_VERSION > 3 || \ (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" || die "ERROR: MinGW32 runtime version must be >= 3.15." - add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 + add_${pfx}cppflags -D__USE_MINGW_ANSI_STDIO=1 test_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700" && add_${pfx}cppflags -D__MSVCRT_VERSION__=0x0700 test_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&