Re: [FFmpeg-devel] [PATCH] msvc: Fix compilation errors due to header include order.

2014-11-28 Thread Reimar Döffinger
On Thu, Nov 27, 2014 at 10:38:01PM +1100, Matt Oliver wrote:
 The patch lavf: Use wchar functions for filenames on windows for
 mkdir/rmdir/rename/unlink that was recently added has broken msvc/icl
 builds. see:
 http://fate.ffmpeg.org/report.cgi?time=20141126233318slot=x86_32-msvc12-windows-native
 
 This is because winsock2.h must be included before windows.h. There are
 many other files that include windows.h that dont check for winsock2.h (as
 they dont need it) but include avformat/internal.h which now includes
 winsock2.h but after all the files that explicitly include their own
 windows.h. As a result all these files now wont compile under msvc/icl and
 generate warnings under mingw.
 
 The attached patch fixes that by ensuring the correct header include order.

That doesn't explain why the patch changes the zlib / bz2 include position?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] msvc: Fix compilation errors due to header include order.

2014-11-28 Thread Derek Buitenhuis
On 11/28/2014 4:47 PM, Reimar Döffinger wrote:
 That doesn't explain why the patch changes the zlib / bz2 include position?

They include it.

e.g.: https://github.com/madler/zlib/blob/master/zconf.h#L321-339

- Derek
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] msvc: Fix compilation errors due to header include order.

2014-11-27 Thread Matt Oliver
The patch lavf: Use wchar functions for filenames on windows for
mkdir/rmdir/rename/unlink that was recently added has broken msvc/icl
builds. see:
http://fate.ffmpeg.org/report.cgi?time=20141126233318slot=x86_32-msvc12-windows-native

This is because winsock2.h must be included before windows.h. There are
many other files that include windows.h that dont check for winsock2.h (as
they dont need it) but include avformat/internal.h which now includes
winsock2.h but after all the files that explicitly include their own
windows.h. As a result all these files now wont compile under msvc/icl and
generate warnings under mingw.

The attached patch fixes that by ensuring the correct header include order.

Matt


0001-msvc-Fix-compilation-errors-due-to-header-include-or.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] msvc: Fix compilation errors due to header include order.

2014-11-27 Thread Michael Niedermayer
On Thu, Nov 27, 2014 at 10:38:01PM +1100, Matt Oliver wrote:
 The patch lavf: Use wchar functions for filenames on windows for
 mkdir/rmdir/rename/unlink that was recently added has broken msvc/icl
 builds. see:
 http://fate.ffmpeg.org/report.cgi?time=20141126233318slot=x86_32-msvc12-windows-native
 
 This is because winsock2.h must be included before windows.h. There are
 many other files that include windows.h that dont check for winsock2.h (as
 they dont need it) but include avformat/internal.h which now includes
 winsock2.h but after all the files that explicitly include their own
 windows.h. As a result all these files now wont compile under msvc/icl and
 generate warnings under mingw.
 
 The attached patch fixes that by ensuring the correct header include order.
 
 Matt

  libavdevice/dshow_capture.h |1 +
  libavdevice/opengl_enc.c|1 +
  libavformat/matroskadec.c   |   13 +++--
  libavutil/atomic_win32.h|1 +
  4 files changed, 10 insertions(+), 6 deletions(-)
 9e42eb2c99e61e5a0a250c4bc0e9e9fc29c31ab9  
 0001-msvc-Fix-compilation-errors-due-to-header-include-or.patch
 From fe33232f3991796b4c8437016cfe66ac5599f36e Mon Sep 17 00:00:00 2001
 From: Matthew Oliver protogo...@gmail.com
 Date: Thu, 27 Nov 2014 19:00:36 +1100
 Subject: [PATCH] msvc: Fix compilation errors due to header include order.
 
 Ensures that the header include order is such that winsock2.h is always
 included before windows.h or that windows.h does not include winsock.h.

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel