[evolution-patches] alloca fix for slowaris
- From: Not Zed <notzed ximian com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] alloca fix for slowaris
- Date: Thu, 26 Aug 2004 15:34:42 +0800
can't remember the bug number for this, but here's a fix for this, and also consitencise 2 other cases which weren't an issue anyway.
i was going to fix the namespace of these e-util things, but it seemed like too much work. perhaps going forward much of e-util should just be moved into eds.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.152
diff -u -3 -r1.152 ChangeLog
--- ChangeLog 25 Aug 2004 14:39:18 -0000 1.152
+++ ChangeLog 26 Aug 2004 07:26:58 -0000
@@ -1,3 +1,13 @@
+2004-08-26 Not Zed <NotZed Ximian com>
+
+ * libedataserver/e-util.c (e_util_utf8_strstrcase)
+ (e_util_utf8_strstrcasedecomp):
+
+ * libedataserver/e-sexp.c (e_sexp_term_eval):
+ * libedataserver/e-memory.c (e_memchunk_clean): use g_alloca for
+ stupid arcanely out of date and posixly-busted slowaris which
+ doesn't put alloca in stdlib.h like any sane system.
+
2004-08-25 Frederic Crozat <fcrozat mandrakesoft com>
* libedataserver/e-file-cache.c: (add_key_to_list),
Index: libedataserver/e-memory.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-memory.c,v
retrieving revision 1.2
diff -u -3 -r1.2 e-memory.c
--- libedataserver/e-memory.c 3 May 2004 19:43:22 -0000 1.2
+++ libedataserver/e-memory.c 26 Aug 2004 07:26:58 -0000
@@ -282,7 +282,7 @@
/* first, setup the tree/list so we can map free block addresses to block addresses */
tree = g_tree_new((GCompareFunc)tree_compare);
for (i=0;i<m->blocks->len;i++) {
- ci = alloca(sizeof(*ci));
+ ci = g_alloca(sizeof(*ci));
ci->count = 0;
ci->base = m->blocks->pdata[i];
ci->size = m->blocksize * m->atomsize;
Index: libedataserver/e-sexp.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-sexp.c,v
retrieving revision 1.1.1.1
diff -u -3 -r1.1.1.1 e-sexp.c
--- libedataserver/e-sexp.c 3 Nov 2003 18:23:56 -0000 1.1.1.1
+++ libedataserver/e-sexp.c 26 Aug 2004 07:26:59 -0000
@@ -701,7 +701,7 @@
break;
case ESEXP_TERM_FUNC:
/* first evaluate all arguments to result types */
- argv = alloca(sizeof(argv[0]) * t->value.func.termcount);
+ argv = g_alloca(sizeof(argv[0]) * t->value.func.termcount);
for (i=0;i<t->value.func.termcount;i++) {
argv[i] = e_sexp_term_eval(f, t->value.func.terms[i]);
}
Index: libedataserver/e-util.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-util.c,v
retrieving revision 1.3
diff -u -3 -r1.3 e-util.c
--- libedataserver/e-util.c 25 Aug 2004 14:39:18 -0000 1.3
+++ libedataserver/e-util.c 26 Aug 2004 07:26:59 -0000
@@ -22,13 +22,13 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <alloca.h>
#include <glib/gfileutils.h>
#include <glib/gmem.h>
#include <glib/gmessages.h>
#include <glib/gstrfuncs.h>
#include <glib/gunicode.h>
#include <glib/gutils.h>
+#include <glib/galloca.h>
#include "e-util.h"
int
@@ -106,7 +106,7 @@
if (strlen (needle) == 0) return haystack;
if (strlen (haystack) == 0) return NULL;
- nuni = alloca (sizeof (gunichar) * strlen (needle));
+ nuni = g_alloca (sizeof (gunichar) * strlen (needle));
nlen = 0;
for (p = e_util_unicode_get_utf8 (needle, &unival); p && unival; p = e_util_unicode_get_utf8 (p, &unival)) {
@@ -1502,7 +1502,7 @@
if (strlen (needle) == 0) return haystack;
if (strlen (haystack) == 0) return NULL;
- nuni = alloca (sizeof (gunichar) * strlen (needle));
+ nuni = g_alloca (sizeof (gunichar) * strlen (needle));
nlen = 0;
for (p = e_util_unicode_get_utf8 (needle, &unival); p && unival; p = e_util_unicode_get_utf8 (p, &unival)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]