Commit 06fca109 authored by Sam Hocevar's avatar Sam Hocevar

  * GNU/Hurd configuration and compilation fixes.
parent 6c67a6b1
......@@ -4,6 +4,7 @@
HEAD
* GNU/Hurd configuration and compilation fixes.
* Fixed a crash in subtitle rendering.
* Activated old crappy subtitle rendering in overlay mode (ugly but
probably better than having no subtitles at all).
......
This diff is collapsed.
......@@ -78,18 +78,24 @@ CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
CFLAGS="${CFLAGS} -I/usr/local/include"
dnl Check for pthreads - borrowed from XMMS
PTHREAD_LIBS=error
AC_CHECK_LIB(pthread,pthread_attr_init,THREAD_LIB="-lpthread")
if test "x${THREAD_LIB}" = xerror; then
AC_CHECK_FUNC(pthread_attr_init,,[
THREAD_LIB=error
if test "x${THREAD_LIB}" = xerror; then
AC_CHECK_LIB(pthread,pthread_attr_init,THREAD_LIB="-lpthread")
fi
if test "x${THREAD_LIB}" = xerror; then
AC_CHECK_LIB(pthreads,pthread_attr_init,THREAD_LIB="-lpthreads")
fi
if test "x${THREAD_LIB}" = xerror; then
fi
if test "x${THREAD_LIB}" = xerror; then
AC_CHECK_LIB(c_r,pthread_attr_init,THREAD_LIB="-lc_r")
fi
if test "x${THREAD_LIB}" = xerror; then
THREAD_LIBS=""
AC_CHECK_FUNC(pthread_attr_init)
fi
fi
if test "x${THREAD_LIB}" = xerror; then
THREAD_LIB=""
fi
])
dnl Check for cthreads under GNU/Hurd for instance
AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
dnl Check for misc headers
AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
......@@ -174,6 +180,11 @@ AC_TRY_COMPILE([#include <pthread.h>
void quux() { boolean_t foo; }],,
AC_DEFINE(BOOLEAN_T_IN_PTHREAD_H, 1, Define if <pthread.h> defines boolean_t.)
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
AC_MSG_CHECKING([for boolean_t in cthreads.h])
AC_TRY_COMPILE([#include <cthreads.h>
void quux() { boolean_t foo; }],,
AC_DEFINE(BOOLEAN_T_IN_CTHREADS_H, 1, Define if <cthreads.h> defines boolean_t.)
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.37 2001/07/30 00:53:04 sam Exp $
* $Id: common.h,v 1.38 2001/08/14 04:52:39 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -41,6 +41,8 @@ typedef u8 byte_t;
# include <sys/types.h>
#elif defined(BOOLEAN_T_IN_PTHREAD_H)
# include <pthread.h>
#elif defined(BOOLEAN_T_IN_CTHREADS_H)
# include <cthreads.h>
#else
typedef int boolean_t;
#endif
......
......@@ -181,6 +181,9 @@
/* Define if <pthread.h> defines boolean_t. */
#undef BOOLEAN_T_IN_PTHREAD_H
/* Define if <cthreads.h> defines boolean_t. */
#undef BOOLEAN_T_IN_CTHREADS_H
/* Define if <sys/dvdio.h> defines dvd_struct. */
#undef DVD_STRUCT_IN_SYS_DVDIO_H
......
......@@ -3,7 +3,7 @@
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: threads.h,v 1.22 2001/07/31 21:13:30 gbazin Exp $
* $Id: threads.h,v 1.23 2001/08/14 04:52:39 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -387,6 +387,9 @@ static __inline__ int vlc_mutex_destroy( vlc_mutex_t *p_mutex )
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
return pthread_mutex_destroy( p_mutex );
#elif defined( HAVE_CTHREADS_H )
return 0;
#elif defined( HAVE_KERNEL_SCHEDULER_H )
if( p_mutex->init == 9999 )
{
......@@ -681,6 +684,9 @@ static __inline__ int vlc_cond_destroy( vlc_cond_t *p_condvar )
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
return pthread_cond_destroy( p_condvar );
#elif defined( HAVE_CTHREADS_H )
return 0;
#elif defined( HAVE_KERNEL_SCHEDULER_H )
p_condvar->init = 0;
return 0;
......
......@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ps.c,v 1.33 2001/08/10 16:38:09 massiot Exp $
* $Id: input_ps.c,v 1.34 2001/08/14 04:52:39 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
......@@ -604,10 +604,10 @@ static void PSSeek( input_thread_t * p_input, off_t i_position )
p_method = (thread_ps_data_t *)p_input->p_plugin_data;
/* A little bourrin but should work for a while --Meuuh */
#ifndef WIN32
fseeko( p_method->stream, i_position, SEEK_SET );
#else
#if defined( WIN32 ) || defined( SYS_GNU0_2 )
fseek( p_method->stream, (long)i_position, SEEK_SET );
#else
fseeko( p_method->stream, i_position, SEEK_SET );
#endif
p_input->stream.p_selected_area->i_tell = i_position;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment