Re: Porting ncpfs utils. to libc6

Richard B. Johnson (root@chaos.analogic.com)
Wed, 26 Nov 1997 21:39:43 -0500 (EST)


On 26 Nov 1997, Eloy A. Paris wrote:

> Hi,
>
> I am trying to port the ncpfs utilities that Volcker Lendecke
> maintains to libc6. I am using the latest package he has released
> (2.0.11).
>
> Initially, if you try to compile ncpfs 2.0.11 against libc6 (glibc2)
> without changing anything, you'll get an infinite number of compiler
> errors (symbol and structure redefinitons, etc.).
>
[SNIPPED]

For the most part Linux utilities will not compile with the new glibc.
At the very least, you will need to define:

-D__USE_BSD -D__XOPEN_SOURCE_EXTENDED

...on the gcc command line. Often code has to be rewritten because the
code presumes SysV behavior. For some political reason, glibc defaults
to BSD behavior (most of the time) in spite of the fact that probably
90 percent of the existing software expects SysV behavior.

Anyway, presuming you already know this and want an interesting
challenge, remove all occcurances of:

#include <linux/something.h>
#include <asm/something.h>

Use only standard headers. Then, for the system-specific structure
information, include __only__ the specific file that contains that
information. You may have to use -D__KERNEL__ to make that information
visible.

An additional warning, there __are__ bugs in the new glibc. It will
probably be a year or so before glibc is stable. I have been testing
primative functions. The latest "feature" I have found is that a write
to a closed file-descriptor sometimes succeeds. This is not good.

More people have to test the glibc. The bug-reporting script in the
source tree works for rapid reporting. You will want to use it.

Cheers,
Dick Johnson

Richard B. Johnson
Project Engineer
Analogic Corporation
Penguin : Linux version 2.1.65 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.