[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-cvslog
Subject:    [xine-cvs] HG: xine-lib-1.2: Merge from 1.1.
From:       Darren Salt <linux () youmustbejoking ! demon ! co ! uk>
Date:       2008-05-29 15:04:27
Message-ID: 1c99f4be72958c5f4a6b.1212073415 () hg ! debian ! org
[Download RAW message or body]

# HG changeset patch
# User Darren Salt <linux@youmustbejoking.demon.co.uk>
# Date 1212073415 -3600
# Node ID 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547
# Parent  bf9ec0684ac0bebf6fcbc621d3a81643a698996d
# Parent  eea1ed47b8f9571cd162bba3ae4652d58647c5f5
Merge from 1.1.

diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d .hgignore
--- a/.hgignore	Thu May 29 16:03:35 2008 +0100
+++ b/.hgignore	Thu May 29 14:13:00 2008 +0100
@@ -47,6 +47,7 @@ debian/libxine2-doc
 debian/libxine2-doc
 debian/tmp
 debian/*.debhelper
+debian/*.debhelper.log
 debian/*.substvars
 
 contrib/ffmpeg/*.pc
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d configure.ac
--- a/configure.ac	Thu May 29 16:03:35 2008 +0100
+++ b/configure.ac	Thu May 29 14:13:00 2008 +0100
@@ -453,6 +453,7 @@ CC_ATTRIBUTE_MALLOC
 
 CC_ATTRIBUTE_PACKED([],
   [AC_MSG_WARN([Your compiler doesn't support __attribute__((packed)); xine might \
not work as expected.])]) +CC_ATTRIBUTE_CONST
 
 CC_CHECK_CFLAGS([-pipe], [miscflags="$miscflags -pipe"])
 
@@ -584,12 +585,19 @@ arch_x86=no
 arch_x86=no
 
 case "$host_or_hostalias" in
-    alphaev56-*)    cpuflags="-mcpu=ev56 -mieee $cpuflags" ;;
-    alpha*)         cpuflags="-mieee $cpuflags" ;;
+    alphaev56-*)
+        cpuflags="-mcpu=ev56 -mieee $cpuflags"
+        AC_DEFINE([ARCH_ALPHA], [], [Define this if you're running Alpha \
architecture]) +        ;;
+    alpha*)
+        cpuflags="-mieee $cpuflags"
+        AC_DEFINE([ARCH_ALPHA], [], [Define this if you're running Alpha \
architecture]) +        ;;
 
     armv4l-*-linux*)
         cpuflags="-mcpu=strongarm1100 -ffast-math -fsigned-char $cpuflags"
         DEFAULT_OCFLAGS='$(O2_CFLAGS)'
+        AC_DEFINE([ARCH_ARM], [], [Define this if you're running ARM architecture])
         ;;
 
     sparc*-*-linux*)
@@ -895,6 +903,11 @@ AC_CHECK_FUNC([opendir],
                else
                    AC_MSG_ERROR([dirent is needed (opendir, readdir, ...)])
                fi])
+
+XINE_CHECK_MINMAX([], [
+    AC_DEFINE([MIN(x, y)], [(x > y) ? y : x], [Get the minimum value between two])
+    AC_DEFINE([MAX(x, y)], [(x > y) ? x : y], [Get the maximum value between two])
+  ])
 
 AC_LIBSOURCE([timedlock.c])
 ac_save_LIBS="$LIBS" LIBS="$LIBS $PTHREAD_LIBS"
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/array.h
--- a/include/xine/array.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/array.h	Thu May 29 14:13:00 2008 +0100
@@ -27,7 +27,7 @@ typedef struct xine_array_s xine_array_t
 typedef struct xine_array_s xine_array_t;
 
 /* Constructor */
-xine_array_t *xine_array_new(size_t initial_size) XINE_PROTECTED;
+xine_array_t *xine_array_new(size_t initial_size) XINE_MALLOC XINE_PROTECTED;
 
 /* Destructor */
 void xine_array_delete(xine_array_t *array) XINE_PROTECTED;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/attributes.h
--- a/include/xine/attributes.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/attributes.h	Thu May 29 14:13:00 2008 +0100
@@ -45,6 +45,7 @@
 #  define SUPPORT_ATTRIBUTE_FORMAT_ARG 1
 #  define SUPPORT_ATTRIBUTE_MALLOC 1
 #  define SUPPORT_ATTRIBUTE_UNUSED 1
+#  define SUPPORT_ATTRIBUTE_CONST 1
 # endif
   
 # if __GNUC__ >= 4
@@ -109,4 +110,10 @@
 # define XINE_PACKED
 #endif
 
+#ifdef SUPPORT_ATTRIBUTE_CONST
+# define XINE_CONST __attribute__((__const__))
+#else
+# define XINE_CONST
+#endif
+
 #endif /* ATTRIBUTE_H_ */
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/audio_out.h
--- a/include/xine/audio_out.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/audio_out.h	Thu May 29 14:13:00 2008 +0100
@@ -274,7 +274,7 @@ struct audio_driver_class_s {
  *
  * @internal
  */
-xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, int \
grab_only); +xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, \
int grab_only) XINE_MALLOC;  
 /*
  * audio output modes + capabilities
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/broadcaster.h
--- a/include/xine/broadcaster.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/broadcaster.h	Thu May 29 14:13:00 2008 +0100
@@ -33,7 +33,7 @@ extern "C" {
 
 typedef struct broadcaster_s broadcaster_t;
 
-broadcaster_t *_x_init_broadcaster(xine_stream_t *stream, int port) XINE_PROTECTED;
+broadcaster_t *_x_init_broadcaster(xine_stream_t *stream, int port) XINE_MALLOC \
XINE_PROTECTED;  void _x_close_broadcaster(broadcaster_t *this) XINE_PROTECTED;
 int _x_get_broadcaster_port(broadcaster_t *this) XINE_PROTECTED;
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/buffer.h
--- a/include/xine/buffer.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/buffer.h	Thu May 29 14:13:00 2008 +0100
@@ -626,7 +626,7 @@ struct fifo_buffer_s
  * @param buf_size Size of each buffer.
  * @internal Only used by video and audio decoder loops.
  */
-fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size);
+fifo_buffer_t *_x_fifo_buffer_new (int num_buffers, uint32_t buf_size) XINE_MALLOC;
 
 /**
  * @brief Allocate and initialise new dummy FIFO buffers.
@@ -634,7 +634,7 @@ fifo_buffer_t *_x_fifo_buffer_new (int n
  * @param buf_size Size of each buffer.
  * @internal Only used by video and audio decoder loops.
  */
