From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 6086E45AC4 for ; Mon, 14 Aug 2023 11:31:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9423868C3AA; Mon, 14 Aug 2023 14:31:02 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E880268C337 for ; Mon, 14 Aug 2023 14:30:55 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 37EBUsji009542-37EBUsjj009542 for ; Mon, 14 Aug 2023 14:30:54 +0300 Received: from foo.martin.st (host-97-144.parnet.fi [77.234.97.144]) by mail9.parnet.fi (Postfix) with ESMTPS id AF601A146D for ; Mon, 14 Aug 2023 14:30:54 +0300 (EEST) Date: Mon, 14 Aug 2023 14:30:52 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <62ee336f-50f7-4986-b820-f50ec71492b6@amyspark.me> Message-ID: References: <62ee336f-50f7-4986-b820-f50ec71492b6@amyspark.me> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH v3 1/1] configure: Set WIN32_LEAN_AND_MEAN at configure time 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sat, 5 Aug 2023, L. E. Segovia wrote: > Including winsock2.h or windows.h without WIN32_LEAN_AND_MEAN cause > bzlib.h to parse as nonsense, due to an instance of #define char small > in rpcndr.h. > > See: > > https://stackoverflow.com/a/27794577 > > Signed-off-by: L. E. Segovia > --- > compat/atomics/win32/stdatomic.h | 1 - > compat/w32pthreads.h | 1 - > configure | 1 + > libavdevice/dshow_capture.h | 1 - > libavdevice/opengl_enc.c | 1 - > libavfilter/vsrc_ddagrab.c | 1 - > libavformat/os_support.c | 6 ++---- > libavutil/wchar_filename.h | 1 - > libswscale/utils.c | 1 - > 9 files changed, 3 insertions(+), 11 deletions(-) > > diff --git a/configure b/configure > index 99388e7664..881a10bc0c 100755 > --- a/configure > +++ b/configure > @@ -5716,6 +5716,7 @@ case $target_os in > fi > ! enabled small && test_cmd $windres --version && enable gnu_windres > enabled x86_32 && check_ldflags -LARGEADDRESSAWARE > + add_cppflags -DWIN32_LEAN_AND_MEAN > shlibdir_default="$bindir_default" > SLIBPREF="" > SLIBSUF=".dll" This is in the block for target_os = win32/win64 - but that's only used for MSVC (or clang-cl) based builds - not for mingw or cygwin. We'd want this define set for mingw and cygwin too. Cygwin itself doesn't define _WIN32 and generally is mostly treated as unix, but there are some codepaths that check for HAVE_WINDOWS_H and include that header, and that's true in Cygwin too, so we'd like to keep the WIN32_LEAN_AND_MEAN there too. Other than that, this looks fine to me! // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".