fix sysuname for all targets, somehow this was forgotten

This commit is contained in:
mrdudz
2025-06-26 01:21:28 +02:00
parent 801508aecf
commit 0290b276ae
20 changed files with 106 additions and 77 deletions

View File

@@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/utsname.h>
#if ((__CC65__ >> 8) > 3) || ((__CC65__ & 0x000f) > 0)
/* compiler version is 2.19-git or higher */
@@ -29,6 +30,17 @@
int main(void)
{
#if !defined(__SIM6502__) && !defined(__SIM65C02__) && !defined(__AGAT__)
struct utsname buf;
uname (&buf);
printf("utsname.sysname: %s\n", buf.sysname);
printf("utsname.nodename: %s\n", buf.nodename);
printf("utsname.release: %s\n", buf.release);
printf("utsname.version: %s\n", buf.version);
printf("utsname.machine: %s\n", buf.machine);
#endif
printf("__CC65__ defined as %04x\n", __CC65__);
printf("compiler version is %u.%u\n", VER_MAJOR, VER_MINOR);
if (__CC65__ == VERSION) {