-fifo_buffer_t *_x_dummy_fifo_buffer_new (int num_buffers, uint32_t buf_size);
+fifo_buffer_t *_x_dummy_fifo_buffer_new (int num_buffers, uint32_t buf_size) \
XINE_MALLOC;  
 
 /**
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/configfile.h
--- a/include/xine/configfile.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/configfile.h	Thu May 29 14:13:00 2008 +0100
@@ -227,7 +227,7 @@ struct config_values_s {
  * @brief allocate and init a new xine config object
  * @internal
  */
-config_values_t *_x_config_init (void);
+config_values_t *_x_config_init (void) XINE_MALLOC;
 
 /**
  * @brief interpret stream_setup part of mrls for config value changes
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/list.h
--- a/include/xine/list.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/list.h	Thu May 29 14:13:00 2008 +0100
@@ -48,7 +48,7 @@ typedef void* xine_list_iterator_t;
 typedef void* xine_list_iterator_t;
 
 /* Constructor */
-xine_list_t *xine_list_new(void) XINE_PROTECTED;
+xine_list_t *xine_list_new(void) XINE_MALLOC XINE_PROTECTED;
 
 /* Destructor */
 void xine_list_delete(xine_list_t *list) XINE_PROTECTED;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/metronom.h
--- a/include/xine/metronom.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/metronom.h	Thu May 29 14:13:00 2008 +0100
@@ -218,7 +218,7 @@ struct metronom_s {
 #define METRONOM_VPTS_OFFSET      6
 #define METRONOM_PREBUFFER        7
 
-metronom_t *_x_metronom_init (int have_video, int have_audio, xine_t *xine) \
XINE_PROTECTED; +metronom_t *_x_metronom_init (int have_video, int have_audio, xine_t \
*xine) XINE_MALLOC XINE_PROTECTED;  
 /* FIXME: reorder this structure on the next cleanup to remove the dummies */
 struct metronom_clock_s {
@@ -314,7 +314,7 @@ struct metronom_clock_s {
 #endif
 };
 
-metronom_clock_t *_x_metronom_clock_init(xine_t *xine) XINE_PROTECTED;
+metronom_clock_t *_x_metronom_clock_init(xine_t *xine) XINE_MALLOC XINE_PROTECTED;
 
 /*
  * clock options
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/osd.h
--- a/include/xine/osd.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/osd.h	Thu May 29 14:13:00 2008 +0100
@@ -219,7 +219,7 @@ struct osd_renderer_s {
 /*
  *   initialize the osd rendering engine
  */
-osd_renderer_t *_x_osd_renderer_init( xine_stream_t *stream );
+osd_renderer_t *_x_osd_renderer_init( xine_stream_t *stream ) XINE_MALLOC;
 
 
 /*
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/pool.h
--- a/include/xine/pool.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/pool.h	Thu May 29 14:13:00 2008 +0100
@@ -36,7 +36,7 @@ xine_pool_t *xine_pool_new(size_t object
                            void (create_object)(void *object),
                            void (prepare_object)(void *object),
                            void (return_object)(void *object),
-                           void (delete_object)(void *object)) XINE_PROTECTED;
+                           void (delete_object)(void *object)) XINE_MALLOC \
XINE_PROTECTED;  
 /* Deletes a pool */
 void xine_pool_delete(xine_pool_t *pool) XINE_PROTECTED;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/refcounter.h
--- a/include/xine/refcounter.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/refcounter.h	Thu May 29 14:13:00 2008 +0100
@@ -35,7 +35,7 @@ typedef struct {
 
 typedef void (*refcounter_destructor)(void*);
 
-refcounter_t* _x_new_refcounter(void *object, refcounter_destructor destructor) \
XINE_PROTECTED; +refcounter_t* _x_new_refcounter(void *object, refcounter_destructor \
destructor) XINE_MALLOC XINE_PROTECTED;  
 int _x_refcounter_inc(refcounter_t *refcounter) XINE_PROTECTED;
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/ring_buffer.h
--- a/include/xine/ring_buffer.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/ring_buffer.h	Thu May 29 14:13:00 2008 +0100
@@ -22,7 +22,7 @@ typedef struct xine_ring_buffer_s xine_r
 typedef struct xine_ring_buffer_s xine_ring_buffer_t;
 
 /* Creates a new ring buffer */
-xine_ring_buffer_t *xine_ring_buffer_new(size_t size) XINE_PROTECTED;
+xine_ring_buffer_t *xine_ring_buffer_new(size_t size) XINE_MALLOC XINE_PROTECTED;
 
 /* Deletes a ring buffer */
 void xine_ring_buffer_delete(xine_ring_buffer_t *ring_buffer) XINE_PROTECTED;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/scratch.h
--- a/include/xine/scratch.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/scratch.h	Thu May 29 14:13:00 2008 +0100
@@ -51,6 +51,6 @@ struct scratch_buffer_s {
   pthread_mutex_t lock;
 };
 
-scratch_buffer_t *_x_new_scratch_buffer (int num_lines) XINE_PROTECTED;
+scratch_buffer_t *_x_new_scratch_buffer (int num_lines) XINE_MALLOC XINE_PROTECTED;
 
 #endif
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/sorted_array.h
--- a/include/xine/sorted_array.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/sorted_array.h	Thu May 29 14:13:00 2008 +0100
@@ -63,7 +63,7 @@ typedef int (*xine_sarray_comparator_t)(
 typedef int (*xine_sarray_comparator_t)(void*, void*);
 
 /* Constructor */
-xine_sarray_t *xine_sarray_new(size_t initial_size, xine_sarray_comparator_t \
comparator) XINE_PROTECTED; +xine_sarray_t *xine_sarray_new(size_t initial_size, \
xine_sarray_comparator_t comparator) XINE_MALLOC XINE_PROTECTED;  
 /* Destructor */
 void xine_sarray_delete(xine_sarray_t *sarray) XINE_PROTECTED;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/video_out.h
--- a/include/xine/video_out.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/video_out.h	Thu May 29 14:13:00 2008 +0100
@@ -475,7 +475,7 @@ struct video_overlay_manager_s {
  *
  * @internal
  */
-xine_video_port_t *_x_vo_new_port (xine_t *xine, vo_driver_t *driver, int grabonly);
+xine_video_port_t *_x_vo_new_port (xine_t *xine, vo_driver_t *driver, int grabonly) \
XINE_MALLOC;  
 #ifdef __cplusplus
 }
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/video_overlay.h
--- a/include/xine/video_overlay.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/video_overlay.h	Thu May 29 14:13:00 2008 +0100
@@ -59,6 +59,6 @@ typedef struct video_overlay_event_s {
   video_overlay_object_t   object; /* The image data. */
 } video_overlay_event_t;
 
-video_overlay_manager_t *_x_video_overlay_new_manager(xine_t *) XINE_PROTECTED;
+video_overlay_manager_t *_x_video_overlay_new_manager(xine_t *) XINE_MALLOC \
XINE_PROTECTED;  
 #endif
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d include/xine/xineutils.h
--- a/include/xine/xineutils.h	Thu May 29 16:03:35 2008 +0100
+++ b/include/xine/xineutils.h	Thu May 29 14:13:00 2008 +0100
@@ -113,7 +113,7 @@ extern "C" {
 #define MM_SSE                  MM_ACCEL_X86_SSE
 #define MM_SSE2                 MM_ACCEL_X86_SSE2
 
-uint32_t xine_mm_accel (void) XINE_PROTECTED;
+uint32_t xine_mm_accel (void) XINE_CONST XINE_PROTECTED;
 
 #if defined(ARCH_X86) || defined(ARCH_X86_64)
 
@@ -931,7 +931,7 @@ void xine_xprintf(xine_t *xine, int verb
 /**
  * get encoding of current locale
  */
-char *xine_get_system_encoding(void) XINE_PROTECTED;
+char *xine_get_system_encoding(void) XINE_MALLOC XINE_PROTECTED;
 
 /*
  * guess default encoding for the subtitles
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d lib/os_internal.h
--- a/lib/os_internal.h	Thu May 29 16:03:35 2008 +0100
+++ b/lib/os_internal.h	Thu May 29 14:13:00 2008 +0100
@@ -66,6 +66,10 @@
 
 #include <stddef.h>
 #include <stdarg.h>
+
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
 
 #ifdef HOST_OS_DARWIN
   /* Darwin (Mac OS X) needs __STDC_LIBRARY_SUPPORTED__ for SCNx64 and
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d m4/Makefile.am
--- a/m4/Makefile.am	Thu May 29 16:03:35 2008 +0100
+++ b/m4/Makefile.am	Thu May 29 14:13:00 2008 +0100
@@ -18,6 +18,7 @@ EXTRA_DIST = \
 	gas.m4 \
 	input.m4 \
 	macosx.m4 \
+	misc.m4 \
 	objc.m4 \
 	pkg.m4 \
 	programs.m4 \
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d m4/attributes.m4
--- a/m4/attributes.m4	Thu May 29 16:03:35 2008 +0100
+++ b/m4/attributes.m4	Thu May 29 14:13:00 2008 +0100
@@ -42,11 +42,8 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
      CFLAGS="$ac_save_CFLAGS"
     ])
 
-  if eval test [x$]AS_TR_SH([cc_cv_cflags_$1]) = xyes; then
-    ifelse([$2], , [:], [$2])
-  else
-    ifelse([$3], , [:], [$3])
-  fi
+  AS_IF([test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
+    [$2], [$3])
 ])
 
 AC_DEFUN([CC_CHECK_CFLAGS], [
@@ -55,11 +52,8 @@ AC_DEFUN([CC_CHECK_CFLAGS], [
     CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
   )
 
-  if eval test [x$]AS_TR_SH([cc_cv_cflags_$1]) = xyes; then
-    ifelse([$2], , [:], [$2])
-  else
-    ifelse([$3], , [:], [$3])
-  fi
+  AS_IF([test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
+    [$2], [$3])
 ])
 
 AC_DEFUN([CC_CHECK_LDFLAGS], [
@@ -73,11 +67,8 @@ AC_DEFUN([CC_CHECK_LDFLAGS], [
      LDFLAGS="$ac_save_LDFLAGS"
     ])
 
-  if eval test [x$]AS_TR_SH([cc_cv_ldflags_$1]) = xyes; then
-    ifelse([$2], , [:], [$2])
-  else
-    ifelse([$3], , [:], [$3])
-  fi
+  AS_IF([test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes],
+    [$2], [$3])
 ])
 
 dnl Check for a -Werror flag or equivalent. -Werror is the GCC
@@ -109,76 +100,69 @@ AC_DEFUN([CC_CHECK_ATTRIBUTE], [
      CFLAGS="$ac_save_CFLAGS"
     ])
 
-  if eval test [x$]AS_TR_SH([cc_cv_attribute_$1]) = xyes; then
-    AC_DEFINE(AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1, [Define this if the compiler \
                supports __attribute__(( ifelse([$2], , [$1], [$2]) ))])
-    ifelse([$4], , [:], [$4])
-  else
-    ifelse([$5], , [:], [$5])
-  fi
+  AS_IF([test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes],
+    [AC_DEFINE(
+       AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1,
+         [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], \
[$2]) ))] +         )
+     $4],
+    [$5])
 ])
 
 AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
   CC_CHECK_ATTRIBUTE(
     [constructor],,
     [void __attribute__((constructor)) ctor() { int a; }],
-    [$1],
-    [$2])
+    [$1], [$2])
 ])
 
 AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
   CC_CHECK_ATTRIBUTE(
     [format], [format(printf, n, n)],
     [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { \
                fmt = (void *)0; }],
-    [$1],
-    [$2])
+    [$1], [$2])
 ])
 
 AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
   CC_CHECK_ATTRIBUTE(
     [format_arg], [format_arg(printf)],
     [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void \
                *)0; }],
-    [$1],
-    [$2])
+    [$1], [$2])
 ])
 
 AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
   CC_CHECK_ATTRIBUTE(
     [visibility_$1], [visibility("$1")],
     [void __attribute__((visibility("$1"))) $1_function() { }],
-    [$2],
-    [$3])
+    [$2], [$3])
 ])
 
 AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
   CC_CHECK_ATTRIBUTE(
     [nonnull], [nonnull()],
     [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = \
                (void*)0; bar = (void*)0; }],
-    [$1],
-    [$2])
+    [$1], [$2])
 ])
 
 AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
   CC_CHECK_ATTRIBUTE(
     [unused], ,
     [void some_function(void *foo, __attribute__((unused)) void *bar);],
-    [$1],
-    [$2])
+    [$1], [$2])
 ])
 
 AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [
   CC_CHECK_ATTRIBUTE(
     [sentinel], ,
     [void some_function(void *foo, ...) __attribute__((sentinel));],
-    [$1],
-    [$2])
+    [$1], [$2])
 ])
 
 AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [
[... 72 lines omitted ...]
-			}
-			],
-			[cc_cv_func_expect=yes],
-			[cc_cv_func_expect=no])
-		])
-	CFLAGS="$ac_save_CFLAGS"
-	
-	if test "x$cc_cv_func_expect" = "xyes"; then
-		AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1, [Define this if the compiler supports \
                __builtin_expect() function])
-		$1
-	else
-		true
-		$2
-	fi
+  AC_REQUIRE([CC_CHECK_WERROR])
+  AC_CACHE_CHECK([if compiler has __builtin_expect function],
+    [cc_cv_func_expect],
+    [ac_save_CFLAGS="$CFLAGS"
+     CFLAGS="$CFLAGS $cc_cv_werror"
+     AC_COMPILE_IFELSE(
+       [int some_function() {
+        int a = 3;
+        return (int)__builtin_expect(a, 3);
+	}],
+       [cc_cv_func_expect=yes],
+       [cc_cv_func_expect=no])
+     CFLAGS="$ac_save_CFLAGS"
+    ])
+
+  AS_IF([test "x$cc_cv_func_expect" = "xyes"],
+    [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1,
+     [Define this if the compiler supports __builtin_expect() function])
+     $1],
+    [$2])
 ])
 
 AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
@@ -273,90 +256,3 @@ AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
        [Define the highest alignment supported])
   fi
 ])
-
-AC_DEFUN([CC_ATTRIBUTE_PACKED], [
-  AC_REQUIRE([CC_CHECK_WERROR])
-  AC_CACHE_CHECK([if $CC supports __attribute__((packed))],
-    [cc_cv_attribute_packed],
-    [ac_save_CFLAGS="$CFLAGS"
-     CFLAGS="$CFLAGS $cc_cv_werror"
-     AC_COMPILE_IFELSE([struct { char a; short b; int c; } __attribute__((packed)) \
                foo;],
-       [cc_cv_attribute_packed=yes],
-       [cc_cv_attribute_packed=no])
-     CFLAGS="$ac_save_CFLAGS"
-    ])
-
-  if test x$cc_cv_attribute_packed = xyes; then
-    AC_DEFINE([SUPPORT_ATTRIBUTE_PACKED], 1, [Define this if the compiler supports \
                __attribute__((packed))])
-    ifelse([$1], , [:], [$1])
-  else
-    ifelse([$2], , [:], [$2])
-  fi
-])
-
-AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
-  AC_REQUIRE([CC_CHECK_WERROR])
-  AC_CACHE_CHECK([if $CC supports __attribute__((__malloc__))],
-    [cc_cv_attribute_malloc],
-    [ac_save_CFLAGS="$CFLAGS"
-     CFLAGS="$CFLAGS $cc_cv_werror"
-     AC_COMPILE_IFELSE([void *fooalloc(int size) __attribute__((__malloc__));],
-       [cc_cv_attribute_malloc=yes],
-       [cc_cv_attribute_malloc=no])
-     CFLAGS="$ac_save_CFLAGS"
-    ])
-
-  if test x$cc_cv_attribute_malloc = xyes; then
-    AC_DEFINE([SUPPORT_ATTRIBUTE_MALLOC], 1, [Define this if the compiler supports \
                __attribute__((__malloc__))])
-    ifelse([$1], , [:], [$1])
-  else
-    ifelse([$2], , [:], [$2])
-  fi
-])
-
-
-dnl AC_C_ALWAYS_INLINE
-dnl Define inline to something appropriate, including the new always_inline
-dnl attribute from gcc 3.1
-dnl Thanks to Michel LESPINASSE <walken@zoy.org>
-dnl __inline__ "check" added by Darren Salt
-AC_DEFUN([AC_C_ALWAYS_INLINE], [
-    AC_C_INLINE
-    if test x"$GCC" = x"yes" -a x"$ac_cv_c_inline" = x"inline"; then
-        AC_MSG_CHECKING([for always_inline])
-        SAVE_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS -Wall -Werror"
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[inline __attribute__ \
                ((__always_inline__)) void f (void);]])],
-            [ac_cv_always_inline=yes],[ac_cv_always_inline=no])
-        CFLAGS="$SAVE_CFLAGS"
-        AC_MSG_RESULT([$ac_cv_always_inline])
-        if test x"$ac_cv_always_inline" = x"yes"; then
-            AH_TOP([
-#ifdef inline
-/* the strange formatting below is needed to prevent config.status from rewriting it \
                */
-#  undef \
-     inline
-#endif
-            ])
-            AC_DEFINE_UNQUOTED([inline],[inline __attribute__ \
                ((__always_inline__))])
-        fi
-	ac_cv_c___inline__=''
-    else
-	# FIXME: test the compiler to see if it supports __inline__
-	#	 instead of assuming that if it isn't gcc, it doesn't
-	case "$ac_cv_c_inline" in
-	    yes)
-		ac_cv_c___inline__=inline
-		;;
-	    inline|__inline__)
-		ac_cv_c___inline__=''
-		;;
-	    *)
-		ac_cv_c___inline__="$ac_cv_c_inline"
-		;;
-	esac
-    fi
-    if test x"$ac_cv_c___inline__" != x; then
-	AC_DEFINE_UNQUOTED([__inline__],[$ac_cv_c___inline__],[Define if the compiler \
                doesn't recognise __inline__])
-    fi
-])
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d m4/pthreads.m4
--- a/m4/pthreads.m4	Thu May 29 16:03:35 2008 +0100
+++ b/m4/pthreads.m4	Thu May 29 14:13:00 2008 +0100
@@ -75,26 +75,28 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [
 ])
 
 AC_DEFUN([CC_PTHREAD_RECURSIVE_MUTEX], [
-    AC_REQUIRE([CC_PTHREAD_FLAGS])
-    AC_MSG_CHECKING([for recursive mutex support in pthread])
-
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $PTHREAD_LIBS"
-    AC_COMPILE_IFELSE(AC_LANG_SOURCE([#include <pthread.h>
-
+  AC_REQUIRE([CC_PTHREAD_FLAGS])
+  AC_CACHE_CHECK(
+    [for recursive mutex support in pthread],
+    [cc_cv_pthread_recursive_mutex],
+    [ac_save_LIBS="$LIBS"
+     LIBS="$LIBS $PTHREAD_LIBS"
+     AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([
+#include <pthread.h>
+          ], [
 int main() {
     pthread_mutexattr_t attr;
     pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
     return 0;
 }
-        ]), [have_recursive_mutex=yes], [have_recursive_mutex=no])
-    LIBS="$ac_save_LIBS"
+           ])
+	  ],
+	  [cc_cv_pthread_recursive_mutex=yes],
+	  [cc_cv_pthread_recursive_mutex=no])
+     LIBS="$ac_save_LIBS"
+    ])
 
