[mingw-headers/f17] Disable conflicting asprintf and vasprintf definitions in stdio.h
Kalev Lember
kalev at fedoraproject.org
Sun Jul 22 19:33:43 UTC 2012
commit 4f08780fe73fdc99952fb4bba1cf90a5e1a35d0a
Author: Kalev Lember <kalevlember at gmail.com>
Date: Sun Jul 22 22:21:21 2012 +0300
Disable conflicting asprintf and vasprintf definitions in stdio.h
Fixes a regression with latest mingw-headers snapshot.
mingw-headers-disable-asprintf.patch | 22 ++++++++++++++++++++++
mingw-headers.spec | 11 ++++++++++-
2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/mingw-headers-disable-asprintf.patch b/mingw-headers-disable-asprintf.patch
new file mode 100644
index 0000000..dce1062
--- /dev/null
+++ b/mingw-headers-disable-asprintf.patch
@@ -0,0 +1,22 @@
+--- trunk/mingw-w64-headers/crt/stdio.h 2012/07/04 13:06:41 5161
++++ trunk/mingw-w64-headers/crt/stdio.h 2012/07/05 11:57:34 5166
+@@ -323,6 +323,11 @@
+ return __mingw_vsprintf( __stream, __format, __local_argv );
+ }
+
++#if 0
++/* Disabled due issue of definition in POSIX way in libmingwex,
++ which could cause troubles on scenarios venure expects those
++ function in MS formatter style.
++ So simplest way for now, disable it. */
+ __mingw_ovr
+ __attribute__ ((__format__ (gnu_printf, 2, 3))) __attribute__((nonnull (1,2)))
+ int asprintf(char **__ret, const char *__format, ...)
+@@ -340,6 +345,7 @@
+ {
+ return __mingw_vasprintf( __ret, __format, __local_argv );
+ }
++#endif
+ /* #ifndef __NO_ISOCEXT */ /* externs in libmingwex.a */
+ __mingw_ovr
+ __attribute__((__format__ (gnu_printf, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
diff --git a/mingw-headers.spec b/mingw-headers.spec
index 1575806..c0de0a1 100644
--- a/mingw-headers.spec
+++ b/mingw-headers.spec
@@ -12,7 +12,7 @@
Name: mingw-headers
Version: 2.0.999
-Release: 0.6.trunk.%{snapshot_date}%{?dist}
+Release: 0.7.trunk.%{snapshot_date}%{?dist}
Summary: Win32/Win64 header files
License: Public Domain and LGPLv2+ and ZPLv2.1
@@ -25,6 +25,10 @@ Source0: http://downloads.sourceforge.net/mingw-w64/mingw-w64-src_%{snaps
Source0: http://downloads.sourceforge.net/mingw-w64/mingw-w64-v%{version}.tar.gz
%endif
+# Backported r5166 from trunk
+# Disable conflicting asprintf and vasprintf definitions in stdio.h
+Patch0: mingw-headers-disable-asprintf.patch
+
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 95
@@ -70,6 +74,8 @@ tar -xf %{S:0}
%setup -q -n mingw-w64-v%{version}
%endif
+%patch0 -p1 -b .asprintf
+
%build
pushd mingw-w64-headers
@@ -110,6 +116,9 @@ rm -f $RPM_BUILD_ROOT%{mingw64_includedir}/pthread_unistd.h
%changelog
+* Sun Jul 22 2012 Kalev Lember <kalevlember at gmail.com> - 2.0.999-0.7.trunk.20120601
+- Disable conflicting asprintf and vasprintf definitions in stdio.h
+
* Sat Jun 02 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.0.999-0.6.trunk.20120601
- Update to 20120601 snapshot
More information about the scm-commits
mailing list