[polypaudio-commits] r597 - in /trunk/src/polypcore: iochannel.c iochannel.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Fri Feb 24 08:27:40 PST 2006
Author: ossman
Date: Fri Feb 24 17:27:39 2006
New Revision: 597
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=597&root=polypaudio&view=rev
Log:
Tweak the handling of missing credential support so that we minimise non-POSIX
headers in our headers.
Modified:
trunk/src/polypcore/iochannel.c
trunk/src/polypcore/iochannel.h
Modified: trunk/src/polypcore/iochannel.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/iochannel.c?rev=597&root=polypaudio&r1=596&r2=597&view=diff
==============================================================================
--- trunk/src/polypcore/iochannel.c (original)
+++ trunk/src/polypcore/iochannel.c Fri Feb 24 17:27:39 2006
@@ -29,6 +29,13 @@
#include <unistd.h>
#include <errno.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+
#include "winsock.h"
#include <polypcore/util.h>
@@ -370,7 +377,27 @@
return r;
}
-#endif
+#else /* SCM_CREDENTIALS */
+
+int pa_iochannel_creds_supported(pa_iochannel *io) {
+ return 0;
+}
+
+int pa_iochannel_creds_enable(pa_iochannel *io) {
+ return -1;
+}
+
+ssize_t pa_iochannel_write_with_creds(pa_iochannel*io, const void*data, size_t l) {
+ pa_log_error("pa_iochannel_write_with_creds() not supported.");
+ return -1;
+}
+
+ssize_t pa_iochannel_read_with_creds(pa_iochannel*io, void*data, size_t l, struct ucred *ucred, int *creds_valid) {
+ pa_log_error("pa_iochannel_read_with_creds() not supported.");
+ return -1;
+}
+
+#endif /* SCM_CREDENTIALS */
void pa_iochannel_set_callback(pa_iochannel*io, pa_iochannel_cb_t _callback, void *userdata) {
assert(io);
Modified: trunk/src/polypcore/iochannel.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/iochannel.h?rev=597&root=polypaudio&r1=596&r2=597&view=diff
==============================================================================
--- trunk/src/polypcore/iochannel.h (original)
+++ trunk/src/polypcore/iochannel.h Fri Feb 24 17:27:39 2006
@@ -23,8 +23,6 @@
***/
#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
#include <polyp/mainloop-api.h>
@@ -51,13 +49,13 @@
ssize_t pa_iochannel_write(pa_iochannel*io, const void*data, size_t l);
ssize_t pa_iochannel_read(pa_iochannel*io, void*data, size_t l);
-#ifdef SCM_CREDENTIALS
int pa_iochannel_creds_supported(pa_iochannel *io);
int pa_iochannel_creds_enable(pa_iochannel *io);
+struct ucred;
+
ssize_t pa_iochannel_write_with_creds(pa_iochannel*io, const void*data, size_t l);
ssize_t pa_iochannel_read_with_creds(pa_iochannel*io, void*data, size_t l, struct ucred *ucred, int *creds_valid);
-#endif
int pa_iochannel_is_readable(pa_iochannel*io);
int pa_iochannel_is_writable(pa_iochannel*io);
More information about the pulseaudio-commits
mailing list