-    AC_MSG_RESULT([$have_recursive_mutex])
-
-    if test x"$have_recursive_mutex" = x"yes"; then
-        ifelse([$1], , [:], [$1])
-    else
-        ifelse([$2], , [:], [$2])
-    fi
+  AS_IF([test x"$cc_cv_pthread_recursive_mutex" = x"yes"],
+    [$1], [$2])
 ])
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/demuxers/asfheader.h
--- a/src/demuxers/asfheader.h	Thu May 29 16:03:35 2008 +0100
+++ b/src/demuxers/asfheader.h	Thu May 29 14:13:00 2008 +0100
@@ -389,7 +389,7 @@ int asf_find_object_id (GUID *g);
 int asf_find_object_id (GUID *g);
 void asf_get_guid (uint8_t *buffer, GUID *value);
 
-asf_header_t *asf_header_new (uint8_t *buffer, int buffer_len);
+asf_header_t *asf_header_new (uint8_t *buffer, int buffer_len) XINE_MALLOC;
 void asf_header_choose_streams (asf_header_t *header, uint32_t bandwidth,
                                 int *video_id, int *audio_id);
 void asf_header_disable_streams (asf_header_t *header,
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/demuxers/demux_avi.c
--- a/src/demuxers/demux_avi.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/demuxers/demux_avi.c	Thu May 29 14:13:00 2008 +0100
@@ -719,7 +719,7 @@ static void reset_idx(demux_avi_t *this,
   }
 }
 
