From: hlu@yoda.eecs.wsu.edu (Hongjiu Lu -- Graduate Student)
Newsgroups: comp.os.linux,alt.os.linux
Subject: Re: Second 0.95a alpha-patch
Date: 7 Apr 92 05:56:13 GMT
Organization: Washington State University

In article <1992Apr5.174430.17408@klaava.Helsinki.FI> torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) writes:
>I forgot to mention some of the changes this alpha-patch brings to the
>user: the kernel include-files have been slightly changed in a couple of
>cases, which can result in unexpected behaviour...
>
>a.out.h is now the latest GNU a.out.h, and it seems to have slightly
>different magic-number handling than the original 386-minix version I
>used for older versions.  Without recompiling the kernel with the new
>a.out.h, programs linked with the new binutils will not run (unable to
>execute binary file errors).  This just means that even if you don't use
>the patch in any other capacity, you had better upgrade to the new
>a.out.h, or newer programs won't necessarily run.  Right now there are
>no such binaries available, but when gcc2 gets more used, they will show

Ld in binutils.tar.Z with gcc 2.1 beta will produce such binaries.

>up. 
>
>The other change is that limits.h and sys/dirent.h are now part of the
>kernel include-files: they were needed for the readdir() system call. 
>Normally this wouldn't change anything, but there is also a slight
>change in limits.h - NAME_MAX is now defined to be 255 so that linux
>will eventually handle filesystems with longer names than 14 chars. 
>This means that the old direntry-routines in the library won't compile
>correctly, as they depended on NAME_MAX being the size of a directory
>name.  I hope the gcc-2 library won't have this problem, and that we can

I am changing it to sys call of readdir. But telldir and seekdir are
missing.

>move over to the more general readdir-function without undue growing
>pains. 
>
>The a.out.h change was made just to minimize the differences between the
>linux headers and the library headers - but the second change is pretty
>fundamental.  If you are porting software with the old libraries, I'd
>suggest keeping to the old limits.h in /usr/include - that way nothing
>should break until we get non-minix filesystems.  Adventurous people
>might want to test out the new kernel functions that will be supported
>even with new filesystems. 
>
>In case anyone is wondering why the NAME_MAX change is needed, it's due
>to the fact that the old /library/ readdir only handled a 14-char
>library entry.  When the VFS code is enhanced to allow different
>filesystems, you no longer can depend on this, and the library routine
>wouldn't know what type of directory it's supposed to read - so the code
>has to be moved into the kernel which knows about these things.  The new
>readdir() will work correctly independently of the underlying filesystem
>(so that you can freely mix different filesystems without needing to
>bother about it). 
>
>I'm sorry all this is certain to cause it's share of confusion (using
>the old library with the new NAME_MAX and vice versa), but there wasn't
>any graceful way to handle it all - unless I would have anticipated
>these problems from the start, which I didn't...  You can console
>yourselves with the thought that linux should be able to handle longer
>filenames and >64MB partitions within a couple of releases. 
>
>		Linus

Keep a copy of .a for each program you compile. You can link it against
any libraries (for now no telldir and seekdir).

H.J.
Organization: Sophomore, Physics, Carnegie Mellon, Pittsburgh, PA