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 ":"
105 #define DBUS_PID_UNSET ((dbus_pid_t) -1)
107 #define DBUS_UID_UNSET ((dbus_uid_t) -1)
109 #define DBUS_GID_UNSET ((dbus_gid_t) -1)
112 #define DBUS_PID_FORMAT "%lu"
114 #define DBUS_UID_FORMAT "%lu"
116 #define DBUS_GID_FORMAT "%lu"
151 int _dbus_write_socket_with_unix_fds (
int fd,
157 int _dbus_write_socket_with_unix_fds_two (
int fd,
173 int _dbus_connect_tcp_socket_with_nonce (
const char *host,
176 const char *noncefile,
203 dbus_gid_t **group_ids,
213 dbus_bool_t _dbus_daemon_is_session_bus_address_published (
const char *scope);
215 dbus_bool_t _dbus_daemon_publish_session_bus_address (
const char* address,
const char* shm_name);
217 void _dbus_daemon_unpublish_session_bus_address (
void);
242 #if DBUS_HAVE_ATOMIC_INT_COND
243 # define DBUS_HAVE_ATOMIC_INT 1
245 # undef DBUS_HAVE_ATOMIC_INT
257 #define _DBUS_POLLIN 0x0001
259 #define _DBUS_POLLPRI 0x0004
261 #define _DBUS_POLLOUT 0x0002
263 #define _DBUS_POLLERR 0x4000
265 #define _DBUS_POLLHUP 0x2000
267 #define _DBUS_POLLNVAL 0x8000
268 #elif defined(__HAIKU__)
270 #define _DBUS_POLLIN 0x0001
272 #define _DBUS_POLLOUT 0x0002
274 #define _DBUS_POLLERR 0x0004
276 #define _DBUS_POLLPRI 0x0020
278 #define _DBUS_POLLHUP 0x0080
280 #define _DBUS_POLLNVAL 0x1000
283 #define _DBUS_POLLIN 0x0001
285 #define _DBUS_POLLPRI 0x0002
287 #define _DBUS_POLLOUT 0x0004
289 #define _DBUS_POLLERR 0x0008
291 #define _DBUS_POLLHUP 0x0010
293 #define _DBUS_POLLNVAL 0x0020
308 int timeout_milliseconds);
382 void _dbus_exit (
int code) _DBUS_GNUC_NORETURN;
424 dbus_pid_t pid_to_write,
441 void _dbus_init_system_log (
void);
444 DBUS_SYSTEM_LOG_INFO,
445 DBUS_SYSTEM_LOG_SECURITY,
446 DBUS_SYSTEM_LOG_FATAL
447 } DBusSystemLogSeverity;
449 void _dbus_system_log (DBusSystemLogSeverity severity,
const char *msg, ...) _DBUS_GNUC_PRINTF (2, 3);
450 void _dbus_system_logv (DBusSystemLogSeverity severity, const
char *msg, va_list args);
455 #if !defined (DBUS_VA_COPY)
456 # if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32))
457 # define DBUS_VA_COPY(ap1, ap2) (*(ap1) = *(ap2))
458 # elif defined (DBUS_VA_COPY_AS_ARRAY)
459 # define DBUS_VA_COPY(ap1, ap2) memcpy ((ap1), (ap2), sizeof (va_list))
461 # define DBUS_VA_COPY(ap1, ap2) ((ap1) = (ap2))
470 #define _DBUS_BYTE_OF_PRIMITIVE(p, i) \
471 (((const char*)&(p))[(i)])
477 #define _DBUS_DOUBLES_BITWISE_EQUAL(a, b) \
478 (_DBUS_BYTE_OF_PRIMITIVE (a, 0) == _DBUS_BYTE_OF_PRIMITIVE (b, 0) && \
479 _DBUS_BYTE_OF_PRIMITIVE (a, 1) == _DBUS_BYTE_OF_PRIMITIVE (b, 1) && \
480 _DBUS_BYTE_OF_PRIMITIVE (a, 2) == _DBUS_BYTE_OF_PRIMITIVE (b, 2) && \
481 _DBUS_BYTE_OF_PRIMITIVE (a, 3) == _DBUS_BYTE_OF_PRIMITIVE (b, 3) && \
482 _DBUS_BYTE_OF_PRIMITIVE (a, 4) == _DBUS_BYTE_OF_PRIMITIVE (b, 4) && \
483 _DBUS_BYTE_OF_PRIMITIVE (a, 5) == _DBUS_BYTE_OF_PRIMITIVE (b, 5) && \
484 _DBUS_BYTE_OF_PRIMITIVE (a, 6) == _DBUS_BYTE_OF_PRIMITIVE (b, 6) && \
485 _DBUS_BYTE_OF_PRIMITIVE (a, 7) == _DBUS_BYTE_OF_PRIMITIVE (b, 7))
538 _dbus_replace_install_prefix (
const char *configure_time_path);
546 #define DBUS_DEFAULT_MESSAGE_UNIX_FDS 16
554 #include "dbus-sysdeps-win.h"