From: Armin B. <arm...@de...> - 2005-10-16 18:03:29
|
Great! I have been looking for a nice way to avoid those crashes on 64 bit platforms but i didnt know that the glib provides macros for this. So i think this should solve the problems for these platforms now. Thanks for your help. i also fixed these problems in opensync and the unit tests. in libsyncml i will fix the problems in my branch so i wont commit these changes to the trunk until i merge my current working branch. Armin Michael Kolmodin wrote: > Been experimenting with opensync on Fedora-4-x86_64 platform (Athlon64). > Please find enclosed the two patches I have been using against trunk to > make it compile. As usual, the patches are about integer - pointer > conversions. > > As of now, I can not confirm anything more than that msynctool doesnt > crash on startup with these, and that the tracing seems to work. On the > other hand they are are pretty trivial and should'nt really change > anything. (Yes, I have heard that before, but still... ;-) ). > > ------------------------------------------------------------------------------- > > > diff --exclude=.svn -C 2 -r libsyncml-org/libsyncml/sml_support.c > libsyncml/libsyncml/sml_support.c > *** libsyncml-org/libsyncml/sml_support.c 2005-10-13 > 22:40:22.000000000 +0200 > --- libsyncml/libsyncml/sml_support.c 2005-10-13 22:27:05.000000000 +0200 > *************** > *** 85,89 **** > current_tabs = g_private_new (g_free); > else > ! tabs = (int)g_private_get(current_tabs); > > unsigned long int id = (unsigned long int)pthread_self(); > --- 85,89 ---- > current_tabs = g_private_new (g_free); > else > ! tabs = GPOINTER_TO_INT( g_private_get(current_tabs) ); > > unsigned long int id = (unsigned long int)pthread_self(); > *************** > *** 126,130 **** > break; > } > ! g_private_set(current_tabs, (void *)tabs); > va_end(arglist); > > --- 126,130 ---- > break; > } > ! g_private_set(current_tabs, GINT_TO_POINTER(tabs) ); > va_end(arglist); > > ------------------------------------------------------------------------ > diff --exclude=.svn -C 2 -r opensync-org/opensync/opensync_debug.c > opensync/opensync/opensync_debug.c > *** opensync-org/opensync/opensync_debug.c 2005-10-13 > 22:59:14.000000000 +0200 > --- opensync/opensync/opensync_debug.c 2005-10-13 22:34:38.000000000 > +0200 > *************** > *** 63,67 **** > current_tabs = g_private_new (NULL); > else > ! tabs = (int)g_private_get(current_tabs); > > unsigned long int id = (unsigned long int)pthread_self(); > --- 63,67 ---- > current_tabs = g_private_new (NULL); > else > ! tabs = GPOINTER_TO_INT( g_private_get(current_tabs) ); > > unsigned long int id = (unsigned long int)pthread_self(); > *************** > *** 101,105 **** > break; > } > ! g_private_set(current_tabs, (void *)tabs); > va_end(arglist); > > --- 101,105 ---- > break; > } > ! g_private_set(current_tabs, GINT_TO_POINTER(tabs)); > va_end(arglist); > > diff --exclude=.svn -C 2 -r opensync-org/osengine/osengine_engine.c > opensync/osengine/osengine_engine.c > *** opensync-org/osengine/osengine_engine.c 2005-10-13 > 22:59:20.000000000 +0200 > --- opensync/osengine/osengine_engine.c 2005-10-13 23:05:26.000000000 > +0200 > *************** > *** 308,312 **** > ITMessage *message = itm_message_new_methodcall(sender, > "GET_CHANGES"); > itm_message_set_handler(message, sender->incoming, > (ITMessageHandler)_get_changes_reply_receiver, sender); > ! itm_message_set_data(message, "data", (void *)data); > osync_debug("ENG", 3, "Sending get_changes message %p to client > %p", message, target); > > --- 308,312 ---- > ITMessage *message = itm_message_new_methodcall(sender, > "GET_CHANGES"); > itm_message_set_handler(message, sender->incoming, > (ITMessageHandler)_get_changes_reply_receiver, sender); > ! itm_message_set_data(message, "data", GINT_TO_POINTER(data)); > osync_debug("ENG", 3, "Sending get_changes message %p to client > %p", message, target); > > ------------------------------------------------------------------------------- > > --michael > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Opensync-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensync-users |