From d387411488a093f77f4cd752b75e8bf8360550c6 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Tue, 8 Aug 2006 22:08:39 +0000 Subject: * dbus/dbus-sysdeps.h: * dbus/dbus-sysdeps.c: * dbus/dbus-string.c: s/_dbus_printf_length/_dbus_printf_string_upper_bound to comform with GLib's function which does the same thing * configure.in: * bus/Makefile.am: * bus/dir-watch-default.c: * bus/dir-watch-dnotify.c: * bus/dir-watch-kqueue.c: Add kqueue directory watching for freebsd and split the directory watching code into seperate files per method/arch (patches from Timothy Redaelli ) --- dbus/dbus-string.c | 2 +- dbus/dbus-sysdeps.c | 4 ++-- dbus/dbus-sysdeps.h | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'dbus') diff --git a/dbus/dbus-string.c b/dbus/dbus-string.c index eec27b80..e35b9e1a 100644 --- a/dbus/dbus-string.c +++ b/dbus/dbus-string.c @@ -1200,7 +1200,7 @@ _dbus_string_append_printf_valist (DBusString *str, DBUS_VA_COPY (args_copy, args); /* Measure the message length without terminating nul */ - len = _dbus_printf_length (format, args); + len = _dbus_printf_string_upper_bound (format, args); if (!_dbus_string_lengthen (str, len)) { diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index cd0f7cf1..9a2c1fde 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -2988,8 +2988,8 @@ _dbus_full_duplex_pipe (int *fd1, /** * Measure the message length without terminating nul */ -int _dbus_printf_length (const char *format, - va_list args) +int _dbus_printf_string_upper_bound (const char *format, + va_list args) { char c; return vsnprintf (&c, 1, format, args); diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 9bc3e485..ed5b48e9 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -37,6 +37,8 @@ /* and it would just be annoying to abstract this */ #include +#include + DBUS_BEGIN_DECLS /* The idea of this file is to encapsulate everywhere that we're @@ -272,8 +274,8 @@ void _dbus_fd_set_close_on_exec (int fd); void _dbus_exit (int code) _DBUS_GNUC_NORETURN; -int _dbus_printf_length (const char *format, - va_list args); +int _dbus_printf_string_upper_bound (const char *format, + va_list args); /** -- cgit