From d9cd11ad44bfccf2be37b2473a675f009365e945 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Mon, 25 Jan 2010 01:25:59 +0000
Subject: [PATCH] =?UTF-8?q?Only=20define=20=5FWIN32=5FWINNT=3D0x0501=20if?=
 =?UTF-8?q?=20$target=5Fos=20=3D=20"mingw32".=20If=20compatibility=20with?=
 =?UTF-8?q?=20pre-XP=20versions=20is=20desired,=20use=20--target-os=3Dming?=
 =?UTF-8?q?w32-prexp=20Patch=20by=20Martin=20Storsj=C3=B6=20<martin=20at?=
 =?UTF-8?q?=20martin=20dot=20st>.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Originally committed as revision 21441 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 configure        | 7 +++++--
 doc/general.texi | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index f0913bc5ed..b9d6a42d37 100755
--- a/configure
+++ b/configure
@@ -2075,8 +2075,11 @@ case $target_os in
             { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
         ;;
     mingw32*)
-        # Only WinXP or greater are supported
-        add_cflags -D_WIN32_WINNT=0x0501
+        # Adding _WIN32_WINNT=0x0501 makes functions that require
+        # XP visible and thus may make it binary incompatible with
+        # earlier versions. Set --target-os=mingw32-prexp if this
+        # isn't desired.
+        test $target_os = "mingw32" && add_cflags -D_WIN32_WINNT=0x0501
         if test $target_os = "mingw32ce"; then
             disable network
         else
diff --git a/doc/general.texi b/doc/general.texi
index 69fc50abf6..3fb7a3a7de 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -998,8 +998,8 @@ and for a build with shared libraries
 @subsection Win9x/Win2000 support
 
 FFmpeg is built by default for Windows XP and above. To run it on any Windows
-version prior to XP, you may have to disable network support. Additionally, for
-Windows 98/Me you must install KernelEx from:
+version prior to XP, you must use @code{--target-os=mingw32-prexp}.
+Additionally, for Windows 98/Me you must install KernelEx from:
 http://sourceforge.net/projects/kernelex/
 
 @section BeOS