This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Misc portability improvements
- From: Robert Millan <rmh at aybabtu dot com>
- To: Roland McGrath <roland at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 2 Sep 2005 10:03:36 +0200
- Subject: Re: [PATCH] Misc portability improvements
- Organisation: free as in freedom
- References: <20050822130416.GA7682@aragorn> <20050902050903.4C2721809B0@magilla.sf.frob.com>
On Thu, Sep 01, 2005 at 10:09:03PM -0700, Roland McGrath wrote:
> > This patch includes miscellaneous portability improvements.
>
> Send separate changes as separate patches in separate messages.
Sorry; I will. (I assume it's ok to reply to your questions in the same mail)
> > * manual/errno.texi: Add ENOATTR and EDOOFUS (of BSD origin).
> > * sysdeps/gnu/errlist.c: Regenerate.
>
> This is because you use gnu/errlist.c for gnu/kfreebsd?
Yes.
> > * misc/sys/syslog.h: Move _PATH_LOG to /var/run/log (In some devfs
> > implementations, creating fifos in /dev is not permitted).
>
> This cannot be changed without coordination with all users.
Uhm I see. Then perhaps this file should be moved to sysdeps?
> > * include/features.h: #undef __GLIBC__ before attempting to #define it.
>
> Why?
This is because gcc hardcodes -D__GLIBC__ on gnu/kfreebsd, so including
features.h caused redefinition warnings.
> > * sysdeps/mach/hurd/nfs/nfs.h: Move to ...
> > * sysdeps/generic/nfs/nfs.h: ... here.
>
> This I put in.
Thanks.
> > * posix/sys/types.h: Declare vm_*_t types (of BSD origin).
>
> Why do you want to add these to the glibc API?
FreeBSD defines them in sys/types.h, so if we want code written for FreeBSD to
compile on Glibc, we need them in sys/types.h too. An alternative solution
would be to modify all the code using these types, or use a platform-specific
sysdeps file to declare them, but IMHO this is cleaner. Any suggestion?
--
Robert Millan