From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v3 1/1] configure: Set WIN32_LEAN_AND_MEAN at configure time
Date: Mon, 14 Aug 2023 14:30:52 +0300 (EEST)
Message-ID: <da612659-b41f-cc66-f585-8433329c89cb@martin.st> (raw)
In-Reply-To: <62ee336f-50f7-4986-b820-f50ec71492b6@amyspark.me>
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 <amy@amyspark.me>
> ---
> 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".
prev parent reply other threads:[~2023-08-14 11:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 18:51 [FFmpeg-devel] [PATCH] os_support, network: Fix build failure on Windows with BZIP2 L. E. Segovia
2023-07-29 18:48 ` [FFmpeg-devel] [PATCH v2] " L. E. Segovia
2023-08-04 12:36 ` [FFmpeg-devel] [PATCH] " Martin Storsjö
2023-08-04 12:39 ` Martin Storsjö
2023-08-05 13:00 ` L. E. Segovia
2023-08-05 20:47 ` [FFmpeg-devel] [PATCH v3 0/1] configure: Set WIN32_LEAN_AND_MEAN at configure time L. E. Segovia
2023-08-14 11:53 ` [FFmpeg-devel] [PATCH v4 " L. E. Segovia
[not found] ` <cover.1692013786.git.amy@amyspark.me>
2023-08-14 11:53 ` [FFmpeg-devel] [PATCH v4 1/1] " L. E. Segovia
2023-08-14 19:58 ` Martin Storsjö
2023-08-19 15:31 ` Gyan Doshi
2023-08-19 21:12 ` Martin Storsjö
[not found] ` <cover.1691268056.git.amy@amyspark.me>
2023-08-05 20:47 ` [FFmpeg-devel] [PATCH v3 " L. E. Segovia
2023-08-14 11:30 ` Martin Storsjö [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da612659-b41f-cc66-f585-8433329c89cb@martin.st \
--to=martin@martin.st \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git