1 |
abcd 10/01/08 02:26:02 |
2 |
|
3 |
Added: libspectre-0.2.0-interix.patch |
4 |
Log: |
5 |
Add prefix keywords, patch for Interix |
6 |
(Portage version: -svn/cvs/Linux i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-text/libspectre/files/libspectre-0.2.0-interix.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/libspectre/files/libspectre-0.2.0-interix.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/libspectre/files/libspectre-0.2.0-interix.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: libspectre-0.2.0-interix.patch |
15 |
=================================================================== |
16 |
diff -ru libspectre-0.2.0.orig/libspectre/spectre-utils.c libspectre-0.2.0/libspectre/spectre-utils.c |
17 |
--- libspectre-0.2.0.orig/libspectre/spectre-utils.c 2008-05-06 08:35:07 +0200 |
18 |
+++ libspectre-0.2.0/libspectre/spectre-utils.c 2008-05-06 08:49:51 +0200 |
19 |
@@ -148,6 +148,17 @@ |
20 |
spectre_strdup_vprintf (const char *format, |
21 |
va_list args) |
22 |
{ |
23 |
+#ifdef __INTERIX |
24 |
+ /* no [v]asprintf here, so we need to do something else. */ |
25 |
+ char * string = NULL; |
26 |
+ char buf[524288]; |
27 |
+ |
28 |
+ if(vsprintf(buf, format, args) < 0) |
29 |
+ return NULL; |
30 |
+ |
31 |
+ string = strdup(buf); |
32 |
+ return string; |
33 |
+#else |
34 |
char *string = NULL; |
35 |
int len = vasprintf (&string, format, args); |
36 |
|
37 |
@@ -155,6 +166,7 @@ |
38 |
string = NULL; |
39 |
|
40 |
return string; |
41 |
+#endif |
42 |
} |
43 |
|
44 |
char * |