From d4b870e7f91b7018524f7b85dc00b90cc64453bf Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 12 Dec 2002 04:26:46 +0000 Subject: 2002-12-11 Havoc Pennington * dbus/dbus-types.h: add dbus_unichar * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv * dbus/dbus-connection.c (dbus_connection_send_message): return TRUE on success * dbus/dbus-transport.c: include dbus-watch.h * dbus/dbus-connection.c: include dbus-message-internal.h * HACKING: add file with coding guidelines stuff. * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string handling here, for security purposes (as in vsftpd). Not actually using this class yet. * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all system/libc usage here, as in vsftpd, for ease of auditing (and should also simplify portability). Haven't actually moved all the system/libc usage into here yet. --- dbus/dbus-internals.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'dbus/dbus-internals.h') diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 5d001397..fd54a5f1 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -32,8 +32,7 @@ #include #include #include -#include /* for abort() */ -#include /* just so it's there in every file */ +#include DBUS_BEGIN_DECLS; @@ -52,7 +51,7 @@ do { \ { \ _dbus_warn ("Assertion failed \"%s\" file \"%s\" line %d\n", \ #condition, __FILE__, __LINE__); \ - abort (); \ + _dbus_abort (); \ } \ } while (0) @@ -60,10 +59,10 @@ do { \ do { \ _dbus_warn ("File \"%s\" line %d should not have been reached: %s\n", \ __FILE__, __LINE__, (explanation)); \ - abort (); \ + _dbus_abort (); \ } while (0) -#define _DBUS_N_ELEMENTS(array) (sizeof ((array)) / sizeof ((array)[0])) +#define _DBUS_N_ELEMENTS(array) ((int) (sizeof ((array)) / sizeof ((array)[0]))) #define _DBUS_POINTER_TO_INT(pointer) ((long)(pointer)) #define _DBUS_INT_TO_POINTER(integer) ((void*)((long)(integer))) -- cgit