[evolution-patches] 64 bit fixes, evolution, eds and evolution-exchange
- From: Not Zed <notzed ximian com>
- To: asdf <evolution-patches lists ximian com>
- Subject: [evolution-patches] 64 bit fixes, evolution, eds and evolution-exchange
- Date: Tue, 11 Jan 2005 11:11:20 +0800
A bunch of 64 bit fixes required for stable. Also fixes some other minor/major things and a few warnings.
(i think some changelogs are missing, this is a combined patch from various sources)
Michael
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.154.2.16
diff -u -p -r1.154.2.16 ChangeLog
--- ChangeLog 6 Dec 2004 16:56:40 -0000 1.154.2.16
+++ ChangeLog 10 Jan 2005 06:31:16 -0000
@@ -1,3 +1,11 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ * libedataserver/e-xml-hash-utils.c (e_xmlhash_write): cast field
+ length to int.
+
+ * libedataserver/e-url.c (e_url_shroud): setup string manually
+ don't use *.%s as it depends on locale.
+
2004-12-06 JP Rosevear <jpr novell com>
* configure.in: bump version, libtool number
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.324.2.10
diff -u -p -r1.324.2.10 ChangeLog
--- calendar/ChangeLog 6 Dec 2004 14:28:19 -0000 1.324.2.10
+++ calendar/ChangeLog 10 Jan 2005 06:31:17 -0000
@@ -1,3 +1,11 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ * backends/http/e-cal-backend-http.c (retrieval_done): cast away warning.
+
+ * backends/groupwise/e-cal-backend-groupwise.c
+ (e_cal_backend_groupwise_get_static_capabilities): remove the \'s
+ to join the strings, they get joined anyway.
+
2004-12-06 Rodrigo Moya <rodrigo novell com>
Fixes #59904
Index: calendar/backends/groupwise/e-cal-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v
retrieving revision 1.89.2.3
diff -u -p -r1.89.2.3 e-cal-backend-groupwise.c
--- calendar/backends/groupwise/e-cal-backend-groupwise.c 19 Nov 2004 17:34:47 -0000 1.89.2.3
+++ calendar/backends/groupwise/e-cal-backend-groupwise.c 10 Jan 2005 06:31:17 -0000
@@ -512,13 +512,13 @@ e_cal_backend_groupwise_get_alarm_email_
static ECalBackendSyncStatus
e_cal_backend_groupwise_get_static_capabilities (ECalBackendSync *backend, EDataCal *cal, char **capabilities)
{
- *capabilities = g_strdup (CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS "," \
- CAL_STATIC_CAPABILITY_ONE_ALARM_ONLY "," \
- CAL_STATIC_CAPABILITY_REMOVE_ALARMS "," \
- CAL_STATIC_CAPABILITY_NO_THISANDPRIOR "," \
- CAL_STATIC_CAPABILITY_NO_THISANDFUTURE "," \
- CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK "," \
- CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR "," \
+ *capabilities = g_strdup (CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS ","
+ CAL_STATIC_CAPABILITY_ONE_ALARM_ONLY ","
+ CAL_STATIC_CAPABILITY_REMOVE_ALARMS ","
+ CAL_STATIC_CAPABILITY_NO_THISANDPRIOR ","
+ CAL_STATIC_CAPABILITY_NO_THISANDFUTURE ","
+ CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK ","
+ CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR ","
CAL_STATIC_CAPABILITY_SAVE_SCHEDULES);
return GNOME_Evolution_Calendar_Success;
Index: calendar/backends/http/e-cal-backend-http.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/http/e-cal-backend-http.c,v
retrieving revision 1.19.8.1
diff -u -p -r1.19.8.1 e-cal-backend-http.c
--- calendar/backends/http/e-cal-backend-http.c 28 Sep 2004 15:57:45 -0000 1.19.8.1
+++ calendar/backends/http/e-cal-backend-http.c 10 Jan 2005 06:31:17 -0000
@@ -301,7 +301,7 @@ retrieval_done (SoupMessage *msg, ECalBa
e_cal_backend_cache_put_component (priv->cache, comp);
e_cal_component_get_uid (comp, &uid);
- if (g_hash_table_lookup_extended (old_cache, uid, &orig_key, &orig_value)) {
+ if (g_hash_table_lookup_extended (old_cache, uid, (void **)&orig_key, (void **)&orig_value)) {
e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbhttp),
orig_value,
icalcomponent_as_ical_string (subcomp));
Index: calendar/libedata-cal/e-data-cal-factory.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-data-cal-factory.c,v
retrieving revision 1.9
diff -u -p -r1.9 e-data-cal-factory.c
--- calendar/libedata-cal/e-data-cal-factory.c 2 Aug 2004 11:38:08 -0000 1.9
+++ calendar/libedata-cal/e-data-cal-factory.c 10 Jan 2005 06:31:17 -0000
@@ -84,7 +84,7 @@ get_backend_type (GHashTable *methods, c
if (!kinds)
return 0;
- type = GPOINTER_TO_INT (g_hash_table_lookup (kinds, GINT_TO_POINTER (kind)));
+ type = (GType) (g_hash_table_lookup (kinds, GINT_TO_POINTER (kind)));
return type;
}
@@ -452,7 +452,7 @@ e_data_cal_factory_register_method (EDat
kinds = g_hash_table_lookup (priv->methods, method_str);
if (kinds) {
- type = GPOINTER_TO_INT (g_hash_table_lookup (kinds, GINT_TO_POINTER (kind)));
+ type = (GType) (g_hash_table_lookup (kinds, GINT_TO_POINTER (kind)));
if (type) {
g_warning (G_STRLOC ": method `%s' already registered", method_str);
g_free (method_str);
@@ -466,7 +466,7 @@ e_data_cal_factory_register_method (EDat
g_hash_table_insert (priv->methods, method_str, kinds);
}
- g_hash_table_insert (kinds, GINT_TO_POINTER (kind), GINT_TO_POINTER (backend_type));
+ g_hash_table_insert (kinds, GINT_TO_POINTER (kind), (gpointer) backend_type);
}
/**
Index: calendar/libical/ChangeLog
===================================================================
RCS file: /cvs/gnome/libical/ChangeLog,v
retrieving revision 1.164.2.3
diff -u -p -r1.164.2.3 ChangeLog
--- calendar/libical/ChangeLog 26 Oct 2004 23:01:06 -0000 1.164.2.3
+++ calendar/libical/ChangeLog 10 Jan 2005 06:31:18 -0000
@@ -1,3 +1,9 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ * src/libicalss/icalfileset.c (icalfileset_read_from_file)
+ (icalfileset_read_file): pass the icalfileset to the callback
+ rather than cast the fd to/from a pointer.
+
2004-10-27 Julio M. Merino Vidal <jmmv menta net>
* configure.in: search for unsetenv.
Index: calendar/libical/src/libicalss/icalfileset.c
===================================================================
RCS file: /cvs/gnome/libical/src/libicalss/icalfileset.c,v
retrieving revision 1.3
diff -u -p -r1.3 icalfileset.c
--- calendar/libical/src/libicalss/icalfileset.c 21 Oct 2003 18:28:19 -0000 1.3
+++ calendar/libical/src/libicalss/icalfileset.c 10 Jan 2005 06:31:18 -0000
@@ -180,13 +180,13 @@ icalcluster* icalfileset_produce_icalclu
char* icalfileset_read_from_file(char *s, size_t size, void *d)
{
char* p = s;
- int fd = (int)d;
+ icalfileset *set = d;
/* Simulate fgets -- read single characters and stop at '\n' */
for(p=s; p<s+size-1;p++){
- if(read(fd,p,1) != 1 || *p=='\n'){
+ if(read(set->fd,p,1) != 1 || *p=='\n'){
p++;
break;
}
@@ -209,7 +209,7 @@ icalerrorenum icalfileset_read_file(ical
parser = icalparser_new();
- icalparser_set_gen_data(parser,(void*)set->fd);
+ icalparser_set_gen_data(parser, set);
set->cluster = icalparser_parse(parser,icalfileset_read_from_file);
icalparser_free(parser);
Index: libedataserver/e-memory.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-memory.c,v
retrieving revision 1.3
diff -u -p -r1.3 e-memory.c
--- libedataserver/e-memory.c 27 Aug 2004 02:26:57 -0000 1.3
+++ libedataserver/e-memory.c 10 Jan 2005 06:31:19 -0000
@@ -24,6 +24,7 @@
#include <string.h> /* memset() */
#include <stdlib.h> /* alloca() */
+#include <glib.h>
#define s(x) /* strv debug */
#define p(x) /* poolv debug */
@@ -99,8 +100,6 @@ checkmem(void *p)
/* mempool class */
-#define STRUCT_ALIGN (4)
-
typedef struct _MemChunkFreeNode {
struct _MemChunkFreeNode *next;
unsigned int atoms;
@@ -282,7 +281,7 @@ e_memchunk_clean(MemChunk *m)
/* 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 = g_alloca(sizeof(*ci));
+ ci = alloca(sizeof(*ci));
ci->count = 0;
ci->base = m->blocks->pdata[i];
ci->size = m->blocksize * m->atomsize;
@@ -356,14 +355,14 @@ typedef struct _MemPoolNode {
struct _MemPoolNode *next;
int free;
- char data[1];
} MemPoolNode;
typedef struct _MemPoolThresholdNode {
struct _MemPoolThresholdNode *next;
- char data[1];
} MemPoolThresholdNode;
+#define ALIGNED_SIZEOF(t) ((sizeof (t) + G_MEM_ALIGN - 1) & -G_MEM_ALIGN)
+
typedef struct _EMemPool {
int blocksize;
int threshold;
@@ -424,7 +423,7 @@ MemPool *e_mempool_new(int blocksize, in
switch (flags & E_MEMPOOL_ALIGN_MASK) {
case E_MEMPOOL_ALIGN_STRUCT:
default:
- pool->align = STRUCT_ALIGN-1;
+ pool->align = G_MEM_ALIGN-1;
break;
case E_MEMPOOL_ALIGN_WORD:
pool->align = 2-1;
@@ -450,27 +449,27 @@ void *e_mempool_alloc(MemPool *pool, reg
if (size>=pool->threshold) {
MemPoolThresholdNode *n;
- n = g_malloc(sizeof(*n) - sizeof(char) + size);
+ n = g_malloc(ALIGNED_SIZEOF(*n) + size);
n->next = pool->threshold_blocks;
pool->threshold_blocks = n;
- return &n->data[0];
+ return (char *) n + ALIGNED_SIZEOF(*n);
} else {
register MemPoolNode *n;
n = pool->blocks;
if (n && n->free >= size) {
n->free -= size;
- return &n->data[n->free];
+ return (char *) n + ALIGNED_SIZEOF(*n) + n->free;
}
/* maybe we could do some sort of the free blocks based on size, but
it doubt its worth it at all */
- n = g_malloc(sizeof(*n) - sizeof(char) + pool->blocksize);
+ n = g_malloc(ALIGNED_SIZEOF(*n) + pool->blocksize);
n->next = pool->blocks;
pool->blocks = n;
n->free = pool->blocksize - size;
- return &n->data[n->free];
+ return (char *) n + ALIGNED_SIZEOF(*n) + n->free;
}
}
@@ -535,7 +534,13 @@ void e_mempool_destroy(MemPool *pool)
{
if (pool) {
e_mempool_flush(pool, 1);
+#ifdef G_THREADS_ENABLED
+ g_static_mutex_lock(&mempool_mutex);
+#endif
e_memchunk_free(mempool_memchunk, pool);
+#ifdef G_THREADS_ENABLED
+ g_static_mutex_unlock(&mempool_mutex);
+#endif
}
}
Index: libedataserver/e-url.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-url.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 e-url.c
--- libedataserver/e-url.c 3 Nov 2003 18:23:56 -0000 1.1.1.1
+++ libedataserver/e-url.c 10 Jan 2005 06:31:19 -0000
@@ -56,7 +56,9 @@ e_url_shroud (const char *url)
}
if (first_colon && last_at && first_colon < last_at) {
- shrouded = g_strdup_printf ("%.*s%s", first_colon - url, url, last_at);
+ shrouded = g_malloc(first_colon - url + strlen(last_at)+1);
+ memcpy(shrouded, url, first_colon-url);
+ strcpy(shrouded + (first_colon-url), last_at);
} else {
shrouded = g_strdup (url);
}
Index: libedataserver/e-xml-hash-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-xml-hash-utils.c,v
retrieving revision 1.5
diff -u -p -r1.5 e-xml-hash-utils.c
--- libedataserver/e-xml-hash-utils.c 22 Apr 2004 19:15:51 -0000 1.5
+++ libedataserver/e-xml-hash-utils.c 10 Jan 2005 06:31:19 -0000
@@ -250,7 +250,7 @@ e_xmlhash_write (EXmlHash *hash)
filesave = g_alloca (strlen (hash->filename) + 5);
if ((slash = strrchr (hash->filename, '/')))
- sprintf (filesave, "%.*s.#%s", slash - hash->filename + 1, hash->filename, slash + 1);
+ sprintf (filesave, "%.*s.#%s", (int)(slash - hash->filename + 1), hash->filename, slash + 1);
else
sprintf (filesave, ".#%s", hash->filename);
Index: servers/groupwise/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/ChangeLog,v
retrieving revision 1.64.2.5
diff -u -p -r1.64.2.5 ChangeLog
--- servers/groupwise/ChangeLog 19 Nov 2004 17:31:45 -0000 1.64.2.5
+++ servers/groupwise/ChangeLog 10 Jan 2005 06:31:20 -0000
@@ -1,3 +1,8 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ * e-gw-item.c (e_gw_item_set_calendar_item_elements): cast strlen to int.
+ (append_event_changes_to_soap_message): same.
+
2004-11-18 Sivaiah Nallagatla <snallagatla novell com>
* e-gw-connection.c (e_gw_connection_new) : change
Index: servers/groupwise/e-gw-item.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-item.c,v
retrieving revision 1.45.2.2
diff -u -p -r1.45.2.2 e-gw-item.c
--- servers/groupwise/e-gw-item.c 7 Oct 2004 08:00:26 -0000 1.45.2.2
+++ servers/groupwise/e-gw-item.c 10 Jan 2005 06:31:20 -0000
@@ -1925,7 +1925,7 @@ e_gw_item_set_calendar_item_elements (EG
char *str;
str = soup_base64_encode (priv->message, strlen (priv->message));
- dtstring = g_strdup_printf ("%d", strlen (str));
+ dtstring = g_strdup_printf ("%d", (int)strlen (str));
soup_soap_message_add_attribute (msg, "length", dtstring, NULL, NULL);
g_free (dtstring);
soup_soap_message_write_string (msg, str);
@@ -2186,7 +2186,7 @@ append_event_changes_to_soap_message (EG
char *str, *message;
str = soup_base64_encode (priv->message, strlen (priv->message));
- message = g_strdup_printf ("%d", strlen (str));
+ message = g_strdup_printf ("%d", (int)strlen (str));
soup_soap_message_add_attribute (msg, "length", message, NULL, NULL);
g_free (message);
soup_soap_message_write_string (msg, str);
Index: addressbook/util/eab-book-util.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/util/eab-book-util.c,v
retrieving revision 1.7.12.2
diff -u -p -r1.7.12.2 eab-book-util.c
--- addressbook/util/eab-book-util.c 17 Nov 2004 20:57:34 -0000 1.7.12.2
+++ addressbook/util/eab-book-util.c 10 Jan 2005 06:35:03 -0000
@@ -108,7 +108,7 @@ eab_name_and_email_query (EBook *book,
while (*t && *t != '@')
++t;
if (*t == '@' && escaped_name) {
- email_query = g_strdup_printf ("(beginswith \"email\" \"% *s \")", t-escaped_email, escaped_email);
+ email_query = g_strdup_printf ("(beginswith \"email\" \"% *s \")", (int)(t-escaped_email), escaped_email);
} else {
email_query = g_strdup_printf ("(beginswith \"email\" \"%s\")", escaped_email);
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2500.2.28
diff -u -p -r1.2500.2.28 ChangeLog
--- calendar/ChangeLog 6 Dec 2004 15:39:32 -0000 1.2500.2.28
+++ calendar/ChangeLog 10 Jan 2005 06:35:05 -0000
@@ -1,3 +1,8 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ * gui/e-day-view.c (e_day_view_finish_resize): set
+ last_Edited_comp_string to NULL, not test it for null.
+
2004-12-06 Rodrigo Moya <rodrigo novell com>
Fixes #68077
Index: calendar/gui/e-day-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.c,v
retrieving revision 1.252.6.1
diff -u -p -r1.252.6.1 e-day-view.c
--- calendar/gui/e-day-view.c 2 Dec 2004 13:30:17 -0000 1.252.6.1
+++ calendar/gui/e-day-view.c 10 Jan 2005 06:35:07 -0000
@@ -3980,7 +3980,7 @@ e_day_view_finish_resize (EDayView *day_
if (day_view->last_edited_comp_string != NULL) {
g_free (day_view->last_edited_comp_string);
- day_view->last_edited_comp_string == NULL;
+ day_view->last_edited_comp_string = NULL;
}
day_view->last_edited_comp_string = e_cal_component_get_as_string (comp);
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.2251.2.30
diff -u -p -r1.2251.2.30 ChangeLog
--- camel/ChangeLog 6 Jan 2005 09:25:02 -0000 1.2251.2.30
+++ camel/ChangeLog 10 Jan 2005 06:35:08 -0000
@@ -1,3 +1,16 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ * camel-sasl-ntlm.c: convert all the unsigned long/long stuff to
+ guint32 since it seems to need 32 bit integers.
+
+ * camel-url.c (camel_url_new_with_base): cast length to int.
+
+ * providers/imap/camel-imap-command.c
+ (imap_command_strdup_vprintf): cast strlen to int.
+
+ * camel-mime-utils.c (append_quoted_pair, header_decode_text): use
+ gssize for length to match dumb g-api.
+
2004-12-23 Not Zed <NotZed Ximian com>
** See bug #70556.
Index: camel/camel-mime-parser.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-parser.c,v
retrieving revision 1.60.26.1
diff -u -p -r1.60.26.1 camel-mime-parser.c
--- camel/camel-mime-parser.c 30 Nov 2004 07:56:07 -0000 1.60.26.1
+++ camel/camel-mime-parser.c 10 Jan 2005 06:35:09 -0000
@@ -46,6 +46,8 @@
#include "camel-stream.h"
#include "camel-seekable-stream.h"
+#include "e-util/e-memory.h"
+
#define r(x)
#define h(x)
#define c(x)
@@ -57,8 +59,6 @@
#define MEMPOOL
-#define STRUCT_ALIGN 4
-
#ifdef PURIFY
int inend_id = -1,
inbuffer_id = -1;
@@ -71,115 +71,6 @@ int inend_id = -1,
#define _header_scan_state _CamelMimeParserPrivate
#define _PRIVATE(o) (((CamelMimeParser *)(o))->priv)
-#ifdef MEMPOOL
-typedef struct _MemPoolNode {
- struct _MemPoolNode *next;
-
- int free;
- char data[1];
-} MemPoolNode;
-
-typedef struct _MemPoolThresholdNode {
- struct _MemPoolThresholdNode *next;
- char data[1];
-} MemPoolThresholdNode;
-
-typedef struct _MemPool {
- int blocksize;
- int threshold;
- struct _MemPoolNode *blocks;
- struct _MemPoolThresholdNode *threshold_blocks;
-} MemPool;
-
-MemPool *mempool_new(int blocksize, int threshold);
-void *mempool_alloc(MemPool *pool, int size);
-void mempool_flush(MemPool *pool, int freeall);
-void mempool_free(MemPool *pool);
-
-MemPool *mempool_new(int blocksize, int threshold)
-{
- MemPool *pool;
-
- pool = g_malloc(sizeof(*pool));
- if (threshold >= blocksize)
- threshold = blocksize * 2 / 3;
- pool->blocksize = blocksize;
- pool->threshold = threshold;
- pool->blocks = NULL;
- pool->threshold_blocks = NULL;
- return pool;
-}
-
-void *mempool_alloc(MemPool *pool, int size)
-{
- size = (size + STRUCT_ALIGN) & (~(STRUCT_ALIGN-1));
- if (size>=pool->threshold) {
- MemPoolThresholdNode *n;
-
- n = g_malloc(sizeof(*n) - sizeof(char) + size);
- n->next = pool->threshold_blocks;
- pool->threshold_blocks = n;
- return &n->data[0];
- } else {
- MemPoolNode *n;
-
- n = pool->blocks;
- while (n) {
- if (n->free >= size) {
- n->free -= size;
- return &n->data[n->free];
- }
- n = n->next;
- }
-
- n = g_malloc(sizeof(*n) - sizeof(char) + pool->blocksize);
- n->next = pool->blocks;
- pool->blocks = n;
- n->free = pool->blocksize - size;
- return &n->data[n->free];
- }
-}
-
-void mempool_flush(MemPool *pool, int freeall)
-{
- MemPoolThresholdNode *tn, *tw;
- MemPoolNode *pw, *pn;
-
- tw = pool->threshold_blocks;
- while (tw) {
- tn = tw->next;
- g_free(tw);
- tw = tn;
- }
- pool->threshold_blocks = NULL;
-
- if (freeall) {
- pw = pool->blocks;
- while (pw) {
- pn = pw->next;
- g_free(pw);
- pw = pn;
- }
- pool->blocks = NULL;
- } else {
- pw = pool->blocks;
- while (pw) {
- pw->free = pool->blocksize;
- pw = pw->next;
- }
- }
-}
-
-void mempool_free(MemPool *pool)
-{
- if (pool) {
- mempool_flush(pool, 1);
- g_free(pool);
- }
-}
-
-#endif
-
struct _header_scan_state {
/* global state */
@@ -232,7 +123,7 @@ struct _header_scan_stack {
enum _camel_mime_parser_state savestate; /* state at invocation of this part */
#ifdef MEMPOOL
- MemPool *pool; /* memory pool to keep track of headers/etc at this level */
+ EMemPool *pool; /* memory pool to keep track of headers/etc at this level */
#endif
struct _camel_header_raw *headers; /* headers for this part */
@@ -1067,7 +958,7 @@ folder_pull_part(struct _header_scan_sta
s->parts = h->parent;
g_free(h->boundary);
#ifdef MEMPOOL
- mempool_free(h->pool);
+ e_mempool_destroy(h->pool);
#else
camel_header_raw_clear(&h->headers);
#endif
@@ -1175,18 +1066,18 @@ header_append_mempool(struct _header_sca
content = strchr(header, ':');
if (content) {
register int len;
- n = mempool_alloc(h->pool, sizeof(*n));
+ n = e_mempool_alloc(h->pool, sizeof(*n));
n->next = NULL;
len = content-header;
- n->name = mempool_alloc(h->pool, len+1);
+ n->name = e_mempool_alloc(h->pool, len+1);
memcpy(n->name, header, len);
n->name[len] = 0;
content++;
len = s->outptr - content;
- n->value = mempool_alloc(h->pool, len+1);
+ n->value = e_mempool_alloc(h->pool, len+1);
memcpy(n->value, content, len);
n->value[len] = 0;
@@ -1246,7 +1137,7 @@ folder_scan_header(struct _header_scan_s
h = g_malloc0(sizeof(*h));
#ifdef MEMPOOL
- h->pool = mempool_new(8192, 4096);
+ h->pool = e_mempool_new(8192, 4096, E_MEMPOOL_ALIGN_STRUCT);
#endif
if (s->parts)
Index: camel/camel-mime-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-utils.c,v
retrieving revision 1.214.2.3
diff -u -p -r1.214.2.3 camel-mime-utils.c
--- camel/camel-mime-utils.c 30 Nov 2004 07:56:07 -0000 1.214.2.3
+++ camel/camel-mime-utils.c 10 Jan 2005 06:35:10 -0000
@@ -1118,8 +1118,8 @@ append_8bit (GString *out, const char *i
}
-static void
-append_quoted_pair (GString *str, const char *in, int inlen)
+static GString *
+append_quoted_pair (GString *str, const char *in, gssize inlen)
{
register const char *inptr = in;
const char *inend = in + inlen;
@@ -1132,6 +1132,8 @@ append_quoted_pair (GString *str, const
else
g_string_append_c (str, c);
}
+
+ return str;
}
/* decodes a simple text, rfc822 + rfc2047 */
@@ -1140,7 +1142,7 @@ header_decode_text (const char *in, size
{
GString *out;
const char *inptr, *inend, *start, *chunk, *locale_charset;
- void (* append) (GString *, const char *, int);
+ GString *(* append) (GString *, const char *, gssize);
char *dword = NULL;
guint32 mask;
Index: camel/camel-sasl-ntlm.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-sasl-ntlm.c,v
retrieving revision 1.1
diff -u -p -r1.1 camel-sasl-ntlm.c
--- camel/camel-sasl-ntlm.c 8 Feb 2002 01:56:44 -0000 1.1
+++ camel/camel-sasl-ntlm.c 10 Jan 2005 06:35:10 -0000
@@ -144,7 +144,7 @@ static void md4sum (const
unsigned char digest[16]);
/* DES */
-typedef unsigned long DES_KS[16][2]; /* Single-key DES key schedule */
+typedef guint32 DES_KS[16][2]; /* Single-key DES key schedule */
static void deskey (DES_KS, unsigned char *, int);
@@ -379,7 +379,7 @@ md4sum (const unsigned char *in, int nby
/* Public domain DES implementation from Phil Karn */
-static unsigned long Spbox[8][64] = {
+static guint32 Spbox[8][64] = {
{ 0x01010400, 0x00000000, 0x00010000, 0x01010404,
0x01010004, 0x00010404, 0x00000004, 0x00010000,
0x00000400, 0x01010400, 0x01010404, 0x00000400,
@@ -526,20 +526,20 @@ static unsigned long Spbox[8][64] = {
/* Encrypt or decrypt a block of data in ECB mode */
static void
des(ks,block)
-unsigned long ks[16][2]; /* Key schedule */
+guint32 ks[16][2]; /* Key schedule */
unsigned char block[8]; /* Data block */
{
- unsigned long left,right,work;
+ guint32 left,right,work;
/* Read input block and place in left/right in big-endian order */
- left = ((unsigned long)block[0] << 24)
- | ((unsigned long)block[1] << 16)
- | ((unsigned long)block[2] << 8)
- | (unsigned long)block[3];
- right = ((unsigned long)block[4] << 24)
- | ((unsigned long)block[5] << 16)
- | ((unsigned long)block[6] << 8)
- | (unsigned long)block[7];
+ left = ((guint32)block[0] << 24)
+ | ((guint32)block[1] << 16)
+ | ((guint32)block[2] << 8)
+ | (guint32)block[3];
+ right = ((guint32)block[4] << 24)
+ | ((guint32)block[5] << 16)
+ | ((guint32)block[6] << 8)
+ | (guint32)block[7];
/* Hoey's clever initial permutation algorithm, from Outerbridge
* (see Schneier p 478)
@@ -694,13 +694,13 @@ int decrypt; /* 0 = encrypt, 1 = decry
}
}
/* Now convert to packed odd/even interleaved form */
- k[i][0] = ((long)ks[0] << 24)
- | ((long)ks[2] << 16)
- | ((long)ks[4] << 8)
- | ((long)ks[6]);
- k[i][1] = ((long)ks[1] << 24)
- | ((long)ks[3] << 16)
- | ((long)ks[5] << 8)
- | ((long)ks[7]);
+ k[i][0] = ((guint32)ks[0] << 24)
+ | ((guint32)ks[2] << 16)
+ | ((guint32)ks[4] << 8)
+ | ((guint32)ks[6]);
+ k[i][1] = ((guint32)ks[1] << 24)
+ | ((guint32)ks[3] << 16)
+ | ((guint32)ks[5] << 8)
+ | ((guint32)ks[7]);
}
}
Index: camel/camel-url.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-url.c,v
retrieving revision 1.40
diff -u -p -r1.40 camel-url.c
--- camel/camel-url.c 11 Jun 2004 08:28:41 -0000 1.40
+++ camel/camel-url.c 10 Jan 2005 06:35:11 -0000
@@ -213,7 +213,7 @@ camel_url_new_with_base (CamelURL *base,
last = strrchr (base->path, '/');
if (last) {
newpath = g_strdup_printf ("%.*s/%s",
- last - base->path,
+ (int)(last - base->path),
base->path,
url->path);
} else
Index: camel/providers/imap/camel-imap-command.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-command.c,v
retrieving revision 1.60.26.3
diff -u -p -r1.60.26.3 camel-imap-command.c
--- camel/providers/imap/camel-imap-command.c 6 Jan 2005 09:25:03 -0000 1.60.26.3
+++ camel/providers/imap/camel-imap-command.c 10 Jan 2005 06:35:11 -0000
@@ -807,7 +807,7 @@ imap_command_strdup_vprintf (CamelImapSt
outptr += sprintf (outptr, "%s", string);
} else {
if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS) {
- outptr += sprintf (outptr, "{%d+}\r\n%s", strlen (string), string);
+ outptr += sprintf (outptr, "{%d+}\r\n%s", (int)strlen(string), string);
} else {
char *quoted = imap_quote_string (string);
Index: composer/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.657.2.4
diff -u -p -r1.657.2.4 ChangeLog
--- composer/ChangeLog 11 Oct 2004 16:50:47 -0000 1.657.2.4
+++ composer/ChangeLog 10 Jan 2005 06:35:11 -0000
@@ -1,3 +1,8 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ * e-msg-composer-attachment-bar.c (popup_menu_placement_callback):
+ use cast macro to cast index.
+
2004-10-08 Jeffrey Stedfast <fejj novell com>
* e-msg-composer.c (build_message): g_strdup() the gpg/smime keys
Index: composer/e-msg-composer-attachment-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-attachment-bar.c,v
retrieving revision 1.89
diff -u -p -r1.89 e-msg-composer-attachment-bar.c
--- composer/e-msg-composer-attachment-bar.c 25 May 2004 03:24:01 -0000 1.89
+++ composer/e-msg-composer-attachment-bar.c 10 Jan 2005 06:35:11 -0000
@@ -560,7 +560,7 @@ popup_menu_placement_callback (GtkMenu *
if (selection == NULL)
return;
- image = gnome_icon_list_get_icon_pixbuf_item (icon_list, (gint)selection->data);
+ image = gnome_icon_list_get_icon_pixbuf_item (icon_list, GPOINTER_TO_INT(selection->data));
if (image == NULL)
return;
Index: e-util/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.481.2.3
diff -u -p -r1.481.2.3 ChangeLog
--- e-util/ChangeLog 2 Nov 2004 02:32:32 -0000 1.481.2.3
+++ e-util/ChangeLog 10 Jan 2005 06:35:12 -0000
@@ -1,3 +1,8 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ * e-url.c (e_url_shroud): dont' use '%.*s' for truncating string
+ output.
+
2004-11-01 Not Zed <NotZed Ximian com>
** See bug #68787
Index: e-util/e-memory.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/Attic/e-memory.c,v
retrieving revision 1.19
diff -u -p -r1.19 e-memory.c
--- e-util/e-memory.c 5 Jan 2004 10:58:53 -0000 1.19
+++ e-util/e-memory.c 10 Jan 2005 06:35:12 -0000
@@ -100,8 +100,6 @@ checkmem(void *p)
/* mempool class */
-#define STRUCT_ALIGN (4)
-
typedef struct _MemChunkFreeNode {
struct _MemChunkFreeNode *next;
unsigned int atoms;
@@ -357,14 +355,14 @@ typedef struct _MemPoolNode {
struct _MemPoolNode *next;
int free;
- char data[1];
} MemPoolNode;
typedef struct _MemPoolThresholdNode {
struct _MemPoolThresholdNode *next;
- char data[1];
} MemPoolThresholdNode;
+#define ALIGNED_SIZEOF(t) ((sizeof (t) + G_MEM_ALIGN - 1) & -G_MEM_ALIGN)
+
typedef struct _EMemPool {
int blocksize;
int threshold;
@@ -425,7 +423,7 @@ MemPool *e_mempool_new(int blocksize, in
switch (flags & E_MEMPOOL_ALIGN_MASK) {
case E_MEMPOOL_ALIGN_STRUCT:
default:
- pool->align = STRUCT_ALIGN-1;
+ pool->align = G_MEM_ALIGN-1;
break;
case E_MEMPOOL_ALIGN_WORD:
pool->align = 2-1;
@@ -451,27 +449,27 @@ void *e_mempool_alloc(MemPool *pool, reg
if (size>=pool->threshold) {
MemPoolThresholdNode *n;
- n = g_malloc(sizeof(*n) - sizeof(char) + size);
+ n = g_malloc(ALIGNED_SIZEOF(*n) + size);
n->next = pool->threshold_blocks;
pool->threshold_blocks = n;
- return &n->data[0];
+ return (char *) n + ALIGNED_SIZEOF(*n);
} else {
register MemPoolNode *n;
n = pool->blocks;
if (n && n->free >= size) {
n->free -= size;
- return &n->data[n->free];
+ return (char *) n + ALIGNED_SIZEOF(*n) + n->free;
}
/* maybe we could do some sort of the free blocks based on size, but
it doubt its worth it at all */
- n = g_malloc(sizeof(*n) - sizeof(char) + pool->blocksize);
+ n = g_malloc(ALIGNED_SIZEOF(*n) + pool->blocksize);
n->next = pool->blocks;
pool->blocks = n;
n->free = pool->blocksize - size;
- return &n->data[n->free];
+ return (char *) n + ALIGNED_SIZEOF(*n) + n->free;
}
}
Index: e-util/e-url.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-url.c,v
retrieving revision 1.11
diff -u -p -r1.11 e-url.c
--- e-util/e-url.c 8 May 2003 14:18:45 -0000 1.11
+++ e-util/e-url.c 10 Jan 2005 06:35:12 -0000
@@ -56,7 +56,9 @@ e_url_shroud (const char *url)
}
if (first_colon && last_at && first_colon < last_at) {
- shrouded = g_strdup_printf ("%.*s%s", first_colon - url, url, last_at);
+ shrouded = g_malloc(first_colon - url + strlen(last_at)+1);
+ memcpy(shrouded, url, first_colon-url);
+ strcpy(shrouded + (first_colon-url), last_at);
} else {
shrouded = g_strdup (url);
}
Index: filter/filter-part.c
===================================================================
RCS file: /cvs/gnome/evolution/filter/filter-part.c,v
retrieving revision 1.27
diff -u -p -r1.27 filter-part.c
--- filter/filter-part.c 17 Jun 2004 07:34:07 -0000 1.27
+++ filter/filter-part.c 10 Jan 2005 06:35:13 -0000
@@ -489,7 +489,7 @@ filter_part_expand_code (FilterPart *ff,
fe = filter_part_find_element (ff, name);
d(printf("expand code: looking up variab le '%s' = %p\n", ff, name, fe));
if (fe) {
- g_string_append_printf (out, "%.*s", newstart-start, start);
+ g_string_append_printf (out, "%.*s", (int)(newstart-start), start);
filter_element_format_sexp (fe, out);
#if 0
} else if ((val = g_hash_table_lookup (ff->globals, name))) {
@@ -497,7 +497,7 @@ filter_part_expand_code (FilterPart *ff,
e_sexp_encode_string (out, val);
#endif
} else {
- g_string_append_printf (out, "%.*s", end-start+1, start);
+ g_string_append_printf (out, "%.*s", (int)(end-start+1), start);
}
start = end + 1;
}
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3444.2.32
diff -u -p -r1.3444.2.32 ChangeLog
--- mail/ChangeLog 2 Dec 2004 04:11:04 -0000 1.3444.2.32
+++ mail/ChangeLog 10 Jan 2005 06:35:16 -0000
@@ -1,3 +1,11 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ * mail-account-gui.c (save_service): dont skip the authtype
+ setting if we don't have a needsauth widget at all (i.e. the store
+ page).
+
+ * em-folder-tree.c (emft_get_folder_info__desc): fix broken cast.
+
2004-12-01 Not Zed <NotZed Ximian com>
** See bug #69851.
Index: mail/em-folder-tree.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-tree.c,v
retrieving revision 1.125.4.5
diff -u -p -r1.125.4.5 em-folder-tree.c
--- mail/em-folder-tree.c 6 Oct 2004 09:25:13 -0000 1.125.4.5
+++ mail/em-folder-tree.c 10 Jan 2005 06:35:16 -0000
@@ -1700,7 +1700,7 @@ struct _EMFolderTreeGetFolderInfo {
static char *
emft_get_folder_info__desc(struct _mail_msg *mm, int done)
{
- struct _EMFolderTreeGetFolderInfo *m = (struct _get_folderinfo_msg *)mm;
+ struct _EMFolderTreeGetFolderInfo *m = (struct _EMFolderTreeGetFolderInfo *)mm;
char *ret, *name;
name = camel_service_get_name((CamelService *)m->store, TRUE);
Index: mail/mail-account-gui.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/Attic/mail-account-gui.c,v
retrieving revision 1.171.14.10
diff -u -p -r1.171.14.10 mail-account-gui.c
--- mail/mail-account-gui.c 2 Dec 2004 04:11:04 -0000 1.171.14.10
+++ mail/mail-account-gui.c 10 Jan 2005 06:35:17 -0000
@@ -2306,7 +2306,7 @@ save_service (MailAccountGuiService *gsv
}
if (CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_AUTH) && url->user) {
- if (gsvc->needs_auth && gtk_toggle_button_get_active(gsvc->needs_auth)) {
+ if (gsvc->needs_auth == NULL || gtk_toggle_button_get_active(gsvc->needs_auth)) {
CamelServiceAuthType *authtype;
authtype = g_object_get_data(G_OBJECT(gsvc->authitem), "authtype");
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.139.2.23
diff -u -p -r1.139.2.23 ChangeLog
--- ChangeLog 21 Dec 2004 08:57:25 -0000 1.139.2.23
+++ ChangeLog 10 Jan 2005 06:24:08 -0000
@@ -1,3 +1,12 @@
+2005-01-10 Not Zed <NotZed Ximian com>
+
+ * mail/mail-stub.c (mail_stub_read_args): long/int ->uint32.
+ (mail_stub_return_data): "
+
+ * camel/camel-stub.c (stub_send_internal): uint32 should be a
+ uint32, not a long.
+ (stub_send_internal): same for uint32array and int
+
2004-12-21 Sarfraaz Ahmed <asarfraaz novell com>
* calendar/e-cal-backend-exchange.c (e_cal_backend_exchange_add_object):
Index: camel/camel-stub.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/camel/camel-stub.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 camel-stub.c
--- camel/camel-stub.c 11 May 2004 15:15:58 -0000 1.1.1.2
+++ camel/camel-stub.c 10 Jan 2005 06:24:08 -0000
@@ -224,7 +224,7 @@ stub_send_internal (CamelStub *stub, Cam
case CAMEL_STUB_ARG_UINT32:
{
- unsigned long val = va_arg (ap, unsigned long);
+ guint32 val = va_arg (ap, guint32);
camel_stub_marshal_encode_uint32 (stub->cmd, val);
break;
@@ -272,7 +272,7 @@ stub_send_internal (CamelStub *stub, Cam
camel_stub_marshal_encode_uint32 (stub->cmd, arr->len);
for (i = 0; i < arr->len; i++)
- camel_stub_marshal_encode_uint32 (stub->cmd, g_array_index (arr, int, i));
+ camel_stub_marshal_encode_uint32 (stub->cmd, g_array_index (arr, guint32, i));
break;
}
@@ -337,7 +337,7 @@ stub_send_internal (CamelStub *stub, Cam
case CAMEL_STUB_ARG_UINT32:
{
- unsigned long *val = va_arg (ap, unsigned long *);
+ guint32 *val = va_arg (ap, guint32 *);
guint32 val32;
status = camel_stub_marshal_decode_uint32 (stub->cmd, &val32);
@@ -402,7 +402,7 @@ stub_send_internal (CamelStub *stub, Cam
status = camel_stub_marshal_decode_uint32 (stub->cmd, &len);
if (status == -1)
break;
- *arr = g_array_new (FALSE, FALSE, sizeof (int));
+ *arr = g_array_new (FALSE, FALSE, sizeof (guint32));
for (i = 0; i< len && status != -1; i++) {
status = camel_stub_marshal_decode_uint32 (stub->cmd, &unread_count);
if (status != -1)
Index: mail/mail-stub.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/mail/mail-stub.c,v
retrieving revision 1.3
diff -u -p -r1.3 mail-stub.c
--- mail/mail-stub.c 21 May 2004 18:42:08 -0000 1.3
+++ mail/mail-stub.c 10 Jan 2005 06:24:08 -0000
@@ -426,7 +426,7 @@ mail_stub_read_args (MailStub *stub, ...
case CAMEL_STUB_ARG_UINT32:
{
- unsigned long *val = va_arg (ap, unsigned long *);
+ guint32 *val = va_arg (ap, guint32 *);
guint32 val32;
status = camel_stub_marshal_decode_uint32 (stub->cmd, &val32);
@@ -488,7 +488,7 @@ mail_stub_read_args (MailStub *stub, ...
status = camel_stub_marshal_decode_uint32 (stub->cmd, &len);
if (status == -1)
break;
- *arr = g_array_new (FALSE, FALSE, sizeof (int));
+ *arr = g_array_new (FALSE, FALSE, sizeof (guint32));
for (i = 0; i< len && status != -1; i++) {
status = camel_stub_marshal_decode_uint32 (stub->cmd, &unread_count);
if (status != -1)
@@ -549,7 +549,7 @@ mail_stub_return_data (MailStub *stub, C
case CAMEL_STUB_ARG_UINT32:
{
- unsigned long val = va_arg (ap, unsigned long);
+ guint32 val = va_arg (ap, guint32);
camel_stub_marshal_encode_uint32 (marshal, val);
break;
@@ -601,7 +601,7 @@ mail_stub_return_data (MailStub *stub, C
camel_stub_marshal_encode_uint32 (marshal, arr->len);
for (i = 0; i < arr->len; i++)
- camel_stub_marshal_encode_uint32 (marshal, g_array_index (arr, int, i));
+ camel_stub_marshal_encode_uint32 (marshal, g_array_index (arr, guint32, i));
break;
}
Index: xntlm/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/xntlm/ChangeLog,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 ChangeLog
--- xntlm/ChangeLog 11 May 2004 15:15:58 -0000 1.1.1.2
+++ xntlm/ChangeLog 10 Jan 2005 06:24:08 -0000
@@ -1,3 +1,10 @@
+2005-01-08 Not Zed <NotZed Ximian com>
+
+ ** See Ximian Bug #70323.
+
+ * xntlm-md4.c, xntlm-des.c: convert all unsigned long/long to
+ guint32, it expects them to be 32 bits.
+
2004-04-23 Dan Winship <danw ximian com>
* xntlm.c (xntlm_negotiate): Redo the doc comment to make gtk-doc
Index: xntlm/xntlm-des.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/xntlm/xntlm-des.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 xntlm-des.c
--- xntlm/xntlm-des.c 11 May 2004 15:15:58 -0000 1.1.1.2
+++ xntlm/xntlm-des.c 10 Jan 2005 06:24:09 -0000
@@ -26,7 +26,7 @@
/* Public domain DES implementation from Phil Karn */
-static unsigned long Spbox[8][64] = {
+static guint32 Spbox[8][64] = {
{ 0x01010400,0x00000000,0x00010000,0x01010404,
0x01010004,0x00010404,0x00000004,0x00010000,
0x00000400,0x01010400,0x01010404,0x00000400,
@@ -174,17 +174,17 @@ static unsigned long Spbox[8][64] = {
void
xntlm_des(XNTLM_DES_KS ks, unsigned char block[8])
{
- unsigned long left,right,work;
+ guint32 left,right,work;
/* Read input block and place in left/right in big-endian order */
- left = ((unsigned long)block[0] << 24)
- | ((unsigned long)block[1] << 16)
- | ((unsigned long)block[2] << 8)
- | (unsigned long)block[3];
- right = ((unsigned long)block[4] << 24)
- | ((unsigned long)block[5] << 16)
- | ((unsigned long)block[6] << 8)
- | (unsigned long)block[7];
+ left = ((guint32)block[0] << 24)
+ | ((guint32)block[1] << 16)
+ | ((guint32)block[2] << 8)
+ | (guint32)block[3];
+ right = ((guint32)block[4] << 24)
+ | ((guint32)block[5] << 16)
+ | ((guint32)block[6] << 8)
+ | (guint32)block[7];
/* Hoey's clever initial permutation algorithm, from Outerbridge
* (see Schneier p 478)
@@ -336,13 +336,13 @@ xntlm_deskey(XNTLM_DES_KS k, const unsig
}
}
/* Now convert to packed odd/even interleaved form */
- k[i][0] = ((long)ks[0] << 24)
- | ((long)ks[2] << 16)
- | ((long)ks[4] << 8)
- | ((long)ks[6]);
- k[i][1] = ((long)ks[1] << 24)
- | ((long)ks[3] << 16)
- | ((long)ks[5] << 8)
- | ((long)ks[7]);
+ k[i][0] = ((guint32)ks[0] << 24)
+ | ((guint32)ks[2] << 16)
+ | ((guint32)ks[4] << 8)
+ | ((guint32)ks[6]);
+ k[i][1] = ((guint32)ks[1] << 24)
+ | ((guint32)ks[3] << 16)
+ | ((guint32)ks[5] << 8)
+ | ((guint32)ks[7]);
}
}
Index: xntlm/xntlm-des.h
===================================================================
RCS file: /cvs/gnome/evolution-exchange/xntlm/xntlm-des.h,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 xntlm-des.h
--- xntlm/xntlm-des.h 11 May 2004 15:15:58 -0000 1.1.1.2
+++ xntlm/xntlm-des.h 10 Jan 2005 06:24:09 -0000
@@ -4,7 +4,9 @@
#ifndef _XNTLM_DES_H
#define _XNTLM_DES_H
-typedef unsigned long XNTLM_DES_KS[16][2];
+#include <glib/gtypes.h>
+
+typedef guint32 XNTLM_DES_KS[16][2];
enum {
XNTLM_DES_ENCRYPT = 0,
Index: xntlm/xntlm-md4.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/xntlm/xntlm-md4.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 xntlm-md4.c
--- xntlm/xntlm-md4.c 11 May 2004 15:09:04 -0000 1.1.1.1
+++ xntlm/xntlm-md4.c 10 Jan 2005 06:24:09 -0000
@@ -21,6 +21,7 @@
#include <config.h>
#endif
+#include <glib/gtypes.h>
#include "xntlm-md4.h"
#include <string.h>
@@ -36,10 +37,10 @@
static void
md4sum_round (const unsigned char *M,
- unsigned long *AA, unsigned long *BB,
- unsigned long *CC, unsigned long *DD)
+ guint32 *AA, guint32 *BB,
+ guint32 *CC, guint32 *DD)
{
- unsigned long A, B, C, D, X[16];
+ guint32 A, B, C, D, X[16];
int i;
for (i = 0; i < 16; i++) {
@@ -121,7 +122,7 @@ void
xntlm_md4sum (const unsigned char *in, int nbytes, unsigned char digest[16])
{
unsigned char M[128];
- unsigned long A, B, C, D;
+ guint32 A, B, C, D;
int pbytes, nbits = nbytes * 8, remaining_bytes;
int total_len, offset;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]