Re: OFFTOPIC: e2fsprogs and +2Gb partitions

Matti Aarnio (matti.aarnio@sonera.fi)
Tue, 16 Jun 1998 12:44:29 +0300 (EEST)


(I am cutting down the recipient Cc: list; the LIST is supposed to
distribute to all people, right ??)
> From: "David S. Miller" <davem@dm.cobaltmicro.com>
....
> Now here is the set of crutches most people bitch about as a result of
> this, via an example. What do I do when I wish to add a new routing
> flag to provide some new facility in the networking? Or even better,
> what if I add a new protocol stack to the kernel, how do I go about
> getting the interfaces into the userland compiler's header file
> scope? For these cases, do I:
>
> 1) Maintain headers locally in my userland tools.
> Result: Bad, same piece of information maintained in two places.
> or
> 2) Propagate the interfaces into glibc
> Result: Bad, the delay is far too long and most people don't
> ever upgrade glibc let alone "often".

Both are damn bad, especially as I am not working solely on Linux systems,
but on all platforms that I work on, I very likely have to plunge deep
into the system core.

For ages I have maintained a complex MTA software which contains also
IPv6 support as a standard (configurable) feature.

I used to run libc5, and now glibc-2.0. (IPv6 application without glibc-2.1!)
(But the system compiles also on Solaris, DEC UNIX, *BSD, ...)

I do the thing WITHOUT libinet6, or any such external crutches, because
those too assume something which too often is not true. Usually their
associated include files blow up rather spectacularly..
(It means my package must contain bits of libinet6 just in case the
system libc does not supply the thing..)

I have a lenghty autoconfig test sequence to analyze the environment,
and to determine which headers to include. If <netinet/in.h> is all
that I need, no others will be looked for, otherwise:

#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN6_H
# include <netinet/in6.h>
#endif
#ifdef HAVE_NETINET6_IN6_H
# include <netinet6/in6.h>
#endif
#ifdef HAVE_LINUX_IN6_H
# include <linux/in6.h>
#endif
#include <netdb.h>
#ifndef EAI_AGAIN
# include "netdb6.h"
#endif

However, every instance of glibc-2.0 I have upgraded to has required one
post-install fix to its /usr/include/socketbits.h file, which does a define
controlling inclusion of <linux/types.h> without ever including that file:

#ifndef _LINUX_TYPES_H
# define _LINUX_TYPES_H
#endif
#include <asm/socket.h>

I leave it as an excercise for you to find a way to do this so that
it will not break parallel inclusion of things which do require
including <linux/types.h>

(I have heaps of this type of fixes, but I have not been able to
find reliable ways to feed those fixes back to the base sources :-( )

> (.. add cases here I haven't considered ...)
> This is the answer a lot of us are looking for.
>
> Later,
> David S. Miller
> davem@dm.cobaltmicro.com

/Matti Aarnio <matti.aarnio@sonera.fi> <mea@nic.funet.fi>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu