[Dev-luatex] os.uname on 64 bit Windows

luigi scarso luigi.scarso at gmail.com
Sun Sep 5 10:43:10 CEST 2021


On Sun, Sep 5, 2021 at 2:22 AM Reinhard Kotucha <reinhard.kotucha at web.de>
wrote:

> Hi,
> on a 64 bit Windows machine os.uname() erroneously returns
>
>   machine       i686
>
> On the same machine I get under Linux
>
>   machine       x86_64
>
> with both, x86_64-linux and i386-linux binaries.  Thus I assume that
> the keyword 'machine' refers to the hardware, not to how the binaries
> were compiled (32 vs. 64 bit).
>
> The complete output of
>
>   for k,v in pairs(os.uname()) do
>     print(k,v)
>   end
>
> is
>
>   release       build 9200
>   nodename      R804
>   version       6.02
>   machine       i686
>   sysname       Windows 8
>
>

#ifdef _WIN32
#  define _UTSNAME_LENGTH 65

/* Structure describing the system and machine.  */
struct utsname {
    char sysname[_UTSNAME_LENGTH];
    char nodename[_UTSNAME_LENGTH];
    char release[_UTSNAME_LENGTH];
    char version[_UTSNAME_LENGTH];
    char machine[_UTSNAME_LENGTH];
};

/*
 * Get name and information about current kernel.
 */
static int uname(struct utsname *uts)
:

case WinNT:
            sprintf(uts->machine, "i%d86", sysinfo.wProcessorLevel);
            break;

I guess that wProcessorLevel gives 6 in your case.

-- 
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/dev-luatex/attachments/20210905/c8782672/attachment.htm>


More information about the dev-luatex mailing list