From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261885AbTLWR0B (ORCPT ); Tue, 23 Dec 2003 12:26:01 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261774AbTLWR0B (ORCPT ); Tue, 23 Dec 2003 12:26:01 -0500 Received: from fw.osdl.org ([65.172.181.6]:64490 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261967AbTLWRZ6 (ORCPT ); Tue, 23 Dec 2003 12:25:58 -0500 Date: Tue, 23 Dec 2003 09:25:53 -0800 (PST) From: Linus Torvalds To: Mitchell Blank Jr cc: "Giacomo A. Catenazzi" , "linux-kernel@vger.kernel.org" , "Eric S. Raymond" Subject: Re: SCO's infringing files list In-Reply-To: <20031223163926.GC45620@gaz.sfgoth.com> Message-ID: References: <1072125736.1286.170.camel@duergar> <200312221519.04677.tcfelker@mtco.com> <20031223002641.GD28269@pegasys.ws> <20031223092847.GA3169@deneb.enyo.de> <3FE811E3.6010708@debian.org> <3FE862E7.1@pixelized.ch> <20031223160425.GB45620@gaz.sfgoth.com> <20031223163926.GC45620@gaz.sfgoth.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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