From: "H. Peter Anvin" <hpa@zytor.com>
To: andersen@codepoet.org, Mike Frysinger <vapier.adi@gmail.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
viro@zeniv.linux.org.uk, Alexey Dobriyan <adobriyan@gmail.com>,
"Robert P. J. Day" <rpjday@mindspring.com>
Subject: Re: [patch] scrub non-__GLIBC__ checks in linux/socket.h and linux/stat.h
Date: Wed, 24 Jan 2007 22:30:28 -0800 [thread overview]
Message-ID: <45B84E84.1080004@zytor.com> (raw)
In-Reply-To: <20061216185726.GA17496@codepoet.org>
Erik Andersen wrote:
> On Sat Dec 16, 2006 at 01:42:11PM -0500, Mike Frysinger wrote:
>> On 11/30/06, Robert P. J. Day <rpjday@mindspring.com> wrote:
>>> but there are a few other
>>> cases which still contain compound preprocessor directives such as:
>>>
>>> #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
>>>
>>> having never worked with unifdef before, i guess i was being overly
>>> optimistic in thinking that it, if i "unifdef"ed __KERNEL__, it might
>>> at least simplify the expression. oh, well ... live and learn.
>> userspace should be worrying about userspace, so having the socket.h
>> and stat.h pollute the namespace in the non-glibc case is wrong and
>> pretty much prevents any other libc from utilizing these headers
>> sanely unless they set up the __GLIBC__ define themselves (which
>> sucks)
>> -mike
>
> Ack from me. I'd love to see this applied so uClibc could
> stop have to define __GLIBC__
>
klibc uses these definitions, but the right thing to do is to have libc
ask for it:
#if defined(__KERNEL__) || defined(__EXPORT_LINUX_SOCKET_H)
/* ... */
#endif
That way, klibc can just
#define __EXPORT_LINUX_SOCKET_H
#include <linux/socket.h>
-hpa
prev parent reply other threads:[~2007-01-25 6:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-16 18:42 [patch] scrub non-__GLIBC__ checks in linux/socket.h and linux/stat.h Mike Frysinger
2006-12-16 18:57 ` Erik Andersen
2007-01-25 6:30 ` H. Peter Anvin [this message]
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=45B84E84.1080004@zytor.com \
--to=hpa@zytor.com \
--cc=adobriyan@gmail.com \
--cc=andersen@codepoet.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rpjday@mindspring.com \
--cc=vapier.adi@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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: link
Be 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 NNTP newsgroup(s).