diff options
author | Havoc Pennington <hp@redhat.com> | 2003-01-04 20:29:46 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-01-04 20:29:46 +0000 |
commit | c92339de11a2f27198aee3b4242aa6fccc12a004 (patch) | |
tree | 7bb33ff8548d893855ba9db6bf38f6ffbd324a15 /dbus/dbus-internals.h | |
parent | 01af5ff4101e540a6456bca01d56272e701bea78 (diff) |
2003-01-04 Havoc Pennington <hp@pobox.com>
* dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
(_dbus_poll): new function
* dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
copied from GLib
* bus/loop.c: initial code for the daemon main loop
Diffstat (limited to 'dbus/dbus-internals.h')
-rw-r--r-- | dbus/dbus-internals.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 027b3ef6..2f025c14 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -69,6 +69,9 @@ do { #define _DBUS_ZERO(object) (memset (&(object), '\0', sizeof ((object)))) +#define _DBUS_STRUCT_OFFSET(struct_type, member) \ + ((long) ((unsigned char*) &((struct_type*) 0)->member)) + char* _dbus_strdup (const char *str); #define _DBUS_INT_MIN (-_DBUS_INT_MAX - 1) @@ -77,6 +80,15 @@ char* _dbus_strdup (const char *str); #define _DBUS_ONE_KILOBYTE 1024 #define _DBUS_ONE_MEGABYTE 1024 * _DBUS_ONE_KILOBYTE +#undef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) + +#undef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + +#undef ABS +#define ABS(a) (((a) < 0) ? -(a) : (a)) + typedef void (* DBusForeachFunction) (void *element, void *data); |