Sources Bugzilla – Bug 2172
[PATCH] move _PATH_LOG definition to <paths.h> (in sysdeps)
Last modified: 2007-02-18 13:58:19 UTC
On GNU/kFreeBSD, the kernel doesn't allow creating named pipes in /dev. Therefore, on this platform, _PATH_LOG needs to be redefined to something outside this directory. This patch moves the _PATH_LOG definition to sysdeps/.../paths.h so that it can be overriden in our version of that header.
Created attachment 839 [details] move _PATH_LOG definition to paths.h 2006-01-18 Robert Millan <robertmh@gnu.org> * sysdeps/generic/paths.h: Define _PATH_LOG (as "/dev/log"). * sysdeps/unix/sysv/linux/paths.h: Ditto. * misc/sys/syslog.h: Stop defining _PATH_LOG, and include <paths.h> instead.
I am not especially happy with the idea of pulling in all paths.h definitions from syslog.h, and existing applications clearly require that _PATH_LOG be defined in syslog.h. I also haven't seen any other example of a system whose paths.h does define _PATH_LOG, though putting it there is an obvious thing to do and seems thoroughly harmless. I am less sanguine about syslog.h pulling in _PATH_*, which might annoy some existing source code. The more conservative patch would add a sysdeps files bits/syslog-path.h for it.
Created attachment 888 [details] patch Ok, here you are.
Subject: Bug 2172 CVSROOT: /cvs/glibc Module name: libc Changes by: roland@sources.redhat.com 2006-02-23 22:50:16 Modified files: misc : Makefile misc/sys : syslog.h Added files: bits : syslog-path.h Log message: 2006-02-23 Roland McGrath <roland@redhat.com> [BZ #2172] * bits/syslog-path.h: New file. * misc/Makefile (headers): Add it. * misc/sys/syslog.h: Include it. (_PATH_LOG): Macro removed. From Robert Millan <robertmh@gnu.org>. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/misc/Makefile.diff?cvsroot=glibc&r1=1.117&r2=1.118 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/bits/syslog-path.h.diff?cvsroot=glibc&r1=NONE&r2=1.1 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/misc/sys/syslog.h.diff?cvsroot=glibc&r1=1.16&r2=1.17
fixed now.