Skip to content

Fix #120: software-version in C

Raymond Toy requested to merge issue-120-software-type-in-c into master

Move software-version to C instead of calling unix:unix-uname in lisp.

This requires several changes.

  • Define software-version in "misc.lisp" and remove the definition from other "foo-os.lisp" files. We follow the style of "sunos-os.lisp" by defining some special vars to hold the values which are set on first call to the functions. Then we use the cached values afterwards so we don't need to call to C anymore.
  • For each "foo-os.lisp" file, we need to update os-init to set *software-version* to NIL because the actual version may change between invocations of software-version because the OS was updated.
  • Add the foreign functions to "os-common.c"

Also, the value for software-version is "uname -r" for all OSes. This is a incompatible change for Linux and Solaris which basically concatenate "uname -r" (release) and "uname -v" (version) together.

Edited by Raymond Toy

Merge request reports