public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rasmus.villemoes at decode dot is" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug manual/14347] New: LOG_MAKEPRI needs LOG_FAC, or should not shift Date: Tue, 10 Jul 2012 15:55:00 -0000 [thread overview] Message-ID: <bug-14347-131@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=14347 Bug #: 14347 Summary: LOG_MAKEPRI needs LOG_FAC, or should not shift Product: glibc Version: 2.16 Status: NEW Severity: minor Priority: P2 Component: manual AssignedTo: unassigned@sourceware.org ReportedBy: rasmus.villemoes@decode.is CC: mtk.manpages@gmail.com, roland@gnu.org Classification: Unclassified The two examples of use of the LOG_MAKEPRI macro in the manual for 2.16 (and earlier) are broken. The facility macros LOG_USER, ..., LOG_LOCAL1, ... already contain a left-shift of 3, so to use these macros in LOG_MAKEPRI (which also makes a shift), that shift has to be undone by using the LOG_FAC macro. The example at the end of 18.2.2 would then be something like syslog (LOG_MAKEPRI(LOG_FAC(LOG_LOCAL1), LOG_ERROR), "Unable to make network connection to %s. Error=%m", host); Alternatively, the documentation could drop mentioning the LOG_MAKEPRI macro at all and simply instruct people to OR the facility and priority, resulting in the much simpler syslog (LOG_LOCAL1 | LOG_ERROR, "Unable to make network connection to %s. Error=%m", host); (Alternatively, this is a bug against the LOG_MAKEPRI macro, which should simply do exactly this, but this would break code which uses the LOG_FAC macro.) -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next reply other threads:[~2012-07-10 15:55 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-07-10 15:55 rasmus.villemoes at decode dot is [this message] 2012-07-10 16:55 ` [Bug libc/14347] " schwab@linux-m68k.org 2012-07-10 20:41 ` schwab@linux-m68k.org 2014-06-17 19:04 ` fweimer at redhat dot com 2023-06-18 23:47 ` echron at yahoo dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-14347-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).