[gst-devel] Re: Forte Solaris patch

David Schleef ds at schleef.org
Fri Jan 17 12:41:02 CET 2003


On Fri, Jan 17, 2003 at 05:13:30PM +0000, Brian Cameron wrote:

> Index: gstreamer/gst/cothreads.c
> ===================================================================
> RCS file: /cvsroot/gstreamer/gstreamer/gst/cothreads.c,v
> retrieving revision 1.105
> diff -u -p -r1.105 cothreads.c
> --- gstreamer/gst/cothreads.c	1 Jan 2003 04:28:32 -0000	1.105
> +++ gstreamer/gst/cothreads.c	17 Jan 2003 16:44:51 -0000
> @@ -36,6 +36,11 @@
>  #include "gstarch.h"
>  #include "gstlog.h"
>  #include "gstutils.h"
> +#ifdef HAVE_MAKECONTEXT
> +#ifdef HAVE_UCONTEXT_H
> +    #include <ucontext.h>
> +#endif
> +#endif
>  
>  /* older glibc's have MAP_ANON instead of MAP_ANONYMOUS */
>  #ifndef MAP_ANONYMOUS
> @@ -101,8 +106,14 @@ cothread_get_current_context (void)
>  cothread_context *
>  cothread_context_init (void)
>  {
> +#ifndef __GNUC__
> +  char __csf;
> +  void *sp = &__csf;
> +#else
> +  void *sp = CURRENT_STACK_FRAME
> +#endif

The non-gcc version should be our preferred method of getting the
stack frame anyway.

>  /***** Sun SPARC *****/
> -#elif defined(HAVE_CPU_SPARC)
> +#elif defined(HAVE_CPU_SPARC) && defined(__GNUC__)

Arguably, the entire header should be inside defined(__GNUC__).

> +#ifdef __GNUC__
>  inline void * _gst_debug_register_funcptr (void *ptr, gchar *ptrname);
> +#else
> +void * _gst_debug_register_funcptr (void *ptr, gchar *ptrname);
> +#endif

Is there a top-level define that tells us if we can use inline or
not?



dave...





More information about the gstreamer-devel mailing list