lkml.org 
[lkml]   [2003]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: SCO's infringing files list
    From
    Date
    On Tue, 2003-12-23 at 10:25, Linus Torvalds wrote:
    > Bingo!
    >
    > On Tue, 23 Dec 2003, Mitchell Blank Jr wrote:
    > >
    > > This does seem to be the case - from an FAQ that H J Lu posted about that time:
    > >
    > > | From: hlu@yoda.eecs.wsu.edu (H.J. Lu)
    > > | Subject: FAQ about gcc (how to compile program under Linux)
    > > | Date: Sun, 19 Jul 92 06:40:05 GMT
    > > | [...]
    > > | Another file, XXXXinc.tar.Z, where XXXX is the current version number
    > > | of Linux kernel, has all the header files to replace the header files
    > > | from kernel. YOU MUST INSTALL IT. Please read README for details.
    >
    > Ok, this is the source.
    >
    > In particular, I can re-create _exactly_ the linux-0.97 "errno.h" file by
    > using the "sys_errlist[]" contents from "libc-2.2.2". In particular, this
    > trivial loop will generate the exact (byte-for-byte) list that is in the
    > kernel:
    >
    > int i;
    >
    > for (i = 1; i < 122; i++) {
    > const char *name = names[i];
    > int n = strlen(name);
    > char *tabs = "\t\t"+(n > 7);
    > const char *expl = libc222_errlist[i];
    > printf("#define\t%s%s%2d\t/* %s */\n",
    > name, tabs, i, expl);
    > }
    >
    > here, the "names[]" array was filled in with the error names, ie
    >
    > const char *names[] = { "none",
    > "EPERM", "ENOENT", "ESRCH", "EINTR", "EIO", "ENXIO", "E2BIG",
    > ...
    >
    > and the "libc222_errlist[]" array was filled in with the strings found by
    > just downloading the old "libc-2.2.2" binary that can still be found at
    >
    > http://www.ibiblio.org/pub/Linux/libs/oldlibs/libc-2.2.2/
    >
    > and then just doing a "strings - libc-2.2.2" and "sys_errlist[]" will be
    > obvious:
    >
    > static char *libc222_errlist[] = {
    > "Unknown error",
    > "Operation not permitted",
    > ...
    >
    > This was literally a five-minute hack (I wrote the silly loop yesterday to
    > see what it does with the current "strerror()" - there is very good
    > correlation even today, but using the libc-2.2.2 sys_nerrlist[] you get
    > _exactly_ the same result).
    >
    > So this is definitely the source of the kernel error header. It's either a
    > file from the libc sources, or it is literally auto-generated like the
    > above (I actually suspect the latter - now that I did the auto-generation
    > it all felt very familiar, but that may just be my brain rationalizing
    > things. Humans are good at rationalizing reality.).
    >
    > Can anybody find the actual libc _sources_? Not the kernel headers that
    > hjl mentions (those are the old ones from _before_ the change), but the
    > file "libc-2.2.2.tar.Z"?
    >
    > Anyway, we know where the kernel header comes from. Let's figure out where
    > the libc data comes from.
    >
    > Linus

    The earliest tarballs here may be of interest:
    http://www.pell.portland.or.us/~orc/Code/libc/

    [steven@spc9 libc-linux]$ head -n 20 jumptable1/string/_errlist.c
    #include <ansidecl.h>
    #include <stddef.h>
    #include <errno.h>

    /* This is a list of all known signal numbers. */

    CONST char *CONST _sys_errlist[] = {
    "Unknown error", /* 0 */
    "Operation not permitted", /* EPERM */
    "No such file or directory", /* ENOENT */
    "No such process", /* ESRCH */
    "Interrupted system call", /* EINTR */
    "I/O error", /* EIO */
    "No such device or address", /* ENXIO */
    "Arg list too long", /* E2BIG */
    "Exec format error", /* ENOEXEC */
    "Bad file number", /* EBADF */
    "No child processes", /* ECHILD */
    "Try again", /* EAGAIN */
    "Out of memory", /* ENOMEM */

    That file dates from Nov 20 1992.

    Steven

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:59    [W:2.309 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site