Commit 66eb4bd3 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Add a function to export the host OS type and version.

parent baaaa58b
......@@ -7437,6 +7437,7 @@ done
for ac_header in \
AudioUnit/AudioUnit.h \
Carbon/Carbon.h \
......@@ -7543,6 +7544,7 @@ for ac_header in \
sys/times.h \
sys/uio.h \
sys/un.h \
sys/utsname.h \
sys/vm86.h \
sys/wait.h \
syscall.h \
......
......@@ -344,6 +344,7 @@ AC_CHECK_HEADERS(\
sys/times.h \
sys/uio.h \
sys/un.h \
sys/utsname.h \
sys/vm86.h \
sys/wait.h \
syscall.h \
......
......@@ -22,6 +22,9 @@
#include <time.h>
#include <math.h>
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
#include "wine/library.h"
#include "wine/debug.h"
......@@ -156,6 +159,28 @@ const char * CDECL NTDLL_wine_get_build_id(void)
}
/*********************************************************************
* wine_get_host_version (NTDLL.@)
*/
void CDECL NTDLL_wine_get_host_version( const char **sysname, const char **release )
{
#ifdef HAVE_SYS_UTSNAME_H
static struct utsname buf;
static int init_done;
if (!init_done)
{
uname( &buf );
init_done = 1;
}
if (sysname) *sysname = buf.sysname;
if (release) *release = buf.release;
#else
if (sysname) *sysname = "";
if (release) *release = "";
#endif
}
/*********************************************************************
* abs (NTDLL.@)
*/
int CDECL NTDLL_abs( int i )
......
......@@ -1384,6 +1384,7 @@
# Version
@ cdecl wine_get_version() NTDLL_wine_get_version
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
# Codepages
@ cdecl __wine_init_codepages(ptr ptr ptr)
......
......@@ -897,6 +897,9 @@
/* Define to 1 if you have the <sys/user.h> header file. */
#undef HAVE_SYS_USER_H
/* Define to 1 if you have the <sys/utsname.h> header file. */
#undef HAVE_SYS_UTSNAME_H
/* Define to 1 if you have the <sys/vfs.h> header file. */
#undef HAVE_SYS_VFS_H
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment