[packages/crossmingw32-runtime] - added rand_s-mingw patch (required for glib 2.40+); release 2

qboosh qboosh at pld-linux.org
Tue Mar 25 18:44:07 CET 2014


commit 692b81fd00b9208da53d7df61792a74e730e5183
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Mar 25 18:47:36 2014 +0100

    - added rand_s-mingw patch (required for glib 2.40+); release 2

 crossmingw32-runtime.spec |  5 ++++-
 rand_s-mingw.patch        | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)
---
diff --git a/crossmingw32-runtime.spec b/crossmingw32-runtime.spec
index 4d9c28a..3821aca 100644
--- a/crossmingw32-runtime.spec
+++ b/crossmingw32-runtime.spec
@@ -2,7 +2,7 @@ Summary:	MinGW32 Binary Utility Development Utilities - runtime libraries
 Summary(pl.UTF-8):	Zestaw narzędzi MinGW32 - biblioteki uruchomieniowe
 Name:		crossmingw32-runtime
 Version:	4.0.3
-Release:	1
+Release:	2
 Epoch:		1
 License:	BSD-like
 Group:		Development/Libraries
@@ -14,6 +14,8 @@ Patch0:		%{name}-format.patch
 Patch1:		%{name}-mingwex.patch
 Patch2:		crossmingw32-w32api-mmsystem.patch
 Patch3:		crossmingw32-w32api-commctrl.patch
+# http://sourceforge.net/p/mingw/bugs/2122/
+Patch4:		rand_s-mingw.patch
 URL:		http://www.mingw.org/
 BuildRequires:	autoconf >= 2.68
 BuildRequires:	automake
@@ -117,6 +119,7 @@ dos2unix Makefile.in configure.ac */Makefile.in
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p0
 
 %build
 cp /usr/share/automake/config.sub .
diff --git a/rand_s-mingw.patch b/rand_s-mingw.patch
new file mode 100644
index 0000000..99fa9d1
--- /dev/null
+++ b/rand_s-mingw.patch
@@ -0,0 +1,37 @@
+--- include/winnt.h	2013-08-31 12:40:55.422343650 +0200
++++ include/winnt.h	2013-08-31 12:43:39.036686882 +0200
+@@ -107,6 +107,11 @@
+ #endif
+ typedef void* __ptr64 PVOID64;
+ 
++#ifndef _ERRCODE_DEFINED
++#define _ERRCODE_DEFINED
++typedef int errno_t;
++#endif
++
+ #ifndef _WCHAR_T_DEFINED
+ #define _WCHAR_T_DEFINED
+ #ifndef _WCHAR_T_
+--- include/stdlib.h	2013-08-31 12:27:41.321139008 +0200
++++ include/stdlib.h	2013-08-31 12:35:18.970541797 +0200
+@@ -232,6 +232,10 @@
+ _CRTIMP int __cdecl __MINGW_NOTHROW rand (void);
+ _CRTIMP void __cdecl __MINGW_NOTHROW srand (unsigned int);
+ 
++#if defined (_CRT_RAND_S) && (WINVER >= 0x0501)
++_CRTIMP errno_t __cdecl __MINGW_NOTHROW rand_s (unsigned int*);
++#endif
++
+ _CRTIMP void* __cdecl __MINGW_NOTHROW calloc (size_t, size_t) __MINGW_ATTRIB_MALLOC;
+ _CRTIMP void* __cdecl __MINGW_NOTHROW malloc (size_t) __MINGW_ATTRIB_MALLOC;
+ _CRTIMP void* __cdecl __MINGW_NOTHROW realloc (void*, size_t);
+--- lib/lib32/msvcrt.def.in	2013-08-31 12:45:45.477904906 +0200
++++ lib/lib32/msvcrt.def.in	2013-08-31 12:47:45.044353824 +0200
+@@ -637,6 +637,7 @@
+ qsort
+ raise
+ rand
++rand_s
+ realloc
+ remove
+ rename
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crossmingw32-runtime.git/commitdiff/692b81fd00b9208da53d7df61792a74e730e5183



More information about the pld-cvs-commit mailing list