getosreldate
— get
the value of __FreeBSD_version
Standard C Library (libc, -lc)
#include
<unistd.h>
int
getosreldate
(void);
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
- If the environment variable
OSVERSION
is set, it
will override the getosreldate
() return
value.
An example can be found in
/usr/share/examples/FreeBSD_version.
The getosreldate
() function may fail and
set errno for any of the errors specified for the
library function
sysctl(3).
The getosreldate
() function appeared in
FreeBSD 2.0.