-static avi_t *AVI_init(demux_avi_t *this) {
+static avi_t *XINE_MALLOC AVI_init(demux_avi_t *this) {
 
   avi_t *AVI;
   int i, j, idx_type;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d \
                src/demuxers/demux_matroska.c
--- a/src/demuxers/demux_matroska.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/demuxers/demux_matroska.c	Thu May 29 14:13:00 2008 +0100
@@ -57,13 +57,6 @@
 #define MAX_FRAMES               32
 
 #define WRAP_THRESHOLD        90000
-
-#if !defined(MIN)
-#define MIN(a, b)	((a)<(b)?(a):(b))
-#endif
-#if !defined(MAX)
-#define MAX(a, b)	((a)>(b)?(a):(b))
-#endif
 
 typedef struct {
   int                  track_num;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d \
                src/demuxers/demux_mpgaudio.c
--- a/src/demuxers/demux_mpgaudio.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/demuxers/demux_mpgaudio.c	Thu May 29 14:13:00 2008 +0100
@@ -316,8 +316,8 @@ static int parse_frame_header(mpg_audio_
  * Parse a Xing header
  * return the Xing header or NULL on error
  */
-static xing_header_t* parse_xing_header(mpg_audio_frame_t *frame,
-                                        uint8_t *buf, int bufsize) {
+static xing_header_t *XINE_MALLOC parse_xing_header(mpg_audio_frame_t *frame,
+						    uint8_t *buf, int bufsize) {
   uint8_t *ptr = buf;
   xing_header_t *xing = NULL;
 
@@ -420,8 +420,8 @@ exit_error:
  * Parse a Vbri header
  * return the Vbri header or NULL on error
  */
-static vbri_header_t* parse_vbri_header(mpg_audio_frame_t *frame,
-                                        uint8_t *buf, int bufsize) {
+static vbri_header_t *XINE_MALLOC parse_vbri_header(mpg_audio_frame_t *frame,
+						    uint8_t *buf, int bufsize) {
 
   int i;
   uint8_t *ptr = buf;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/demuxers/demux_ts.c
--- a/src/demuxers/demux_ts.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/demuxers/demux_ts.c	Thu May 29 14:13:00 2008 +0100
@@ -184,9 +184,6 @@
 #define INVALID_PID ((unsigned int)(-1))
 #define INVALID_PROGRAM ((unsigned int)(-1))
 #define INVALID_CC ((unsigned int)(-1))
-
-#define	MIN(a,b)   (((a)<(b))?(a):(b))
-#define	MAX(a,b)   (((a)>(b))?(a):(b))
 
 #define PROG_STREAM_MAP  0xBC
 #define PRIVATE_STREAM1  0xBD
@@ -220,7 +217,9 @@
       ISO_13818_PART7_AUDIO = 0x0f,     /* ISO/IEC 13818-7 Audio with ADTS transport \
                sytax */
       ISO_14496_PART2_VIDEO = 0x10,     /* ISO/IEC 14496-2 Visual (MPEG-4) */
       ISO_14496_PART3_AUDIO = 0x11,     /* ISO/IEC 14496-3 Audio with LATM transport \
                syntax */
-      ISO_14496_PART10_VIDEO = 0x1b     /* ISO/IEC 14496-10 Video (MPEG-4 part \
10/AVC, aka H.264) */ +      ISO_14496_PART10_VIDEO = 0x1b,    /* ISO/IEC 14496-10 \
Video (MPEG-4 part 10/AVC, aka H.264) */ +      STREAM_VIDEO_MPEG = 0x80,
+      STREAM_AUDIO_AC3 = 0x81,
     } streamType;
 
 #define WRAP_THRESHOLD       270000
@@ -729,14 +728,14 @@ static int demux_ts_parse_pes_header (xi
      * do not include any of the ac3 header info in their audio tracks
      * these "raw" streams may begin with a byte that looks like a stream type.
      */
-    if((m->descriptor_tag == 0x81) ||    /* ac3 - raw */ 
+    if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 - raw */ 
        (p[0] == 0x0B && p[1] == 0x77)) { /* ac3 - syncword */
       m->content   = p;
       m->size = packet_len;
       m->type |= BUF_AUDIO_A52;
       return 1;
 
-    } else if (m->descriptor_tag == 0x06
+    } else if (m->descriptor_tag == ISO_13818_PES_PRIVATE
 	     && p[0] == 0x20 && p[1] == 0x00) {
       /* DVBSUB */
       long payload_len = ((buf[4] << 8) | buf[5]) - header_len - 3;
@@ -784,6 +783,7 @@ static int demux_ts_parse_pes_header (xi
     switch (m->descriptor_tag) {
     case ISO_11172_VIDEO:
     case ISO_13818_VIDEO:
+    case STREAM_VIDEO_MPEG:
       lprintf ("demux_ts: found MPEG video type.\n");
       m->type      = BUF_VIDEO_MPEG;
       break;
@@ -1327,7 +1327,7 @@ printf("Program Number is %i, looking fo
             printf ("demux_ts: PMT AC3 audio pid 0x%.4x type %2.2x\n", pid, \
stream[0]);  #endif
           demux_ts_pes_new(this, this->media_num, pid,
-                           this->audio_fifo, 0x81);
+                           this->audio_fifo, STREAM_AUDIO_AC3);
 
           this->audio_tracks[this->audio_tracks_count].pid = pid;
           this->audio_tracks[this->audio_tracks_count].media_index = \
                this->media_num;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/demuxers/ebml.h
--- a/src/demuxers/ebml.h	Thu May 29 16:03:35 2008 +0100
+++ b/src/demuxers/ebml.h	Thu May 29 14:13:00 2008 +0100
@@ -65,7 +65,7 @@ typedef struct ebml_parser_s {
 } ebml_parser_t;
 
 
-ebml_parser_t *new_ebml_parser (xine_t *xine, input_plugin_t *input);
+ebml_parser_t *new_ebml_parser (xine_t *xine, input_plugin_t *input) XINE_MALLOC;
 
 void dispose_ebml_parser (ebml_parser_t *ebml);
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/input_dvb.c
--- a/src/input/input_dvb.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/input_dvb.c	Thu May 29 14:13:00 2008 +0100
@@ -554,7 +554,7 @@ static void tuner_dispose(tuner_t * this
 }
 
 
-static tuner_t *tuner_init(xine_t * xine, int adapter)
+static tuner_t *XINE_MALLOC tuner_init(xine_t * xine, int adapter)
 {
 
     tuner_t *this;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/input_pvr.c
--- a/src/input/input_pvr.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/input_pvr.c	Thu May 29 14:13:00 2008 +0100
@@ -376,7 +376,7 @@ static void pvrscr_exit (scr_plugin_t *s
   free(this);
 }
 
-static pvrscr_t* pvrscr_init (void) {
+static pvrscr_t *XINE_MALLOC pvrscr_init (void) {
   pvrscr_t *this;
 
   this = calloc(1, sizeof(pvrscr_t));
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/input_v4l.c
--- a/src/input/input_v4l.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/input_v4l.c	Thu May 29 14:13:00 2008 +0100
@@ -372,7 +372,7 @@ static void pvrscr_exit (scr_plugin_t *s
    free(this);
 }
 
-static pvrscr_t* pvrscr_init (void)
+static pvrscr_t *XINE_MALLOC pvrscr_init (void)
 {
    pvrscr_t *this;
    
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/libreal/asmrp.c
--- a/src/input/libreal/asmrp.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/libreal/asmrp.c	Thu May 29 14:13:00 2008 +0100
@@ -95,7 +95,7 @@ typedef struct {
 
 } asmrp_t;
 
-static asmrp_t *asmrp_new () {
+static asmrp_t *XINE_MALLOC asmrp_new () {
 
   asmrp_t *p;
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/libreal/real.c
--- a/src/input/libreal/real.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/libreal/real.c	Thu May 29 14:13:00 2008 +0100
@@ -47,9 +47,6 @@ static const unsigned char xor_table[] =
 
 #define _X_BE_32C(x,y) do { *(uint32_t *)(x) = be2me_32((y)); } while(0)
 #define _X_LE_32C(x,y) do { *(uint32_t *)(x) = le2me_32((y)); } while(0)
-
-#define MAX(x,y) ((x>y) ? x : y)
-
 
 static void hash(char *field, char *param) {
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/libreal/rmff.h
--- a/src/input/libreal/rmff.h	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/libreal/rmff.h	Thu May 29 14:13:00 2008 +0100
@@ -32,10 +32,10 @@
 #include <string.h>
 #include <inttypes.h>
 
-
 #ifndef HAVE_RMFF_H
 #define HAVE_RMFF_H
 
+#include <xine/attributes.h>
 
 #define RMFF_HEADER_SIZE 0x12
 
@@ -220,7 +220,7 @@ rmff_data_t *rmff_new_dataheader(
 /*
  * reads header infos from data and returns a newly allocated header struct
  */
-rmff_header_t *rmff_scan_header(const char *data);
+rmff_header_t *rmff_scan_header(const char *data) XINE_MALLOC;
 
 #if 0
 /*
@@ -232,7 +232,7 @@ void rmff_scan_pheader(rmff_pheader_t *h
 /*
  * reads header infos from stream and returns a newly allocated header struct
  */
-rmff_header_t *rmff_scan_header_stream(int fd);
+rmff_header_t *rmff_scan_header_stream(int fd) XINE_MALLOC;
 
 /*
  * prints header information in human readible form to stdout
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/libreal/sdpplin.c
--- a/src/input/libreal/sdpplin.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/libreal/sdpplin.c	Thu May 29 14:13:00 2008 +0100
@@ -120,7 +120,7 @@ static int filter(const char *in, const 
   
   return 0;
 }
-static sdpplin_stream_t *sdpplin_parse_stream(char **data) {
+static sdpplin_stream_t *XINE_MALLOC sdpplin_parse_stream(char **data) {
 
   sdpplin_stream_t *desc = calloc(1, sizeof(sdpplin_stream_t));
   char      *buf=xine_buffer_init(32);
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/libreal/sdpplin.h
--- a/src/input/libreal/sdpplin.h	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/libreal/sdpplin.h	Thu May 29 14:13:00 2008 +0100
@@ -101,7 +101,7 @@ typedef struct {
   
 } sdpplin_t;
 
-sdpplin_t *sdpplin_parse(char *data);
+sdpplin_t *sdpplin_parse(char *data) XINE_MALLOC;
 
 void sdpplin_free(sdpplin_t *description);
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/librtsp/rtsp.h
--- a/src/input/librtsp/rtsp.h	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/librtsp/rtsp.h	Thu May 29 14:13:00 2008 +0100
@@ -40,7 +40,7 @@
 
 typedef struct rtsp_s rtsp_t;
 
-rtsp_t*  rtsp_connect (xine_stream_t *stream, const char *mrl, const char \
*user_agent); +rtsp_t*  rtsp_connect (xine_stream_t *stream, const char *mrl, const \
char *user_agent) XINE_MALLOC;  
 int rtsp_request_options(rtsp_t *s, const char *what);
 int rtsp_request_describe(rtsp_t *s, const char *what);
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d \
                src/input/librtsp/rtsp_session.h
--- a/src/input/librtsp/rtsp_session.h	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/librtsp/rtsp_session.h	Thu May 29 14:13:00 2008 +0100
@@ -25,7 +25,7 @@
 
 typedef struct rtsp_session_s rtsp_session_t;
 
-rtsp_session_t *rtsp_session_start(xine_stream_t *stream, char *mrl);
+rtsp_session_t *rtsp_session_start(xine_stream_t *stream, char *mrl) XINE_MALLOC;
 
 void rtsp_session_set_start_time(rtsp_session_t *this, int start_time);
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/input/net_buf_ctrl.h
--- a/src/input/net_buf_ctrl.h	Thu May 29 16:03:35 2008 +0100
+++ b/src/input/net_buf_ctrl.h	Thu May 29 14:13:00 2008 +0100
@@ -27,7 +27,7 @@
 
 typedef struct nbc_s nbc_t;
 
-nbc_t *nbc_init (xine_stream_t *xine);
+nbc_t *nbc_init (xine_stream_t *xine) XINE_MALLOC;
 
 void nbc_close (nbc_t *this);
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/post/audio/stretch.c
--- a/src/post/audio/stretch.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/post/audio/stretch.c	Thu May 29 14:13:00 2008 +0100
@@ -152,7 +152,7 @@ static void stretchscr_exit (scr_plugin_
   free(this);
 }
 
-static stretchscr_t* stretchscr_init (double *stretch_factor) {
+static stretchscr_t *XINE_MALLOC stretchscr_init (double *stretch_factor) {
   stretchscr_t *this;
 
   this = calloc(1, sizeof(stretchscr_t));
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/post/planar/unsharp.c
--- a/src/post/planar/unsharp.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/post/planar/unsharp.c	Thu May 29 14:13:00 2008 +0100
@@ -25,13 +25,6 @@
 #include <xine/post.h>
 #include <xine/xineutils.h>
 #include <pthread.h>
-
-#ifndef MIN
-#define        MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-#ifndef MAX
-#define        MAX(a,b) (((a)>(b))?(a):(b))
-#endif
 
 /*===========================================================================*/
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/spu_dec/cc_decoder.c
--- a/src/spu_dec/cc_decoder.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/spu_dec/cc_decoder.c	Thu May 29 14:13:00 2008 +0100
@@ -215,8 +215,6 @@ static const uint8_t *const cc_alpha_pal
 
 #define TRANSP_SPACE 0x19   /* code for transparent space, essentially 
 			       arbitrary */
-
-#define MAX(a, b) ((a) > (b)? (a) : (b))
 
 /* mapping from PAC row code to actual CC row */
 static const int  rowdata[] = {10, -1, 0, 1, 2, 3, 11, 12, 13, 14, 4, 5, 6,
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d \
                src/video_out/video_out_directfb.c
--- a/src/video_out/video_out_directfb.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/video_out/video_out_directfb.c	Thu May 29 14:13:00 2008 +0100
@@ -167,10 +167,6 @@ typedef struct {
                           "no-sighandler,"\
                           "no-deinit-check"
 
-
-#ifndef MAX
-# define MAX( a, b ) (((a) > (b)) ? (a) : (b))
-#endif
 
 #define YCBCR_TO_RGB( y, cb, cr, r, g, b ) \
   do { \
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/video_out/yuv2rgb_mlib.c
--- a/src/video_out/yuv2rgb_mlib.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/video_out/yuv2rgb_mlib.c	Thu May 29 14:13:00 2008 +0100
@@ -37,8 +37,6 @@
 #include <xine/attributes.h>
 #include <xine/xineutils.h>
 #include "yuv2rgb.h"
-
-#define	MIN(a, b) (((a) < (b)) ? (a) : (b))
 
 static void mlib_yuv420_rgb24(yuv2rgb_t *this,
 			      uint8_t * image, uint8_t * py,
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-engine/audio_out.c
--- a/src/xine-engine/audio_out.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-engine/audio_out.c	Thu May 29 14:13:00 2008 +0100
@@ -294,7 +294,7 @@ static int ao_get_property (xine_audio_p
 static int ao_get_property (xine_audio_port_t *this_gen, int property);
 static int ao_set_property (xine_audio_port_t *this_gen, int property, int value);
 
-static audio_fifo_t *fifo_new (xine_t *xine) {
+static audio_fifo_t *XINE_MALLOC fifo_new (xine_t *xine) {
 
   audio_fifo_t *fifo;
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-engine/configfile.c
--- a/src/xine-engine/configfile.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-engine/configfile.c	Thu May 29 14:13:00 2008 +0100
@@ -319,7 +319,7 @@ static void config_insert(config_values_
     this->first = new_entry;
 }
 
-static cfg_entry_t *config_add (config_values_t *this, const char *key, int \
exp_level) { +static cfg_entry_t *XINE_MALLOC config_add (config_values_t *this, \
const char *key, int exp_level) {  
   cfg_entry_t *entry;
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-engine/demux.c
--- a/src/xine-engine/demux.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-engine/demux.c	Thu May 29 14:13:00 2008 +0100
@@ -46,11 +46,6 @@
 #ifdef WIN32
 #include <winsock.h>
 #endif
-
-#ifdef MIN
-#undef MIN
-#endif
-#define MIN(a,b) ( (a) < (b) ) ? (a) : (b)
 
 /* 
  *  Flush audio and video buffers. It is called from demuxers on
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d \
                src/xine-engine/load_plugins.c
--- a/src/xine-engine/load_plugins.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-engine/load_plugins.c	Thu May 29 14:13:00 2008 +0100
@@ -468,7 +468,7 @@ static int _plugin_node_comparator(void 
   }
 }
 
-static plugin_catalog_t *_new_catalog(void){
+static plugin_catalog_t *XINE_MALLOC _new_catalog(void){
 
   plugin_catalog_t *catalog;
   int i;
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-engine/metronom.c
--- a/src/xine-engine/metronom.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-engine/metronom.c	Thu May 29 14:13:00 2008 +0100
@@ -172,7 +172,7 @@ static void unixscr_exit (scr_plugin_t *
   free(this);
 }
 
-static scr_plugin_t* unixscr_init () {
+static scr_plugin_t *XINE_MALLOC unixscr_init () {
   unixscr_t *this;
 
   this = calloc(1, sizeof(unixscr_t));
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-engine/osd.c
--- a/src/xine-engine/osd.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-engine/osd.c	Thu May 29 14:13:00 2008 +0100
@@ -82,17 +82,6 @@
 #else
 #  define UCS2_ENCODING "UCS-2LE"
 #endif
-
-#ifdef MAX
-#undef MAX
-#endif
-#define MAX(a,b) ( (a) > (b) ) ? (a) : (b)
-
-#ifdef MIN
-#undef MIN
-#endif
-#define MIN(a,b) ( (a) < (b) ) ? (a) : (b)
-
 
 #if (FREETYPE_MAJOR > 2) || \
     (FREETYPE_MAJOR == 2 && FREETYPE_MINOR > 1) || \
@@ -237,7 +226,7 @@ struct osd_ft2context_s {
  * for the sake of simplicity)
  */
 
-static osd_object_t *osd_new_object (osd_renderer_t *this, int width, int height) {
+static osd_object_t *XINE_MALLOC osd_new_object (osd_renderer_t *this, int width, \
int height) {  
   osd_object_t *osd;
   
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-engine/video_out.c
--- a/src/xine-engine/video_out.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-engine/video_out.c	Thu May 29 14:13:00 2008 +0100
@@ -142,7 +142,7 @@ typedef struct {
  * frame queue (fifo) util functions
  */
 
-static img_buf_fifo_t *vo_new_img_buf_queue () {
+static img_buf_fifo_t *XINE_MALLOC vo_new_img_buf_queue () {
 
   img_buf_fifo_t *queue;
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-engine/xine.c
--- a/src/xine-engine/xine.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-engine/xine.c	Thu May 29 14:13:00 2008 +0100
@@ -338,7 +338,7 @@ static void ticket_dispose(xine_ticket_t
   free(this);
 }
 
-static xine_ticket_t *ticket_init(void) {
+static xine_ticket_t *XINE_MALLOC ticket_init(void) {
   xine_ticket_t *port_ticket;
   
   port_ticket = calloc(1, sizeof(xine_ticket_t));
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-utils/list.c
--- a/src/xine-utils/list.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-utils/list.c	Thu May 29 14:13:00 2008 +0100
@@ -67,7 +67,7 @@ struct xine_list_s {
 /* Allocates a new chunk of n elements
  * One malloc call is used to allocate the struct and the elements.
  */
-static xine_list_chunk_t *xine_list_alloc_chunk(size_t size) {
+static xine_list_chunk_t *XINE_MALLOC xine_list_alloc_chunk(size_t size) {
   xine_list_chunk_t *new_chunk;
   size_t chunk_mem_size;
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-utils/pool.c
--- a/src/xine-utils/pool.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-utils/pool.c	Thu May 29 14:13:00 2008 +0100
@@ -55,7 +55,7 @@ struct xine_pool_s {
 /* Allocates a new chunk of n elements
  * One malloc call is used to allocate the struct and the elements.
  */
-static xine_pool_chunk_t *xine_pool_alloc_chunk(size_t object_size, size_t \
object_count) { +static xine_pool_chunk_t *XINE_MALLOC xine_pool_alloc_chunk(size_t \
object_size, size_t object_count) {  xine_pool_chunk_t *new_chunk;
   size_t chunk_mem_size;;
 
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d src/xine-utils/xmlparser.c
--- a/src/xine-utils/xmlparser.c	Thu May 29 16:03:35 2008 +0100
+++ b/src/xine-utils/xmlparser.c	Thu May 29 14:13:00 2008 +0100
@@ -40,6 +40,7 @@
 #include <xine/xineutils.h>
 #else
 #define lprintf(...)
+#define XINE_MALLOC
 #endif
 #include <xine/xmllexer.h>
 #include <xine/xmlparser.h>
@@ -85,7 +86,7 @@ static void free_xml_node(xml_node_t * n
   free(node);
 }
 
-static xml_property_t * new_xml_property(void) {
+static xml_property_t *XINE_MALLOC new_xml_property(void) {
   xml_property_t * new_property;
 
   new_property = (xml_property_t*) malloc(sizeof(xml_property_t));
diff -r 1c99f4be72958c5f4a6b07bdcf8d9ecc7bb5d547 -r \
                bf9ec0684ac0bebf6fcbc621d3a81643a698996d m4/misc.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/misc.m4	Thu May 29 14:13:00 2008 +0100
@@ -0,0 +1,55 @@
+dnl Miscellaneous M4 macros for configure
+dnl Copyright (c) 2008 Diego Pettenò <flameeyes@gmail.com>
+dnl Copyright (c) 2008 xine project
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+dnl
+dnl As a special exception, the copyright owners of the
+dnl macro gives unlimited permission to copy, distribute and modify the
+dnl configure scripts that are the output of Autoconf when processing the
+dnl Macro. You need not follow the terms of the GNU General Public
+dnl License when using or distributing such scripts, even though portions
+dnl of the text of the Macro appear in them. The GNU General Public
+dnl License (GPL) does govern all other use of the material that
+dnl constitutes the Autoconf Macro.
+dnl 
+dnl This special exception to the GPL applies to versions of the
+dnl Autoconf Macro released by this project. When you make and
+dnl distribute a modified version of the Autoconf Macro, you may extend
+dnl this special exception to the GPL to apply to your modified version as
+dnl well.
+
+AC_DEFUN([XINE_CHECK_MINMAX], [
+  AC_CHECK_HEADERS([sys/param.h])
+  AC_CACHE_CHECK([for MIN()/MAX() macros],
+    xine_cv_minmax,
+    [
+     AC_LINK_IFELSE([
+        AC_LANG_PROGRAM([
+	  #ifdef HAVE_SYS_PARAM_H
+          # include <sys/param.h>
+          #endif
+        ], [
+          int a = MIN(1, 3);
+          int b = MAX(2, 3);
+	])],
+        [xine_cv_minmax=yes],
+        [xine_cv_minmax=no])
+    ])
+
+  AS_IF([test x$xine_cv_minmax = xyes],
+    [$1], [$2])
+])

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic