[Ffmpeg-devel] [PATCH] rename CONFIG_WIN32 to CONFIG_MINGW/__MINGW32__
Tue Jul 11 12:30:52 CEST 2006
Diego Biurrun said:
> On Mon, Jul 10, 2006 at 07:39:43PM +0100, M?ns Rullg?rd wrote:
>> Diego Biurrun <diego at biurrun.de> writes:
>> > We currently have a confusing way to specify MinGW, we call it
>> > CONFIG_WIN32 while this name is usually reserved for something that
>> > encompasses both MinGW and Cygwin.
>> > This patch renames CONFIG_WIN32 to __MINGW__ within the source files and
>> > to CONFIG_MINGW within the build system along with cleaning up some of
>> > the confusion that this naming scheme seems to have entailed in the
>> > past.
>> > OK to commit?
>> Fine by me in general, assuming the compiler defines __MINGW32__.
> We define it in configure.
No, we don't, and we must not define anything starting with and underscore.
Such names are reserved for the system. GCC seems to define __MING32__
>> Just a couple of minor things:
>> > Index: libavutil/common.h
>> > ===================================================================
>> > --- libavutil/common.h (revision 5705)
>> > +++ libavutil/common.h (working copy)
>> > @@ -292,7 +292,7 @@
>> > # include <assert.h>
>> > /* dprintf macros */
>> > -# if defined(CONFIG_WIN32) && !defined(__MINGW32__) &&
>> > +# if defined(CONFIG_WIN32)
>> CONFIG_WIN32 isn't ever defined with your change, right? I think this
>> is a remnant of the days long gone when ffmpeg could be built with
>> msvc. Get rid of the #ifdef entirely.
> At the top of libavutil/common.h you will find
> #if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
> # define CONFIG_WIN32
> #if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) &&
> # define EMULATE_INTTYPES
> I suppose these are remnants from those long gone days, yes. I guess
> they should be removed, but in a separate commit.
Those conditions can never be true with any supported compiler, so they should
>> > -#if defined(CONFIG_WIN32) || defined(CONFIG_OS2) || defined(__CYGWIN__)
>> > +#if defined(_MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__)
>> Typo ----------^
> Ooops, thanks, fixed locally.
> New patch with some more changes in libavutil/common.h attached. Some
> testing on MinGW would be very much welcome as I don't have Windows
I think this could be simplified if we first remove all the dead bits,
then fix up whatever remains.
mru at inprovide.com
More information about the ffmpeg-devel