[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] some MINTLIB patches here...

On Wed, Mar 10, 1999 at 10:59:16AM +0200, Martin-Eric Racine wrote:
> Hi Guido!
> Reference:  http://www.pathname.com/fhs/
> Beleive me, FHS is a very reasonable standard. It will be a good thing
> for MiNT to upgrade to this. ;-)

I'll have a look.

> > > >   The processor field in utsname.h is not supported at all AFAIK
> > > 
> > > It is. That's why ports on GNU uname command report "unknown" on
> > > MiNT, because _we_ haven't supported it...
> > 
> > No.  GNU uname will report "unknown" if sys/systeminfo.h or
> > sysinfo (SI_ARCHITECTURE, ...) is not present, look at the
> > sources.
> Yes, but the structure of uname is in utsname.h and the last field
> (processor) was still undefined.

Martin, look at the sources!  I mean look at "uname.c" of the sh-utils
1.16.  You will find a couple of lines:

# include <sys/systeminfo.h>


#if defined (HAVE_SYSINFO) && defined (SI_ARCHITECTURE)
  if (sysinfo (SI_ARCHITECTURE, processor, sizeof (processor)) == -1)
    error (1, errno, _("cannot get processor type"));
  strcpy (processor, "unknown");

So where is your "processor" field of structure utsname??

> > A "processor" field neither exists in Linux, nor in HP-SUX nor Solaris.
> It does (uname -p), but the way Linux replies to Uname options is twisted.

It does not! Is "uname -p" a C structure?  The "-p" is an option to
the uname /program/.  And the uname program will call the function
sysinfo() if this is available, otherwise it will print "unknown".
The uname program doesn't even touch a struct utsname when getting
the processor type.

If you still don't believe me, look at /usr/include/utsname.h of 
your Linux box and you won't find a "processor" field there.

With the new MiNTLib "uname -p" will work, on Linux it doesn't because
Linux doesn't implement the sysinfo function. What do you want more?



Carney's Law: There's at least a 50-50 chance that someone will print
the name Craney incorrectly.
		-- Jim Canrey