mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
revive solaris module
Hi All, This patch fixes the solaris audio device source and sink, and fixes some portability issues that break the build on solaris. Questions and comments welcomed. I've tested this patch only with OpenSolaris Express snv 103. Eventually I hope to be able to test a few older releases and older hardware (though it is hard to say whether there is much interest in those). This is my first brush with pulseaudio and so I read the wiki docs and some of the source code but I'm still unsure of a few things. In particular I'm wondering about rewind processing, corking and what (if anything) the module needs for those. I'm also unclear on the implications of thread_info.buffer_size, .fragment_size and .max_request, and whether my code is correct or not. This patch disables link map/library versioning unless ld is GNU ld. Another approach for solaris would be to use that linker's -M option, but I couldn't make that work (due to undefined mainloop, browse and simple symbols when linking pacat. I can post the errors if anyone is intested.) Thanks, Finn Thain
This commit is contained in:
parent
ff38eaf677
commit
0329edd179
11 changed files with 729 additions and 395 deletions
|
|
@ -62,7 +62,7 @@ else
|
|||
|
||||
rm -f Makefile.am~ configure.ac~
|
||||
# Evil, evil, evil, evil hack
|
||||
sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force
|
||||
sed 's/read dummy/\#/' `which gettextize` | bash -s -- --copy --force
|
||||
test -f Makefile.am~ && mv Makefile.am~ Makefile.am
|
||||
test -f configure.ac~ && mv configure.ac~ configure.ac
|
||||
|
||||
|
|
|
|||
16
configure.ac
16
configure.ac
|
|
@ -70,8 +70,7 @@ fi
|
|||
|
||||
case $host in
|
||||
*-*-solaris* )
|
||||
AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
|
||||
AC_DEFINE(_XOPEN_SOURCE, 2, 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)
|
||||
;;
|
||||
esac
|
||||
|
|
@ -92,11 +91,20 @@ AC_USE_SYSTEM_EXTENSIONS
|
|||
|
||||
# M4
|
||||
|
||||
AC_PATH_PROG([M4], [m4 gm4], [no])
|
||||
AC_CHECK_PROGS([M4], gm4 m4, no)
|
||||
if test "x$M4" = xno ; then
|
||||
AC_MSG_ERROR([m4 missing])
|
||||
fi
|
||||
|
||||
# Linker
|
||||
|
||||
AC_PROG_LD
|
||||
AC_PROG_LD_GNU
|
||||
|
||||
AC_SUBST(HAVE_GNU_LD)
|
||||
AM_CONDITIONAL([HAVE_GNU_LD], [test "x$HAVE_GNU_LD" = x1])
|
||||
|
||||
|
||||
dnl Compiler flags
|
||||
DESIRED_FLAGS="-Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option"
|
||||
|
||||
|
|
@ -1059,7 +1067,7 @@ if test "x$HAVE_HAL" = x1 ; then
|
|||
dbus=yes
|
||||
fi
|
||||
|
||||
if test "x${dbus}" != xno || test "x${bluez}" != xno || "x${hal}" != xno ; then
|
||||
if test "x${dbus}" != xno || test "x${bluez}" != xno || test "x${hal}" != xno ; then
|
||||
|
||||
PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.0.0 ],
|
||||
[
|
||||
|
|
|
|||
|
|
@ -713,8 +713,11 @@ libpulse_la_SOURCES = \
|
|||
pulse/xmalloc.c pulse/xmalloc.h
|
||||
|
||||
libpulse_la_CFLAGS = $(AM_CFLAGS)
|
||||
libpulse_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
|
||||
libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LTLIBICONV) libpulsecommon-@PA_MAJORMINORMICRO@.la
|
||||
libpulse_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_VERSION_INFO)
|
||||
if HAVE_GNU_LD
|
||||
libpulse_la_LDFLAGS += -Wl,-version-script=$(srcdir)/map-file
|
||||
endif
|
||||
|
||||
if HAVE_X11
|
||||
libpulse_la_SOURCES += pulse/client-conf-x11.c pulse/client-conf-x11.h
|
||||
|
|
@ -725,17 +728,26 @@ endif
|
|||
libpulse_simple_la_SOURCES = pulse/simple.c pulse/simple.h
|
||||
libpulse_simple_la_CFLAGS = $(AM_CFLAGS)
|
||||
libpulse_simple_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la
|
||||
libpulse_simple_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_SIMPLE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
|
||||
libpulse_simple_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_SIMPLE_VERSION_INFO)
|
||||
if HAVE_GNU_LD
|
||||
libpulse_simple_la_LDFLAGS += -Wl,-version-script=$(srcdir)/map-file
|
||||
endif
|
||||
|
||||
libpulse_browse_la_SOURCES = pulse/browser.c pulse/browser.h pulsecore/avahi-wrap.c pulsecore/avahi-wrap.h
|
||||
libpulse_browse_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
|
||||
libpulse_browse_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la $(AVAHI_LIBS)
|
||||
libpulse_browse_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_BROWSE_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
|
||||
libpulse_browse_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_BROWSE_VERSION_INFO)
|
||||
if HAVE_GNU_LD
|
||||
libpulse_browse_la_LDFLAGS += -Wl,-version-script=$(srcdir)/map-file
|
||||
endif
|
||||
|
||||
libpulse_mainloop_glib_la_SOURCES = pulse/glib-mainloop.h pulse/glib-mainloop.c
|
||||
libpulse_mainloop_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
|
||||
libpulse_mainloop_glib_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINORMICRO@.la $(GLIB20_LIBS)
|
||||
libpulse_mainloop_glib_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO) -Wl,-version-script=$(srcdir)/map-file
|
||||
libpulse_mainloop_glib_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO)
|
||||
if HAVE_GNU_LD
|
||||
libpulse_mainloop_glib_la_LDFLAGS += -Wl,-version-script=$(srcdir)/map-file
|
||||
endif
|
||||
|
||||
###################################
|
||||
# OSS emulation #
|
||||
|
|
|
|||
|
|
@ -94,8 +94,10 @@ static const pa_daemon_conf default_conf = {
|
|||
,.rlimit_fsize = { .value = 0, .is_set = FALSE },
|
||||
.rlimit_data = { .value = 0, .is_set = FALSE },
|
||||
.rlimit_stack = { .value = 0, .is_set = FALSE },
|
||||
.rlimit_core = { .value = 0, .is_set = FALSE },
|
||||
.rlimit_rss = { .value = 0, .is_set = FALSE }
|
||||
.rlimit_core = { .value = 0, .is_set = FALSE }
|
||||
#ifdef RLIMIT_RSS
|
||||
,.rlimit_rss = { .value = 0, .is_set = FALSE }
|
||||
#endif
|
||||
#ifdef RLIMIT_NPROC
|
||||
,.rlimit_nproc = { .value = 0, .is_set = FALSE }
|
||||
#endif
|
||||
|
|
@ -472,7 +474,9 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
|
|||
{ "rlimit-data", parse_rlimit, &c->rlimit_data, NULL },
|
||||
{ "rlimit-stack", parse_rlimit, &c->rlimit_stack, NULL },
|
||||
{ "rlimit-core", parse_rlimit, &c->rlimit_core, NULL },
|
||||
#ifdef RLIMIT_RSS
|
||||
{ "rlimit-rss", parse_rlimit, &c->rlimit_rss, NULL },
|
||||
#endif
|
||||
#ifdef RLIMIT_NOFILE
|
||||
{ "rlimit-nofile", parse_rlimit, &c->rlimit_nofile, NULL },
|
||||
#endif
|
||||
|
|
@ -651,7 +655,9 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) {
|
|||
pa_strbuf_printf(s, "rlimit-data = %li\n", c->rlimit_data.is_set ? (long int) c->rlimit_data.value : -1);
|
||||
pa_strbuf_printf(s, "rlimit-stack = %li\n", c->rlimit_stack.is_set ? (long int) c->rlimit_stack.value : -1);
|
||||
pa_strbuf_printf(s, "rlimit-core = %li\n", c->rlimit_core.is_set ? (long int) c->rlimit_core.value : -1);
|
||||
#ifdef RLIMIT_RSS
|
||||
pa_strbuf_printf(s, "rlimit-rss = %li\n", c->rlimit_rss.is_set ? (long int) c->rlimit_rss.value : -1);
|
||||
#endif
|
||||
#ifdef RLIMIT_AS
|
||||
pa_strbuf_printf(s, "rlimit-as = %li\n", c->rlimit_as.is_set ? (long int) c->rlimit_as.value : -1);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -87,8 +87,10 @@ typedef struct pa_daemon_conf {
|
|||
char *config_file;
|
||||
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
pa_rlimit rlimit_fsize, rlimit_data, rlimit_stack, rlimit_core, rlimit_rss;
|
||||
|
||||
pa_rlimit rlimit_fsize, rlimit_data, rlimit_stack, rlimit_core;
|
||||
#ifdef RLIMIT_RSS
|
||||
pa_rlimit rlimit_rss;
|
||||
#endif
|
||||
#ifdef RLIMIT_NOFILE
|
||||
pa_rlimit rlimit_nofile;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -294,7 +294,9 @@ static void set_all_rlimits(const pa_daemon_conf *conf) {
|
|||
set_one_rlimit(&conf->rlimit_data, RLIMIT_DATA, "RLIMIT_DATA");
|
||||
set_one_rlimit(&conf->rlimit_stack, RLIMIT_STACK, "RLIMIT_STACK");
|
||||
set_one_rlimit(&conf->rlimit_core, RLIMIT_CORE, "RLIMIT_CORE");
|
||||
#ifdef RLIMIT_RSS
|
||||
set_one_rlimit(&conf->rlimit_rss, RLIMIT_RSS, "RLIMIT_RSS");
|
||||
#endif
|
||||
#ifdef RLIMIT_NPROC
|
||||
set_one_rlimit(&conf->rlimit_nproc, RLIMIT_NPROC, "RLIMIT_NPROC");
|
||||
#endif
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -51,7 +51,12 @@
|
|||
#include <pulsecore/macro.h>
|
||||
#include <pulsecore/strbuf.h>
|
||||
#include <pulsecore/random.h>
|
||||
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#else
|
||||
#include <pulsecore/poll.h>
|
||||
#endif
|
||||
|
||||
#include "raop_client.h"
|
||||
#include "rtsp_client.h"
|
||||
|
|
|
|||
|
|
@ -43,9 +43,14 @@
|
|||
#include <pulsecore/log.h>
|
||||
#include <pulsecore/macro.h>
|
||||
#include <pulsecore/strbuf.h>
|
||||
#include <pulsecore/poll.h>
|
||||
#include <pulsecore/ioline.h>
|
||||
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#else
|
||||
#include <pulsecore/poll.h>
|
||||
#endif
|
||||
|
||||
#include "rtsp_client.h"
|
||||
|
||||
struct pa_rtsp_client {
|
||||
|
|
|
|||
|
|
@ -2505,7 +2505,7 @@ char *pa_machine_id(void) {
|
|||
char *pa_uname_string(void) {
|
||||
struct utsname u;
|
||||
|
||||
pa_assert_se(uname(&u) == 0);
|
||||
pa_assert_se(uname(&u) >= 0);
|
||||
|
||||
return pa_sprintf_malloc("%s %s %s %s", u.sysname, u.machine, u.release, u.version);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,12 @@
|
|||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_SYS_PRCTL_H
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
#include <pulse/timeval.h>
|
||||
#include <pulsecore/macro.h>
|
||||
#include <pulsecore/core-error.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue