From 43b944a0a6ea48e8a8b06ae3e638299f591cde8d Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 15 Jun 2007 19:28:36 +0000 Subject: 2007-06-15 Havoc Pennington * dbus/dbus-sysdeps.c (_dbus_set_errno_to_zero) (_dbus_get_is_errno_nonzero, _dbus_get_is_errno_eintr) (_dbus_strerror_from_errno): family of functions to abstract errno, though these are somewhat bogus (really we should make our socket wrappers not use errno probably - the issue is that any usage of errno that isn't socket-related probably is not cross-platform, so should either be in a unix-only file that can use errno directly, or is a bug - these general errno wrappers hide issues of this nature in non-socket code, while socket-specific API changes would not since sockets are allowed cross-platform) --- dbus/dbus-sysdeps.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'dbus/dbus-sysdeps.h') diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 3e2b8ceb..49524e3b 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -33,10 +33,6 @@ * stuff straight out of string.h, so have this here for now. */ #include - -/* and it would just be annoying to abstract this */ -#include - #include DBUS_BEGIN_DECLS @@ -315,6 +311,13 @@ dbus_bool_t _dbus_generate_random_ascii (DBusString *str, const char* _dbus_error_from_errno (int error_number); +void _dbus_set_errno_to_zero (void); +dbus_bool_t _dbus_get_is_errno_nonzero (void); +dbus_bool_t _dbus_get_is_errno_eagain_or_ewouldblock (void); +dbus_bool_t _dbus_get_is_errno_enomem (void); +dbus_bool_t _dbus_get_is_errno_eintr (void); +const char* _dbus_strerror_from_errno (void); + void _dbus_disable_sigpipe (void); -- cgit