From: Sam Hocevar Date: Tue, 15 May 2001 19:36:27 +0000 (+0000) Subject: * FreeBSD pthread fixes. X-Git-Tag: 0.2.81~118 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=23a4ece16736b4c032cc2be03af5d043ac508ca1;p=vlc * FreeBSD pthread fixes. --- diff --git a/ChangeLog b/ChangeLog index c6483a3daa..e4bd7d63d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,16 @@ #===================# HEAD + * FreeBSD pthread fixes. + * AC3 IMDCT and downmix functions are now in plugins, --imdct and + --downmix options added. + * Bugfixes, cleanings in gtk. + * Initialization bugfixes in input_dvd. + * Added a b_stopped flag to interface playlist to have a stop function in + interface plugins. + * Updated the Gtk+ interface so that it has the same features as the + Gnome one. + * Beginning of SSE/3DNow! support for imdct and downmix. * Ported alsa interface for alsa 0.9beta * Fixed a deadlock in spudec. * Added SPU cropping. diff --git a/configure b/configure index eb8c146924..c1cbb1458a 100755 --- a/configure +++ b/configure @@ -2388,26 +2388,9 @@ else echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for old style FreeBSD -pthread flag""... $ac_c" 1>&6 -echo "configure:2393: checking for old style FreeBSD -pthread flag" >&5 -cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread" -else - rm -rf conftest* - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2411: checking for pthread_create in -lpthread" >&5 + +echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:2394: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2415,7 +2398,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2444,10 +2427,27 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then LIB="${LIB} -lpthread" else echo "$ac_t""no" 1>&6 +echo $ac_n "checking for old style FreeBSD -pthread flag""... $ac_c" 1>&6 +echo "configure:2432: checking for old style FreeBSD -pthread flag" >&5 + cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread" +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 fi +rm -f conftest* fi -rm -f conftest* echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6 echo "configure:2454: checking for thread_create in -lthreads" >&5 diff --git a/configure.in b/configure.in index 6b85cc1816..50afe0b356 100644 --- a/configure.in +++ b/configure.in @@ -61,15 +61,17 @@ AC_FUNC_MMAP AC_TYPE_SIGNAL AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl") AC_CHECK_LIB(m,pow,LIB_YUV="${LIB_YUV} -lm") -AC_MSG_CHECKING(for old style FreeBSD -pthread flag) -AC_EGREP_CPP(yes, - [#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001 - yes - #endif - ], AC_MSG_RESULT(yes) - DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread", - AC_MSG_RESULT(no) - AC_CHECK_LIB(pthread,pthread_create,LIB="${LIB} -lpthread")) + +AC_CHECK_LIB(pthread,pthread_create, + LIB="${LIB} -lpthread", + AC_MSG_CHECKING(for old style FreeBSD -pthread flag) + AC_EGREP_CPP(yes, + [#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001 + yes + #endif], + AC_MSG_RESULT(yes) + DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread", + AC_MSG_RESULT(no))) AC_CHECK_LIB(threads,thread_create,LIB="${LIB} -lthreads") CPPFLAGS="${CPPFLAGS} -I/usr/local/include" diff --git a/plugins/imdct/ac3_imdct_common.c b/plugins/imdct/ac3_imdct_common.c index 15ff1d9c49..493eca2d12 100644 --- a/plugins/imdct/ac3_imdct_common.c +++ b/plugins/imdct/ac3_imdct_common.c @@ -2,7 +2,7 @@ * ac3_imdct_common.c: common ac3 DCT functions ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: ac3_imdct_common.c,v 1.1 2001/05/15 16:19:42 sam Exp $ + * $Id: ac3_imdct_common.c,v 1.2 2001/05/15 19:36:27 sam Exp $ * * Authors: Renaud Dartus * Aaron Holtzman @@ -109,6 +109,8 @@ static const int pm64[64] = 7, 23, 39, 55, 15, 31, 47, 63 }; +void _M( fft_64p ) ( complex_t *a ); + void _M( imdct_do_256 ) (imdct_t * p_imdct, float data[],float delay[]) { int i, j, k; diff --git a/src/interface/main.c b/src/interface/main.c index cd15fb856a..e2a9c97181 100644 --- a/src/interface/main.c +++ b/src/interface/main.c @@ -4,7 +4,7 @@ * and spawn threads. ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: main.c,v 1.95 2001/05/15 16:19:42 sam Exp $ + * $Id: main.c,v 1.96 2001/05/15 19:36:27 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -47,6 +47,10 @@ # include #endif +#ifndef WIN32 +#include /* BSD: struct in_addr */ +#endif + #include #include /* ENOMEM */ #include /* getenv(), strtol(), */