cc:  [email protected]
Subject: Re: [uwin-users] Changing uname?
--------

> Hello,
> 
> I am trying to port a legacy app from using MKS on Windows to UWin. My
> biggest stumbling block (so far) is that there's hard-coded code in the app
> that looks at the output of uname and expects it to be MKS's ("Windows_NT").
>  Now, I tried switching the output of UWin's uname, but to no avail: putting
> a custom uname ahead in the PATH didn't work. Removing /usr/bin/uname didn't
> work.  Deleting the uname builtin still didn't work.  Confusingly, I am
> getting this (/usr/bin/uname is really a .bat file):
> $ whence uname
> /usr/bin/uname
> $ /usr/bin/uname
> Windows_NT
> $ uname
> UWIN-W7
> 
> I also get the same thing if I delete the uname builtin's.  What gives?
> 
> I am using the latest UWin release (10/6) on Win7 x64.
> 

/usr/bin contans a file name .paths which contains the line BUILTIN_LIB=cmd.
When a command is found in /usr/bin, it search for the builtin in the cmd
library and if it finds it, it makes this a built-in.

Deleting the built-in won't help because the next PATH search will make
it a built-in again. 

However, putting uname in a directory that is comes before /usr/bin
in the path should work.  I tried it here and it worked.
I did the following:
        mkdir /tmp/bin
        cp /bin/date /tmp/bin/uname.exe
        PATH=/tmp/bin:$PATH
        uname
and the output was
Thu Jul  1 12:36:36 EST 2010

/usr/bin/uname is not a bat file.  It is a standalone version of the
one in the cmd library.

David Korn
[email protected]
_______________________________________________
uwin-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/uwin-users

Reply via email to