summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-internals.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-12-12 04:26:46 +0000
committerHavoc Pennington <hp@redhat.com>2002-12-12 04:26:46 +0000
commitd4b870e7f91b7018524f7b85dc00b90cc64453bf (patch)
tree2030a48f0fd0bcebc37ebc1cb9a69c56bf0ad5dd /dbus/dbus-internals.h
parent652aa5e14cbd6c87ff8ce19ba37168ad876151a8 (diff)
2002-12-11 Havoc Pennington <hp@pobox.com>
* 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.
Diffstat (limited to 'dbus/dbus-internals.h')
-rw-r--r--dbus/dbus-internals.h9
1 files changed, 4 insertions, 5 deletions
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 <dbus/dbus-memory.h>
#include <dbus/dbus-types.h>
#include <dbus/dbus-errors.h>
-#include <stdlib.h> /* for abort() */
-#include <string.h> /* just so it's there in every file */
+#include <dbus/dbus-sysdeps.h>
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)))