diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2006-08-08 20:59:26 +0000 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2006-08-08 20:59:26 +0000 |
commit | 7bb2361e657dc31ed73891f8e1ffdbfb916624c2 (patch) | |
tree | 6b73324fb644599ccb1d0c2a666e60b909d2484f /dbus/dbus-sysdeps.c | |
parent | 759fa115c95051eb32f6ed41b3cda1b219fc1aed (diff) |
* dbus/dbus-sysdeps.h:
* dbus/dbus-sysdeps.c:
add _dbus_printf_length (patch from Peter Kümmel
<syntheticpp at gmx dot net>)
Diffstat (limited to 'dbus/dbus-sysdeps.c')
-rw-r--r-- | dbus/dbus-sysdeps.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index e28ea667..cd0f7cf1 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -2983,6 +2983,21 @@ _dbus_full_duplex_pipe (int *fd1, #endif } + +#ifndef DBUS_WIN +/** + * Measure the message length without terminating nul + */ +int _dbus_printf_length (const char *format, + va_list args) +{ + char c; + return vsnprintf (&c, 1, format, args); +} +#endif + + + /** @} end of sysdeps */ /* tests in dbus-sysdeps-util.c */ |