GETOSRELDATE(3) | MidnightBSD Library Functions Manual | GETOSRELDATE(3) |
getosreldate
— get
the value of __MidnightBSD_version
Standard C Library (libc, -lc)
#include
<unistd.h>
int
getosreldate
(void);
The
getosreldate
()
function returns an integer showing the version of the currently running
kernel. Definitions of the values can be found in The
Porter's Handbook:
Upon successful completion, getosreldate
()
returns the value requested; otherwise the value -1 is returned and the
global variable errno is set to indicate the
error.
OSVERSION
OSVERSION
is set, it
will override the getosreldate
() return
value.An example can be found in /usr/share/examples/MidnightBSD_version.
The getosreldate
() function may fail and
set errno for any of the errors specified for the
library function
sysctl(3).
The Porter's Handbook.
The getosreldate
() function appeared in
FreeBSD 2.0.
June 13, 2018 | midnightbsd-3.1 |