From: Richard Boulton Date: Fri, 4 Feb 2000 02:25:34 +0000 (+0000) Subject: Compile a test program to ensure that we have working atomic resource counting. X-Git-Tag: RELEASE-0_1_0-SLIPSTREAM~440 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d5807c0d59992396a1202b153df09feb77e7296;p=platform%2Fupstream%2Fgstreamer.git Compile a test program to ensure that we have working atomic resource counting. Original commit message from CVS: Compile a test program to ensure that we have working atomic resource counting. A few small changes (include headers, fix a cast) to stop compiler warnings. --- diff --git a/configure.in b/configure.in index 9ad6fdc..d715296 100644 --- a/configure.in +++ b/configure.in @@ -86,13 +86,23 @@ dnl Check for atomic.h dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H) AC_CHECK_HEADER(asm/atomic.h, HAVE_ATOMIC_H=yes, HAVE_ATOMIC_H=no) -AC_EGREP_HEADER(atomic_set, asm/atomic.h,, - [ - if test x$HAVE_ATOMIC_H = xyes; then - AC_MSG_WARN("Atomic reference counting is out of date: doing without.") - fi - HAVE_ATOMIC_H=no -]) +dnl Do a compile to check that it has atomic_set (eg, linux 2.0 didn't) +if test x$HAVE_ATOMIC_H = xyes; then + AC_TRY_RUN([ +#include "asm/atomic.h" +main() { atomic_t t; atomic_set(&t,0); return 0;} + ],, [ + # Not successful + if test x$HAVE_ATOMIC_H = xyes; then + AC_MSG_WARN(Atomic reference counting is out of date: doing without.) + fi + HAVE_ATOMIC_H=no + ], [ + # Cross compiling + AC_MSG_RESULT(yes) + AC_MSG_WARN(Can't check properly for atomic reference counting. Assuming OK.) + ]) +fi dnl Check for MMX capable compiler AC_MSG_CHECKING(Checking MMX compilation) diff --git a/gst/gstelement.c b/gst/gstelement.c index 1d8d365..84ecc8b 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -422,7 +422,7 @@ xmlNodePtr gst_element_save_thyself(GstElement *element,xmlNodePtr parent) { while (pads) { pad = GST_PAD(pads->data); // figure out if it's a direct pad or a ghostpad - if (pad->parent == element) + if (GST_ELEMENT(pad->parent) == element) gst_pad_save_thyself(pad,self); pads = g_list_next(pads); } @@ -535,6 +535,7 @@ void gst_element_set_loop_function(GstElement *element, GstElementLoopFunction loop) { element->loopfunc = loop; if (element->threadstate != NULL) + // note that this casts a GstElement * to a char **. Ick. cothread_setfunc(element->threadstate,gst_element_loopfunc_wrapper, - 0,element); + 0,(char **)element); } diff --git a/gst/gstplugin.c b/gst/gstplugin.c index c7ca374..428f084 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -22,6 +22,7 @@ #include #include #include +#include #include