mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
Merge commit 'flameeyes/osx'
This commit is contained in:
commit
3d6278bc31
5 changed files with 28 additions and 5 deletions
10
bootstrap.sh
10
bootstrap.sh
|
|
@ -40,10 +40,16 @@ run_versioned() {
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
case $(uname) in
|
||||||
|
*Darwin*)
|
||||||
|
LIBTOOLIZE="glibtoolize"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
|
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
|
||||||
echo "Activating pre-commit hook."
|
echo "Activating pre-commit hook."
|
||||||
cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit
|
cp -pv .git/hooks/pre-commit.sample .git/hooks/pre-commit
|
||||||
chmod -c +x .git/hooks/pre-commit
|
chmod -v +x .git/hooks/pre-commit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f .tarball-version ]; then
|
if [ -f .tarball-version ]; then
|
||||||
|
|
|
||||||
13
configure.ac
13
configure.ac
|
|
@ -74,6 +74,10 @@ case $host in
|
||||||
AC_DEFINE(_XOPEN_SOURCE, 600, Needed to get declarations for msg_control and msg_controllen on Solaris)
|
AC_DEFINE(_XOPEN_SOURCE, 600, Needed to get declarations for msg_control and msg_controllen on Solaris)
|
||||||
AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
|
AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
|
||||||
;;
|
;;
|
||||||
|
*-*-darwin* )
|
||||||
|
AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X])
|
||||||
|
AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X])
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
|
|
@ -119,6 +123,15 @@ dnl other linkes might be added later
|
||||||
CC_CHECK_LDFLAGS([-Wl,-z,now], [IMMEDIATE_LDFLAGS="-Wl,-z,now"])
|
CC_CHECK_LDFLAGS([-Wl,-z,now], [IMMEDIATE_LDFLAGS="-Wl,-z,now"])
|
||||||
AC_SUBST([IMMEDIATE_LDFLAGS])
|
AC_SUBST([IMMEDIATE_LDFLAGS])
|
||||||
|
|
||||||
|
dnl On ELF systems we don't want the libraries to be unloaded since we
|
||||||
|
dnl don't clean them up properly, so we request the nodelete flag to be
|
||||||
|
dnl enabled.
|
||||||
|
dnl
|
||||||
|
dnl On other systems, we don't really know how to do that, but it's
|
||||||
|
dnl welcome if somebody can tell.
|
||||||
|
CC_CHECK_LDFLAGS([-Wl,-z,nodelete], [NODELETE_LDFLAGS="-Wl,-z,nodelete"])
|
||||||
|
AC_SUBST([NODELETE_LDFLAGS])
|
||||||
|
|
||||||
dnl Check for the proper way to build libraries that have no undefined
|
dnl Check for the proper way to build libraries that have no undefined
|
||||||
dnl symbols; on some hosts this needs to be avoided but the macro
|
dnl symbols; on some hosts this needs to be avoided but the macro
|
||||||
dnl takes care of it.
|
dnl takes care of it.
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ AM_CFLAGS = \
|
||||||
|
|
||||||
AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)
|
AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)
|
||||||
AM_LDADD = $(PTHREAD_LIBS) $(INTLLIBS)
|
AM_LDADD = $(PTHREAD_LIBS) $(INTLLIBS)
|
||||||
AM_LDFLAGS = -Wl,-z,nodelete
|
AM_LDFLAGS = $(NODELETE_LDFLAGS)
|
||||||
|
|
||||||
if STATIC_BINS
|
if STATIC_BINS
|
||||||
BINLDFLAGS = -static
|
BINLDFLAGS = -static
|
||||||
|
|
|
||||||
|
|
@ -172,11 +172,11 @@ int pa_asyncmsgq_send(pa_asyncmsgq *a, pa_msgobject *object, int code, const voi
|
||||||
return i.ret;
|
return i.ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pa_asyncmsgq_get(pa_asyncmsgq *a, pa_msgobject **object, int *code, void **userdata, int64_t *offset, pa_memchunk *chunk, pa_bool_t wait) {
|
int pa_asyncmsgq_get(pa_asyncmsgq *a, pa_msgobject **object, int *code, void **userdata, int64_t *offset, pa_memchunk *chunk, pa_bool_t wait_op) {
|
||||||
pa_assert(PA_REFCNT_VALUE(a) > 0);
|
pa_assert(PA_REFCNT_VALUE(a) > 0);
|
||||||
pa_assert(!a->current);
|
pa_assert(!a->current);
|
||||||
|
|
||||||
if (!(a->current = pa_asyncq_pop(a->asyncq, wait))) {
|
if (!(a->current = pa_asyncq_pop(a->asyncq, wait_op))) {
|
||||||
/* pa_log("failure"); */
|
/* pa_log("failure"); */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,9 @@ static void* work(void *p) {
|
||||||
pa_log_notice("CPU%i: Sleeping for 1s", PA_PTR_TO_UINT(p));
|
pa_log_notice("CPU%i: Sleeping for 1s", PA_PTR_TO_UINT(p));
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
|
||||||
|
#ifdef CLOCK_REALTIME
|
||||||
pa_assert_se(clock_gettime(CLOCK_REALTIME, &end) == 0);
|
pa_assert_se(clock_gettime(CLOCK_REALTIME, &end) == 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
nsec =
|
nsec =
|
||||||
(uint64_t) ((((double) rand())*(double)(msec_upper-msec_lower)*PA_NSEC_PER_MSEC)/RAND_MAX) +
|
(uint64_t) ((((double) rand())*(double)(msec_upper-msec_lower)*PA_NSEC_PER_MSEC)/RAND_MAX) +
|
||||||
|
|
@ -84,7 +86,9 @@ static void* work(void *p) {
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
#ifdef CLOCK_REALTIME
|
||||||
pa_assert_se(clock_gettime(CLOCK_REALTIME, &now) == 0);
|
pa_assert_se(clock_gettime(CLOCK_REALTIME, &now) == 0);
|
||||||
|
#endif
|
||||||
} while (now.tv_sec < end.tv_sec ||
|
} while (now.tv_sec < end.tv_sec ||
|
||||||
(now.tv_sec == end.tv_sec && now.tv_nsec < end.tv_nsec));
|
(now.tv_sec == end.tv_sec && now.tv_nsec < end.tv_nsec));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue