[vlc-devel] [Patch] Symbian Merge Changes to includes

Rémi Denis-Courmont remi at remlab.net
Sat Jul 31 09:22:42 CEST 2010


diff --git a/include/vlc_codecs.h b/include/vlc_codecs.h
index 6c087da..81dc203 100644
--- a/include/vlc_codecs.h
+++ b/include/vlc_codecs.h
@@ -43,6 +43,7 @@ typedef struct _GUID
 } GUID, *REFGUID, *LPGUID;
 #endif /* GUID_DEFINED */
 
+#ifndef __WINSCW__
 #ifdef HAVE_ATTRIBUTE_PACKED
 #   define ATTR_PACKED __attribute__((__packed__))
 #elif defined(__SUNPRO_C)
@@ -51,6 +52,9 @@ typedef struct _GUID
 #else
 #   error FIXME
 #endif
+#else
+#define ATTR_PACKED
+#endif

It would look a lot better with just
	#elif defined __WINSCW__
at the end.
 
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 25102fa..d897b65 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -26,6 +26,15 @@
 #ifndef LIBVLC_FIXUPS_H
 # define LIBVLC_FIXUPS_H 1
 
+#ifdef SYMBIAN
+#include <glib/gprintf.h>
+#define asprintf symbian_asprintf
+int symbian_asprintf (char **strp, const char *fmt, ...);
+#if !defined(__cplusplus)
+typedef int bool;

As Laurent already pointed out, the implicit 
conversions rules for 'int' and 'bool' are incompatible.

+#endif
+#endif
+
 #if !defined (HAVE_GMTIME_R) || !defined (HAVE_LOCALTIME_R)
 # include <time.h> /* time_t */
 #endif
diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 3770e2f..abc9b3b 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -111,7 +111,21 @@ typedef pthread_mutex_t vlc_mutex_t;
 typedef pthread_cond_t  vlc_cond_t;
 #define VLC_STATIC_COND  PTHREAD_COND_INITIALIZER
 typedef pthread_rwlock_t vlc_rwlock_t;
-typedef pthread_key_t   vlc_threadvar_t;

I believe this breaks compilation on all platforms except Windows.

@@ -216,7 +230,7 @@ VLC_EXPORT( void, vlc_timer_destroy, (vlc_timer_t) );
 VLC_EXPORT( void, vlc_timer_schedule, (vlc_timer_t, bool, mtime_t, mtime_t) 
);
 VLC_EXPORT( unsigned, vlc_timer_getoverrun, (vlc_timer_t) LIBVLC_USED );
 
-#ifndef LIBVLC_USE_PTHREAD_CANCEL
+#if !defined(LIBVLC_USE_PTHREAD_CANCEL) || defined(SYMBIAN)

I already said this is counter-sensical.

@@ -227,7 +241,7 @@ VLC_EXPORT( int, vlc_savecancel, (void) );
 VLC_EXPORT( void, vlc_restorecancel, (int state) );
 VLC_EXPORT( void, vlc_testcancel, (void) );
 
-#if defined (LIBVLC_USE_PTHREAD_CANCEL)
+#if defined (LIBVLC_USE_PTHREAD_CANCEL) && !defined(SYMBIAN)

Same here.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list