[pulseaudio-commits] r1928 - in /branches/lennart: ./ libltdl/ src/ src/pulsecore/
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed Oct 3 07:47:27 PDT 2007
Author: ossman
Date: Wed Oct 3 16:47:26 2007
New Revision: 1928
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1928&root=pulseaudio&view=rev
Log:
Assorted minor Windows compatibility fixes for recent code updates.
Modified:
branches/lennart/configure.ac
branches/lennart/libltdl/config.h
branches/lennart/src/Makefile.am
branches/lennart/src/pulsecore/authkey.c
branches/lennart/src/pulsecore/core-util.c
branches/lennart/src/pulsecore/fdsem.c
branches/lennart/src/pulsecore/ioline.c
branches/lennart/src/pulsecore/mutex-win32.c
branches/lennart/src/pulsecore/once.c
branches/lennart/src/pulsecore/pid.c
branches/lennart/src/pulsecore/rtsig.h
branches/lennart/src/pulsecore/sound-file-stream.c
branches/lennart/src/pulsecore/sound-file.c
branches/lennart/src/pulsecore/thread-win32.c
branches/lennart/src/pulsecore/winsock.h
Modified: branches/lennart/configure.ac
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/configure.ac?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/configure.ac (original)
+++ branches/lennart/configure.ac Wed Oct 3 16:47:26 2007
@@ -219,6 +219,7 @@
# Other
AC_CHECK_HEADERS([sys/ioctl.h])
AC_CHECK_HEADERS([byteswap.h])
+AC_CHECK_HEADERS([sys/syscall.h])
#### Typdefs, structures, etc. ####
Modified: branches/lennart/libltdl/config.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/libltdl/config.h?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/libltdl/config.h (original)
+++ branches/lennart/libltdl/config.h Wed Oct 3 16:47:26 2007
@@ -2,22 +2,22 @@
/* config-h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the `argz_append' function. */
-#define HAVE_ARGZ_APPEND 1
+/* #undef HAVE_ARGZ_APPEND */
/* Define to 1 if you have the `argz_create_sep' function. */
-#define HAVE_ARGZ_CREATE_SEP 1
+/* #undef HAVE_ARGZ_CREATE_SEP */
/* Define to 1 if you have the <argz.h> header file. */
-#define HAVE_ARGZ_H 1
+/* #undef HAVE_ARGZ_H */
/* Define to 1 if you have the `argz_insert' function. */
-#define HAVE_ARGZ_INSERT 1
+/* #undef HAVE_ARGZ_INSERT */
/* Define to 1 if you have the `argz_next' function. */
-#define HAVE_ARGZ_NEXT 1
+/* #undef HAVE_ARGZ_NEXT */
/* Define to 1 if you have the `argz_stringify' function. */
-#define HAVE_ARGZ_STRINGIFY 1
+/* #undef HAVE_ARGZ_STRINGIFY */
/* Define to 1 if you have the <assert.h> header file. */
#define HAVE_ASSERT_H 1
@@ -42,10 +42,10 @@
/* #undef HAVE_DLD_H */
/* Define to 1 if you have the `dlerror' function. */
-#define HAVE_DLERROR 1
+/* #undef HAVE_DLERROR */
/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
+/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have the <dl.h> header file. */
/* #undef HAVE_DL_H */
@@ -57,7 +57,7 @@
#define HAVE_ERRNO_H 1
/* Define to 1 if the system has the type `error_t'. */
-#define HAVE_ERROR_T 1
+/* #undef HAVE_ERROR_T */
/* Define to 1 if you have the `index' function. */
/* #undef HAVE_INDEX */
@@ -66,7 +66,7 @@
#define HAVE_INTTYPES_H 1
/* Define if you have the libdl library or equivalent. */
-#define HAVE_LIBDL 1
+/* #undef HAVE_LIBDL */
/* Define to 1 if you have the <mach-o/dyld.h> header file. */
/* #undef HAVE_MACH_O_DYLD_H */
@@ -146,7 +146,7 @@
#define HAVE_UNISTD_H 1
/* Define if the OS needs help to load dependent libraries for dlopen(). */
-/* #undef LTDL_DLOPEN_DEPLIBS */
+#define LTDL_DLOPEN_DEPLIBS 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
@@ -154,13 +154,13 @@
/* Define to the name of the environment variable that determines the dynamic
library search path. */
-#define LTDL_SHLIBPATH_VAR "LD_LIBRARY_PATH"
+#define LTDL_SHLIBPATH_VAR "PATH"
/* Define to the extension used for shared libraries, say, ".so". */
-#define LTDL_SHLIB_EXT ".so"
+#define LTDL_SHLIB_EXT ".dll"
/* Define to the system default library search path. */
-#define LTDL_SYSSEARCHPATH "/lib:/usr/lib:/usr/lib/atlas:/usr/local/lib:/lib/i486-linux-gnu:/usr/lib/i486-linux-gnu:/usr/local/lib"
+#define LTDL_SYSSEARCHPATH "/lib:/usr/lib"
/* Define if dlsym() requires a leading underscore in symbol names. */
/* #undef NEED_USCORE */
@@ -187,7 +187,7 @@
/* #undef const */
/* Define to a type to use for `error_t' if it is not otherwise available. */
-/* #undef error_t */
+#define error_t int
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
Modified: branches/lennart/src/Makefile.am
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/Makefile.am?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/Makefile.am (original)
+++ branches/lennart/src/Makefile.am Wed Oct 3 16:47:26 2007
@@ -78,8 +78,8 @@
if OS_IS_WIN32
PA_THREAD_OBJS = \
pulsecore/mutex-win32.c pulsecore/mutex.h \
- pulsecore/thread-win32.c pulsecore/thread.h
-# pulsecore/semaphore-win32.c pulsecore/semaphore.h
+ pulsecore/thread-win32.c pulsecore/thread.h \
+ pulsecore/semaphore-win32.c pulsecore/semaphore.h
else
PA_THREAD_OBJS = \
pulsecore/mutex-posix.c pulsecore/mutex.h \
Modified: branches/lennart/src/pulsecore/authkey.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/authkey.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/authkey.c (original)
+++ branches/lennart/src/pulsecore/authkey.c Wed Oct 3 16:47:26 2007
@@ -71,6 +71,10 @@
#define O_BINARY 0
#endif
+#ifndef O_NOCTTY
+#define O_NOCTTY 0
+#endif
+
/* Load an euthorization cookie from file fn and store it in data. If
* the cookie file doesn't exist, create it */
static int load(const char *fn, void *data, size_t length) {
Modified: branches/lennart/src/pulsecore/core-util.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/core-util.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/core-util.c (original)
+++ branches/lennart/src/pulsecore/core-util.c Wed Oct 3 16:47:26 2007
@@ -653,13 +653,21 @@
case SIGHUP: return "SIGHUP";
#endif
case SIGINT: return "SIGINT";
+#ifdef SIGQUIT
case SIGQUIT: return "SIGQUIT";
+#endif
case SIGILL: return "SIGULL";
+#ifdef SIGTRAP
case SIGTRAP: return "SIGTRAP";
+#endif
case SIGABRT: return "SIGABRT";
+#ifdef SIGBUS
case SIGBUS: return "SIGBUS";
+#endif
case SIGFPE: return "SIGFPE";
+#ifdef SIGKILL
case SIGKILL: return "SIGKILL";
+#endif
#ifdef SIGUSR1
case SIGUSR1: return "SIGUSR1";
#endif
@@ -670,30 +678,58 @@
#ifdef SIGPIPE
case SIGPIPE: return "SIGPIPE";
#endif
+#ifdef SIGALRM
case SIGALRM: return "SIGALRM";
+#endif
case SIGTERM: return "SIGTERM";
+#ifdef SIGSTKFLT
case SIGSTKFLT: return "SIGSTKFLT";
+#endif
#ifdef SIGCHLD
case SIGCHLD: return "SIGCHLD";
#endif
+#ifdef SIGCONT
case SIGCONT: return "SIGCONT";
+#endif
+#ifdef SIGSTOP
case SIGSTOP: return "SIGSTOP";
+#endif
+#ifdef SIGTSTP
case SIGTSTP: return "SIGTSTP";
+#endif
+#ifdef SIGTTIN
case SIGTTIN: return "SIGTTIN";
+#endif
+#ifdef SIGTTOU
case SIGTTOU: return "SIGTTOU";
+#endif
+#ifdef SIGURG
case SIGURG: return "SIGURG";
+#endif
#ifdef SIGXCPU
case SIGXCPU: return "SIGXCPU";
#endif
#ifdef SIGXFSZ
case SIGXFSZ: return "SIGXFSZ";
#endif
+#ifdef SIGVTALRM
case SIGVTALRM: return "SIGVTALRM";
+#endif
+#ifdef SIGPROF
case SIGPROF: return "SIGPROF";
+#endif
+#ifdef SIGWINCH
case SIGWINCH: return "SIGWINCH";
+#endif
+#ifdef SIGIO
case SIGIO: return "SIGIO";
+#endif
+#ifdef SIGPWR
case SIGPWR: return "SIGPWR";
+#endif
+#ifdef SIGSYS
case SIGSYS: return "SIGSYS";
+#endif
}
#ifdef SIGRTMIN
@@ -943,7 +979,10 @@
for (;;) {
struct stat st;
- if ((fd = open(fn, O_CREAT|O_RDWR|O_NOCTTY
+ if ((fd = open(fn, O_CREAT|O_RDWR
+#ifdef O_NOCTTY
+ |O_NOCTTY
+#endif
#ifdef O_NOFOLLOW
|O_NOFOLLOW
#endif
@@ -1431,6 +1470,7 @@
pa_log_debug("posix_madvise() failed (or doesn't exist), trying mlock(): %s", pa_cstrerror(r));
+#ifdef HAVE_MLOCK
while (size > 0 && bs > 0) {
if (bs > size)
@@ -1446,9 +1486,10 @@
a = (const uint8_t*) a + bs;
size -= bs;
}
+#endif
if (bs <= 0)
- pa_log_debug("mlock() failed too, giving up: %s", pa_cstrerror(errno));
+ pa_log_debug("mlock() failed too (or doesn't exist), giving up: %s", pa_cstrerror(errno));
else
pa_log_debug("mlock() worked fine!");
Modified: branches/lennart/src/pulsecore/fdsem.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/fdsem.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/fdsem.c (original)
+++ branches/lennart/src/pulsecore/fdsem.c Wed Oct 3 16:47:26 2007
@@ -25,7 +25,10 @@
#include <config.h>
#endif
+#ifdef HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
+#endif
+
#include <unistd.h>
#include <errno.h>
@@ -36,6 +39,10 @@
#include <pulsecore/core-util.h>
#include <pulse/xmalloc.h>
+#ifndef HAVE_PIPE
+#include <pulsecore/pipe.h>
+#endif
+
#ifdef __linux__
#if !defined(__NR_eventfd) && defined(__i386__)
Modified: branches/lennart/src/pulsecore/ioline.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/ioline.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/ioline.c (original)
+++ branches/lennart/src/pulsecore/ioline.c Wed Oct 3 16:47:26 2007
@@ -32,6 +32,7 @@
#include <pulse/xmalloc.h>
+#include <pulsecore/winsock.h>
#include <pulsecore/core-error.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
Modified: branches/lennart/src/pulsecore/mutex-win32.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/mutex-win32.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/mutex-win32.c (original)
+++ branches/lennart/src/pulsecore/mutex-win32.c Wed Oct 3 16:47:26 2007
@@ -40,7 +40,7 @@
pa_hashmap *wait_events;
};
-pa_mutex* pa_mutex_new(int recursive) {
+pa_mutex* pa_mutex_new(pa_bool_t recursive, pa_bool_t inherit_priority) {
pa_mutex *m;
m = pa_xnew(pa_mutex, 1);
Modified: branches/lennart/src/pulsecore/once.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/once.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/once.c (original)
+++ branches/lennart/src/pulsecore/once.c Wed Oct 3 16:47:26 2007
@@ -24,8 +24,6 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-
-#include <pthread.h>
#include <pulsecore/macro.h>
#include <pulsecore/mutex.h>
Modified: branches/lennart/src/pulsecore/pid.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/pid.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/pid.c (original)
+++ branches/lennart/src/pulsecore/pid.c Wed Oct 3 16:47:26 2007
@@ -88,7 +88,10 @@
for (;;) {
struct stat st;
- if ((fd = open(fn, mode|O_NOCTTY
+ if ((fd = open(fn, mode
+#ifdef O_NOCTTY
+ |O_NOCTTY
+#endif
#ifdef O_NOFOLLOW
|O_NOFOLLOW
#endif
Modified: branches/lennart/src/pulsecore/rtsig.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/rtsig.h?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/rtsig.h (original)
+++ branches/lennart/src/pulsecore/rtsig.h Wed Oct 3 16:47:26 2007
@@ -24,9 +24,6 @@
USA.
***/
-#include <poll.h>
-#include <sys/types.h>
-
/* Return the next unused POSIX Realtime signals */
int pa_rtsig_get(void);
Modified: branches/lennart/src/pulsecore/sound-file-stream.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/sound-file-stream.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/sound-file-stream.c (original)
+++ branches/lennart/src/pulsecore/sound-file-stream.c Wed Oct 3 16:47:26 2007
@@ -244,7 +244,11 @@
memset(&sfinfo, 0, sizeof(sfinfo));
- if ((fd = open(fname, O_RDONLY|O_NOCTTY)) < 0) {
+ if ((fd = open(fname, O_RDONLY
+#ifdef O_NOCTTY
+ |O_NOCTTY
+#endif
+ )) < 0) {
pa_log("Failed to open file %s: %s", fname, pa_cstrerror(errno));
goto fail;
}
Modified: branches/lennart/src/pulsecore/sound-file.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/sound-file.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/sound-file.c (original)
+++ branches/lennart/src/pulsecore/sound-file.c Wed Oct 3 16:47:26 2007
@@ -63,7 +63,11 @@
pa_memchunk_reset(chunk);
memset(&sfinfo, 0, sizeof(sfinfo));
- if ((fd = open(fname, O_RDONLY|O_NOCTTY)) < 0) {
+ if ((fd = open(fname, O_RDONLY
+#ifdef O_NOCTTY
+ |O_NOCTTY
+#endif
+ )) < 0) {
pa_log("Failed to open file %s: %s", fname, pa_cstrerror(errno));
goto finish;
}
Modified: branches/lennart/src/pulsecore/thread-win32.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/thread-win32.c?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/thread-win32.c (original)
+++ branches/lennart/src/pulsecore/thread-win32.c Wed Oct 3 16:47:26 2007
@@ -53,9 +53,8 @@
};
static pa_tls *thread_tls;
-static pa_once_t thread_tls_once = PA_ONCE_INIT;
+static pa_once thread_tls_once = PA_ONCE_INIT;
static pa_tls *monitor_tls;
-static pa_once_t monitor_tls_once = PA_ONCE_INIT;
static void thread_tls_once_func(void) {
thread_tls = pa_tls_new(NULL);
@@ -66,7 +65,7 @@
pa_thread *t = param;
assert(t);
- pa_once(&thread_tls_once, thread_tls_once_func);
+ pa_run_once(&thread_tls_once, thread_tls_once_func);
pa_tls_set(thread_tls, t);
t->thread_func(t->userdata);
@@ -122,18 +121,12 @@
}
pa_thread* pa_thread_self(void) {
- pa_once(&thread_tls_once, thread_tls_once_func);
+ pa_run_once(&thread_tls_once, thread_tls_once_func);
return pa_tls_get(thread_tls);
}
void pa_thread_yield(void) {
Sleep(0);
-}
-
-static void monitor_tls_once_func(void) {
- monitor_tls = pa_tls_new(NULL);
- assert(monitor_tls);
- pa_tls_set(monitor_tls, NULL);
}
static DWORD WINAPI monitor_thread_func(LPVOID param) {
@@ -191,7 +184,11 @@
if (t->free_func) {
struct pa_tls_monitor *m;
- pa_once(&monitor_tls_once, monitor_tls_once_func);
+ PA_ONCE_BEGIN {
+ monitor_tls = pa_tls_new(NULL);
+ assert(monitor_tls);
+ pa_tls_set(monitor_tls, NULL);
+ } PA_ONCE_END;
m = pa_tls_get(monitor_tls);
if (!m) {
Modified: branches/lennart/src/pulsecore/winsock.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/winsock.h?rev=1928&root=pulseaudio&r1=1927&r2=1928&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/winsock.h (original)
+++ branches/lennart/src/pulsecore/winsock.h Wed Oct 3 16:47:26 2007
@@ -15,6 +15,8 @@
#define EHOSTUNREACH WSAEHOSTUNREACH
#define EWOULDBLOCK WSAEWOULDBLOCK
+typedef long suseconds_t;
+
#endif
#ifdef HAVE_WS2TCPIP_H
More information about the pulseaudio-commits
mailing list