]> git.sesse.net Git - vlc/commitdiff
* darwin_specific.[ch]: added strndup needed by video_output.c.
authorJon Lech Johansen <jlj@videolan.org>
Tue, 2 Jul 2002 22:07:02 +0000 (22:07 +0000)
committerJon Lech Johansen <jlj@videolan.org>
Tue, 2 Jul 2002 22:07:02 +0000 (22:07 +0000)
  * configure.in: added -lintl to plugins_LDFLAGS.

configure
configure.in
include/darwin_specific.h
src/misc/darwin_specific.c
src/video_output/video_output.c

index f6d34666f414bcd4c2a00718db0f39d8c176e8df..88eaf85c59435f756fc31aa4bff84a7fbdd83a9f 100755 (executable)
--- a/configure
+++ b/configure
@@ -4023,6 +4023,7 @@ fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
+  plugins_LDFLAGS="${plugins_LDFLAGS} -lintl"
 else
   echo "$ac_t""no" 1>&6
 fi
index e71afcb32aae87b2e0a7351ee057b6a8f85a0e2e..0fa7e4e37580cffad97f622eb126027f302fabae 100644 (file)
@@ -154,7 +154,10 @@ AC_CHECK_FUNC(inet_aton,,[
   AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv")
 ])
 AC_CHECK_FUNC(textdomain,,[
-  AC_CHECK_LIB(intl,textdomain,vlc_LDFLAGS="${vlc_LDFLAGS} -lintl")
+  AC_CHECK_LIB(intl,textdomain,
+    vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
+    plugins_LDFLAGS="${plugins_LDFLAGS} -lintl"
+  )
 ])
 
 dnl Check for getopt
index bc4f9a8b5d56a561b17133a1cc3b4e9354cf78b7..6a30db29836850ec08004f45328d8abe9585388c 100644 (file)
@@ -2,7 +2,7 @@
  * darwin_specific.h: Darwin specific features 
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: darwin_specific.h,v 1.3 2002/04/02 23:43:57 gbazin Exp $
+ * $Id: darwin_specific.h,v 1.4 2002/07/02 22:07:02 jlj Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -25,3 +25,4 @@
  * Prototypes
  *****************************************************************************/
 char  * system_GetProgramPath( void );
+extern char *strndup( const char *string, size_t n );
index 927cda67a7f7d9d7c1a08925c6cc7e1e620b25c9..baf214a77eaedad4b168b853e1576f95ca33eadf 100644 (file)
@@ -2,7 +2,7 @@
  * darwin_specific.c: Darwin specific features 
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: darwin_specific.c,v 1.12 2002/06/02 14:26:16 gbazin Exp $
+ * $Id: darwin_specific.c,v 1.13 2002/07/02 22:07:02 jlj Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -60,7 +60,7 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
         param.sched_priority = 10;
         if (pthread_setschedparam(pthread_self(), SCHED_RR, &param))  
         {
-            intf_ErrMsg("pthread_setschedparam failed");
+            msg_Err( p_this, "pthread_setschedparam failed" );
         }
     }
 }
@@ -89,3 +89,23 @@ char * system_GetProgramPath( void )
     return( psz_program_path );
 }
 
+/*****************************************************************************
+ * strndup: returns a malloc'd copy of at most n bytes of string 
+ * Does anyone know whether or not it will be present in Jaguar?
+ *****************************************************************************/
+char *strndup( const char *string, size_t n )
+{
+    char *psz;
+    size_t len;
+
+    len = __MIN( strlen( string ), n ); 
+    psz = (char*)malloc( len + 1 );
+
+    if( psz != NULL )
+    {
+        memcpy( (void*)psz, (const void*)string, len );
+        psz[ len ] = 0;
+    }
+
+    return( psz );
+}
index 370241b1b98e59f628c4f63dce34def329b3f15b..5b7f351cf6ed81ef5a8f76f26843d5e81523d050 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.185 2002/06/11 09:44:22 gbazin Exp $
+ * $Id: video_output.c,v 1.186 2002/07/02 22:07:02 jlj Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
 #include "video.h"
 #include "video_output.h"
 
+#if defined( SYS_DARWIN )
+#include "darwin_specific.h"
+#endif
+
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/