Port-sparc64 archive

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

Re: Problems with top



>>> christos%zoulas.com@localhost (Christos Zoulas) wrote

> That's probably the problem. It does not make sense for uname -m to say 
> sparc64
> when you are running 32 bit binaries.

I don't think so.  The problem is comparing build time MACHINE with
uname -m in top(1) as below.

I think we should compare MACHINE_ARCH with uname -p, since we
cannot share binaries with ports which have a same processor
(e.g. mips, arm, m68k).


[src/external/bsd/top/bin/config.h.in]
   253  /* Define the system hardware platform */
   254  #define UNAME_HARDWARE "@MACHINE@"

[src/external/bsd/top/dist/top.c]
   741      /* binary compatibility check */
   742  #ifdef HAVE_UNAME
   743      {
   744          struct utsname uts;
   745
   746          if (uname(&uts) == 0)
   747          {
   748              if (strcmp(uts.machine, UNAME_HARDWARE) != 0)
   749              {
   750                  fprintf(stderr, "%s: incompatible hardware platform\n",
   751                          myname);
   752                  exit(EX_UNAVAILABLE);
   753              }
   754          }
   755      }
   756  #endif

-- Takeshi Nakayama


Home | Main Index | Thread Index | Old Index