public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-text/libspectre/files: libspectre-0.2.0-interix.patch
@ 2010-01-08  2:26 Jonathan Callen (abcd)
  0 siblings, 0 replies; only message in thread
From: Jonathan Callen (abcd) @ 2010-01-08  2:26 UTC (permalink / raw
  To: gentoo-commits

abcd        10/01/08 02:26:02

  Added:                libspectre-0.2.0-interix.patch
  Log:
  Add prefix keywords, patch for Interix
  (Portage version: -svn/cvs/Linux i686)

Revision  Changes    Path
1.1                  app-text/libspectre/files/libspectre-0.2.0-interix.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/libspectre/files/libspectre-0.2.0-interix.patch?rev=1.1&view=markup
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

Index: libspectre-0.2.0-interix.patch
===================================================================
diff -ru libspectre-0.2.0.orig/libspectre/spectre-utils.c libspectre-0.2.0/libspectre/spectre-utils.c
--- libspectre-0.2.0.orig/libspectre/spectre-utils.c	2008-05-06 08:35:07 +0200
+++ libspectre-0.2.0/libspectre/spectre-utils.c	2008-05-06 08:49:51 +0200
@@ -148,6 +148,17 @@
 spectre_strdup_vprintf (const char *format,
 			va_list     args)
 {
+#ifdef __INTERIX
+	/* no [v]asprintf here, so we need to do something else. */
+	char * string = NULL;
+	char buf[524288];
+
+	if(vsprintf(buf, format, args) < 0)
+		return NULL;
+	
+	string = strdup(buf);
+	return string;
+#else
 	char *string = NULL;
 	int len = vasprintf (&string, format, args);
 	
@@ -155,6 +166,7 @@
 		string = NULL;
 
 	return string;
+#endif
 }
 
 char *






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-08  2:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08  2:26 [gentoo-commits] gentoo-x86 commit in app-text/libspectre/files: libspectre-0.2.0-interix.patch Jonathan Callen (abcd)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox