Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: linux-nfs-0.4.21 for Alpha glibc
@ 1997-12-27 22:58 Philip Blundell
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Blundell @ 1997-12-27 22:58 UTC (permalink / raw)


>I have completed a set of patches which permits Olaf's knfs utilities to
>compile on an Alpha with glibc-2.0.3+.  Unfortunately, there are some
>operational problems (read: it doesn't seem to do anything bad, but
>exports don't work).
>
>I'll be chipping away at this, but my ignorance of nfs, rpc, etc. is
>monumental, so help and advice is appreciated.
>
>I believe that the changes to compile with glibc were sound, but most of
>it was sheer guesswork - feel free to level constructive criticism.  I'm
>not real pleased about the patches required in the kernel headers, but
>don't see how this could be avoided.  Also, something was just plain
>missing in <rpc/svc.h>?? 

The rule of thumb when writing code for glibc is to avoid including any kernel 
headers - if you need definitions that are only found in the kernel headers 
then you should duplicate them in your own code (hopefully there aren't too 
many).  This is a bit of a pain sometimes, but it's a cleaner solution than 
trying to patch up all the kernel headers to make them safe to include (which 
is often hard without breaking some libc5 application along the way).

p.

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linux-nfs-0.4.21 for Alpha glibc
@ 1998-01-01  0:28 Philip Blundell
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Blundell @ 1998-01-01  0:28 UTC (permalink / raw)


>   Date: 	Sat, 27 Dec 1997 22:58:30 +0000
>   From: Philip Blundell <Philip.Blundell@pobox.com>
>
>   The rule of thumb when writing code for glibc is to avoid including
>   any kernel headers - if you need definitions that are only found in
>   the kernel headers then you should duplicate them in your own code
>
>In the long run I think we will need to clean up the kernel headers,

Indeed.  One of the reasons for separating them now is that it gives Linus a 
free rein to do whatever cleanups he wants in kernel space without breaking 
user-space applications.

Once they _have_ been cleaned up (which isn't going to happen in the short 
term, by which I mean Linux 2.2/glibc 2.1) we can go back to using them from 
userspace.  However, this still won't mean that including <linux/*> headers is 
acceptable for a user program in the general case; that's something that 
should be restricted only to the very few cases where it's actually necessary.

In general user programs should still go via the appropriate libc header, 
which may well just be a wrapper round one or more kernel headers.  If there 
are `public' interfaces that the kernel exports, such as the sg device, we 
can add libc headers for them.

p.

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-01-01  0:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-01-01  0:28 linux-nfs-0.4.21 for Alpha glibc Philip Blundell
  -- strict thread matches above, loose matches on Subject: below --
1997-12-27 22:58 Philip Blundell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox