]> git.sesse.net Git - vlc/blobdiff - src/misc/darwin_specific.c
control/testapi.c: Detach event that was originally attached.
[vlc] / src / misc / darwin_specific.c
index 3340c7c278dcb6b50555d57700253bcd351a2557..63830f610d33739199a1b21d9f2953ec60665506 100644 (file)
 #   include <mach-o/dyld.h>
 #endif
 
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+#endif
+
 /* CFLocaleCopyAvailableLocaleIdentifiers is present only on post-10.4 */
 extern CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers(void) __attribute__((weak_import));
 
@@ -70,23 +74,24 @@ static CFArrayRef copy_all_locale_indentifiers(void)
 /*****************************************************************************
  * system_Init: fill in program path & retrieve language
  *****************************************************************************/
-void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
+void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
 {
     char i_dummy;
     char *p_char = NULL;
     char *p_oldchar = &i_dummy;
-    int i;
+    unsigned int i;
+    (void)pi_argc;
 
     /* Get the full program path and name */
 
     /* First try to see if we are linked to the framework */
     for (i = 0; i < _dyld_image_count(); i++)
     {
-        char * psz_img_name = _dyld_get_image_name(i);
+        const char * psz_img_name = _dyld_get_image_name(i);
         /* Check for "VLCKit.framework/Versions/Current/VLCKit",
          * as well as "VLCKit.framework/Versions/A/VLCKit" and
          * "VLC.framework/Versions/B/VLCKit" */
-        if( p_char = strstr( psz_img_name, "VLCKit.framework/Versions/" ))
+        if( (p_char = strstr( psz_img_name, "VLCKit.framework/Versions/" )) )
         {
             /* Look for the next forward slash */
             p_char += 26; /* p_char += strlen(" VLCKit.framework/Versions/" ) */
@@ -170,9 +175,11 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
 /*****************************************************************************
  * system_Configure: check for system specific configuration options.
  *****************************************************************************/
-void system_Configure( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
+void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
 {
-
+    (void)p_this;
+    (void)pi_argc;
+    (void)ppsz_argv;
 }
 
 /*****************************************************************************
@@ -180,6 +187,7 @@ void system_Configure( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
  *****************************************************************************/
 void system_End( libvlc_int_t *p_this )
 {
+    (void)p_this;
     free( vlc_global()->psz_vlcpath );
 
     if ( vlc_global()->iconv_macosx != (vlc_iconv_t)-1 )