Summary: | dbus-1.4.12 fails to compile on solaris | ||
---|---|---|---|
Product: | dbus | Reporter: | Daniel Vergien <daniel.vergien> |
Component: | core | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | John (J5) Palmieri <johnp> |
Severity: | normal | ||
Priority: | medium | CC: | dam, smcv |
Version: | 1.4.x | Keywords: | patch |
Hardware: | All | ||
OS: | Solaris | ||
URL: | http://cgit.freedesktop.org/~smcv/dbus/log/?h=14-perror-39987 | ||
See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=61399 | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 36074 | ||
Attachments: |
dbus-1.4.12-dbus-sysdeps-util-unix.c.patch
[1/2] Cope with Unixes that don't have LOG_PERROR, like Solaris 10 [2/2] Add a semi-automatic test for _dbus_system_log Change #ifdef to #if |
Description
Daniel Vergien
2011-08-10 13:16:34 UTC
Does Solaris have a way to achieve the same effect as LOG_PERROR? In glibc, it's documented as: LOG_PERROR (Not in POSIX.1-2001.) Print to stderr as well. and The LOG_PERROR value for option is not specified by POSIX.1-2001, but is available in most versions of UNIX. If there isn't such a thing, we could either use a workaround similar to yours (and just not get output to stderr), or use both vsyslog() and vfprintf() to get output to syslog and stderr at the same time if LOG_PERROR doesn't exist. (I'd prefer to do an autoconf check rather than #ifndef, though, because LOG_PERROR might be an enum member on some platforms.) There is no equivalent to LOG_PERROR on Solaris. The error is still present in 1.5.6 and it would be nice if it would be fixed. Best regards -- Dago Created attachment 50497 [details] [review] [1/2] Cope with Unixes that don't have LOG_PERROR, like Solaris 10 Created attachment 50498 [details] [review] [2/2] Add a semi-automatic test for _dbus_system_log Review of attachment 50497 [details] [review]: Looks plausible. Review of attachment 50498 [details] [review]: This patch looks fine! g_test_trap_* is nifty: I hadn't seen it before. Review of attachment 50498 [details] [review]: This patch looks fine! g_test_trap_* is nifty: I hadn't seen it before. Fixed in git for 1.4.16 and 1.5.8, thanks In GIT HEAD I just noticed that when LOG_PERROR is not defined the definition in config.h is #define HAVE_DECL_LOG_PERROR 0 which means that the check with #ifdef is always true. The attached patch changing this to #if resolves the issue. Created attachment 77372 [details] [review] Change #ifdef to #if The error was just recently introduced in commit 88642f6fee46a4c6d1fde8ae221494a6b3188bd4 Re-fixed in git for 1.7.2, thanks. As far as I can see, this was a regression in master which never affected a release. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.