From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: "Martin Storsjö" <martin@martin.st>, "FFmpeg development discussions and patches" <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] avformat/internal: Don't auto-include os_support.h Date: Fri, 1 Sep 2023 00:31:00 +0200 Message-ID: <AS8P250MB074419AD5B3773E43033A0B18FE5A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <52df9a8f-1d85-5f85-f172-d2e7d7fd5da6@martin.st> Martin Storsjö: > On Thu, 31 Aug 2023, Andreas Rheinhardt wrote: > >> It includes various Windows-specific headers when compiling >> for Windows and these sometimes cause issues: E.g. winbase.h >> defines IGNORE, which clashes with a macro used in the Matroska >> muxer (since 884653ee5be03ed38db957c14fad51b300611c8c) and demuxer. >> >> This header provides fallback defines for various stuff that is >> mostly not used directly by (de)muxers at all: >> mkdir, rename, rmdir, unlink, access, poll, pollfd, nfds_t, >> closesocket, socklen_t, fstat, stat, lseek, SHUT_(RD|WR|RDWR) >> and various POLL* constants. >> >> Ergo fix this issue by not auto-including this header in lots >> of places via an inclusion in internal.h and instead include >> it everywhere where the above stuff is used (most of these >> translation units already included os_support.h). >> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> >> --- >> libavformat/img2dec.c | 1 + >> libavformat/internal.h | 1 - >> libavformat/rtsp.h | 1 + >> libavformat/utils.c | 1 + >> 4 files changed, 3 insertions(+), 1 deletion(-) > > Ok with me, if you did a reasonable effort to check that this covers all > the cases of the redirected functions. Spreading those includes > everywhere isn't very nice indeed. > I used '\b(mkdir|rename|rmdir|unlink|access|poll|pollfd|nfds_t|closesocket|socklen_t|fstat|stat|lseek|SHUT_(RD|WR|RDWR)|POLL(IN|OUT|RDNORM|WRNORM|RDBAND|WRBAND|PRI|ERR|HUP|NVAL))\b' (Also note that internal.h is not included everywhere.) > This increases the risk of accidentally adding new uses of these > functions without picking up the redirects, but I guess that's manageable. > It also reduces the risk of accidentally causing macro conflicts like with IGNORE. - Andreas _______________________________________________ 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-31 22:29 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-31 17:41 Andreas Rheinhardt 2023-08-31 20:55 ` Martin Storsjö 2023-08-31 22:31 ` Andreas Rheinhardt [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=AS8P250MB074419AD5B3773E43033A0B18FE5A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=martin@martin.st \ /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