ported to NetBSD

This commit is contained in:
darkeye 2004-02-23 19:12:52 +00:00
parent 7779a8f2a4
commit c99c732e04
5 changed files with 30 additions and 13 deletions

View File

@ -1,7 +1,7 @@
DarkIce next release DarkIce next release
o ported to OpenBSD, though real-time scheduling not supported, o ported to OpenBSD and NetBSD, though real-time scheduling not supported,
since it is not implemented in OpenBSD since it is not implemented in OpenBSD / NetBSD
15-02-2004: DarkIce 0.14 released 15-02-2004: DarkIce 0.14 released

View File

@ -130,6 +130,15 @@ case "${host_cpu}-${host_os}" in
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
;; ;;
*netbsd*)
# On NetBSD, use the pthread-config utility to generate proper
# flags
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
acx_pthread_ok=yes
;;
esac esac
if test x"$acx_pthread_ok" = xno; then if test x"$acx_pthread_ok" = xno; then

View File

@ -35,7 +35,7 @@ DIE=0
DIE=1 DIE=1
} }
(libtool --version) < /dev/null > /dev/null 2>&1 || { (libtool --help) < /dev/null > /dev/null 2>&1 || {
echo echo
echo "You must have libtool installed to compile $package." echo "You must have libtool installed to compile $package."
echo "Download the appropriate package for your system," echo "Download the appropriate package for your system,"

View File

@ -873,9 +873,9 @@ DarkIce :: configFileCast ( const Config & config )
void void
DarkIce :: setRealTimeScheduling ( void ) throw ( Exception ) DarkIce :: setRealTimeScheduling ( void ) throw ( Exception )
{ {
// don't include the following on OpenBSD, as the scheduling functions are // don't include the following on OpenBSD / NetBSD, as the scheduling
// not implemented. // functions are not implemented.
#if !defined( __OpenBSD__ ) #if !defined( __OpenBSD__ ) && !defined( __NetBSD__ )
uid_t euid; uid_t euid;
euid = geteuid(); euid = geteuid();
@ -921,9 +921,9 @@ DarkIce :: setRealTimeScheduling ( void ) throw ( Exception )
"It is recommended that you run this program as super-user"); "It is recommended that you run this program as super-user");
} }
#else #else
reportEvent( 1, "POSIX scheduling not supported on OpenBSD, " reportEvent( 1, "POSIX scheduling not supported on OpenBSD / NetBSD, "
"this may cause recording skips"); "this may cause recording skips");
#endif // __OpenBSD__ #endif // !__OpenBSD__ && !__NetBSD__
} }
@ -935,9 +935,9 @@ DarkIce :: setRealTimeScheduling ( void ) throw ( Exception )
void void
DarkIce :: setOriginalScheduling ( void ) throw ( Exception ) DarkIce :: setOriginalScheduling ( void ) throw ( Exception )
{ {
// don't include the following on OpenBSD, as the scheduling functions are // don't include the following on OpenBSD / NetBSD, as the scheduling
// not implemented. // functions are not implemented.
#if !defined( __OpenBSD__ ) #if !defined( __OpenBSD__ ) && !defined( __NetBSD__ )
uid_t euid; uid_t euid;
euid = geteuid(); euid = geteuid();
@ -957,7 +957,7 @@ DarkIce :: setOriginalScheduling ( void ) throw ( Exception )
reportEvent( 5, "reverted to original scheduling"); reportEvent( 5, "reverted to original scheduling");
} }
#endif // __OpenBSD__ #endif // !__OpenBSD__ && !__NetBSD__
} }
@ -1010,6 +1010,9 @@ DarkIce :: run ( void ) throw ( Exception )
$Source$ $Source$
$Log$ $Log$
Revision 1.40 2004/02/23 19:12:51 darkeye
ported to NetBSD
Revision 1.39 2004/02/19 06:47:06 darkeye Revision 1.39 2004/02/19 06:47:06 darkeye
finalized OpenBSD port finalized OpenBSD port

View File

@ -40,7 +40,9 @@
#include "config.h" #include "config.h"
#endif #endif
#ifdef HAVE_PTHREAD_H // check for __NetBSD__ because it won't be found by AC_CHECK_HEADER on NetBSD
// as pthread.h is in /usr/pkg/include, not /usr/include
#if defined( HAVE_PTHREAD_H ) || defined( __NetBSD__ )
#include <pthread.h> #include <pthread.h>
#else #else
#error need pthread.h #error need pthread.h
@ -328,6 +330,9 @@ class MultiThreadedConnector : public virtual Connector
$Source$ $Source$
$Log$ $Log$
Revision 1.4 2004/02/23 19:12:52 darkeye
ported to NetBSD
Revision 1.3 2002/11/26 21:41:20 darkeye Revision 1.3 2002/11/26 21:41:20 darkeye
bugfix: MultiThreadedConnector::sinkThread() was private, now public bugfix: MultiThreadedConnector::sinkThread() was private, now public