1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-13 15:18:14 +00:00

Update UNIX-GETPARM to return values for OSNAME and ARCH (#495)

Calls to UNIX-GETPARM with argument "OSNAME" or "ARCH" now return
values derived from the compile-time settings in inc/maiko/platform.h

The current return values are
OSNAME:
    "macOS"
    "Cygwin"
    "DragonFly BSD"
    "FreeBSD"
    "Linux"
    "NetBSD"
    "OpenBSD"
    "AmigaOS 3"
    "Solaris"
    "Windows"
    "Emscripten"
ARCH:
    "WebAssembly"
    "x86_64"
    "arm"
    "arm64"
    "x86"
    "PowerPC"
    "RISC-V"
    "SPARC"
    "Motorola68K"
This commit is contained in:
Nick Briggs 2024-03-25 15:26:31 -07:00 committed by GitHub
parent 40f6488ee4
commit 95f4ac8167
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -204,18 +204,10 @@ LispPTR unix_getparm(LispPTR *args) {
#else
envvalue = "mc68020";
#endif
} else if (strcmp(envname, "OSNAME") == 0) {
envvalue = MAIKO_OS_NAME;
} else if (strcmp(envname, "ARCH") == 0) {
#if defined(sparc)
envvalue = "sun4";
#elif defined(DOS)
envvalue = "dos";
#elif defined(MAIKO_OS_MACOS)
envvalue = "i386";
#else
envvalue = "sun3";
#endif
envvalue = MAIKO_ARCH_NAME;
} else if (strcmp(envname, "DISPLAY") == 0) {
#if defined(XWINDOW)
envvalue = "X";