25 #ifndef DBUS_SYSDEPS_H
26 #define DBUS_SYSDEPS_H
34 #ifdef HAVE_INTTYPES_H
38 #include <dbus/dbus-errors.h>
39 #include <dbus/dbus-file.h>
40 #include <dbus/dbus-string.h>
59 #include "dbus-sysdeps-wince-glue.h"
65 #define _DBUS_PATH_SEPARATOR ";"
67 #define _DBUS_PATH_SEPARATOR ":"
104 #define DBUS_PID_UNSET ((dbus_pid_t) -1)
106 #define DBUS_UID_UNSET ((dbus_uid_t) -1)
108 #define DBUS_GID_UNSET ((dbus_gid_t) -1)
111 #define DBUS_PID_FORMAT "%lu"
113 #define DBUS_UID_FORMAT "%lu"
115 #define DBUS_GID_FORMAT "%lu"
150 int _dbus_write_socket_with_unix_fds (
int fd,
156 int _dbus_write_socket_with_unix_fds_two (
int fd,
172 int _dbus_connect_tcp_socket_with_nonce (
const char *host,
175 const char *noncefile,
202 dbus_gid_t **group_ids,
212 dbus_bool_t _dbus_daemon_is_session_bus_address_published (
const char *scope);
214 dbus_bool_t _dbus_daemon_publish_session_bus_address (
const char* address,
const char* shm_name);
216 void _dbus_daemon_unpublish_session_bus_address (
void);
241 #if DBUS_HAVE_ATOMIC_INT_COND
242 # define DBUS_HAVE_ATOMIC_INT 1
244 # undef DBUS_HAVE_ATOMIC_INT
256 #define _DBUS_POLLIN 0x0001
258 #define _DBUS_POLLPRI 0x0004
260 #define _DBUS_POLLOUT 0x0002
262 #define _DBUS_POLLERR 0x4000
264 #define _DBUS_POLLHUP 0x2000
266 #define _DBUS_POLLNVAL 0x8000
267 #elif defined(__HAIKU__)
269 #define _DBUS_POLLIN 0x0001
271 #define _DBUS_POLLOUT 0x0002
273 #define _DBUS_POLLERR 0x0004
275 #define _DBUS_POLLPRI 0x0020
277 #define _DBUS_POLLHUP 0x0080
279 #define _DBUS_POLLNVAL 0x1000
282 #define _DBUS_POLLIN 0x0001
284 #define _DBUS_POLLPRI 0x0002
286 #define _DBUS_POLLOUT 0x0004
288 #define _DBUS_POLLERR 0x0008
290 #define _DBUS_POLLHUP 0x0010
292 #define _DBUS_POLLNVAL 0x0020
307 int timeout_milliseconds);
380 void _dbus_exit (
int code) _DBUS_GNUC_NORETURN;
422 dbus_pid_t pid_to_write,
439 void _dbus_init_system_log (
void);
442 DBUS_SYSTEM_LOG_INFO,
443 DBUS_SYSTEM_LOG_SECURITY,
444 DBUS_SYSTEM_LOG_FATAL
445 } DBusSystemLogSeverity;
447 void _dbus_system_log (DBusSystemLogSeverity severity,
const char *msg, ...) _DBUS_GNUC_PRINTF (2, 3);
448 void _dbus_system_logv (DBusSystemLogSeverity severity, const
char *msg, va_list args);
453 #if !defined (DBUS_VA_COPY)
454 # if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32))
455 # define DBUS_VA_COPY(ap1, ap2) (*(ap1) = *(ap2))
456 # elif defined (DBUS_VA_COPY_AS_ARRAY)
457 # define DBUS_VA_COPY(ap1, ap2) memcpy ((ap1), (ap2), sizeof (va_list))
459 # define DBUS_VA_COPY(ap1, ap2) ((ap1) = (ap2))
468 #define _DBUS_BYTE_OF_PRIMITIVE(p, i) \
469 (((const char*)&(p))[(i)])
475 #define _DBUS_DOUBLES_BITWISE_EQUAL(a, b) \
476 (_DBUS_BYTE_OF_PRIMITIVE (a, 0) == _DBUS_BYTE_OF_PRIMITIVE (b, 0) && \
477 _DBUS_BYTE_OF_PRIMITIVE (a, 1) == _DBUS_BYTE_OF_PRIMITIVE (b, 1) && \
478 _DBUS_BYTE_OF_PRIMITIVE (a, 2) == _DBUS_BYTE_OF_PRIMITIVE (b, 2) && \
479 _DBUS_BYTE_OF_PRIMITIVE (a, 3) == _DBUS_BYTE_OF_PRIMITIVE (b, 3) && \
480 _DBUS_BYTE_OF_PRIMITIVE (a, 4) == _DBUS_BYTE_OF_PRIMITIVE (b, 4) && \
481 _DBUS_BYTE_OF_PRIMITIVE (a, 5) == _DBUS_BYTE_OF_PRIMITIVE (b, 5) && \
482 _DBUS_BYTE_OF_PRIMITIVE (a, 6) == _DBUS_BYTE_OF_PRIMITIVE (b, 6) && \
483 _DBUS_BYTE_OF_PRIMITIVE (a, 7) == _DBUS_BYTE_OF_PRIMITIVE (b, 7))
536 _dbus_replace_install_prefix (
const char *configure_time_path);
544 #include "dbus-sysdeps-win.h"