Bug 2172 - [PATCH] move _PATH_LOG definition to <paths.h> (in sysdeps)
Summary: [PATCH] move _PATH_LOG definition to <paths.h> (in sysdeps)
Alias: None
Product: glibc
Classification: Unclassified
Component: ports (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Roland McGrath
Depends on:
Reported: 2006-01-18 10:37 UTC by Robert Millan
Modified: 2007-02-18 13:58 UTC (History)
1 user (show)

See Also:
Host: i686-pc-kfreebsd-gnu
Target: i686-pc-kfreebsd-gnu
Build: i686-pc-kfreebsd-gnu
Last reconfirmed:

move _PATH_LOG definition to paths.h (553 bytes, patch)
2006-01-18 10:38 UTC, Robert Millan
Details | Diff
patch (1012 bytes, patch)
2006-02-22 16:54 UTC, Robert Millan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Millan 2006-01-18 10:37:05 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.
Comment 1 Robert Millan 2006-01-18 10:38:09 UTC
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>
Comment 2 Roland McGrath 2006-02-22 02:46:51 UTC
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.
Comment 3 Robert Millan 2006-02-22 16:54:18 UTC
Created attachment 888 [details]

Ok, here you are.
Comment 4 cvs-commit@gcc.gnu.org 2006-02-23 22:50:19 UTC
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>.


Comment 5 Andreas Jaeger 2007-02-18 13:58:19 UTC
fixed now.