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 ...@@ -7437,6 +7437,7 @@ done
for ac_header in \ for ac_header in \
AudioUnit/AudioUnit.h \ AudioUnit/AudioUnit.h \
Carbon/Carbon.h \ Carbon/Carbon.h \
...@@ -7543,6 +7544,7 @@ for ac_header in \ ...@@ -7543,6 +7544,7 @@ for ac_header in \
sys/times.h \ sys/times.h \
sys/uio.h \ sys/uio.h \
sys/un.h \ sys/un.h \
sys/utsname.h \
sys/vm86.h \ sys/vm86.h \
sys/wait.h \ sys/wait.h \
syscall.h \ syscall.h \
......
...@@ -344,6 +344,7 @@ AC_CHECK_HEADERS(\ ...@@ -344,6 +344,7 @@ AC_CHECK_HEADERS(\
sys/times.h \ sys/times.h \
sys/uio.h \ sys/uio.h \
sys/un.h \ sys/un.h \
sys/utsname.h \
sys/vm86.h \ sys/vm86.h \
sys/wait.h \ sys/wait.h \
syscall.h \ syscall.h \
......
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
#include <time.h> #include <time.h>
#include <math.h> #include <math.h>
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
#include "wine/library.h" #include "wine/library.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -156,6 +159,28 @@ const char * CDECL NTDLL_wine_get_build_id(void) ...@@ -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.@) * abs (NTDLL.@)
*/ */
int CDECL NTDLL_abs( int i ) int CDECL NTDLL_abs( int i )
......
...@@ -1384,6 +1384,7 @@ ...@@ -1384,6 +1384,7 @@
# Version # Version
@ cdecl wine_get_version() NTDLL_wine_get_version @ cdecl wine_get_version() NTDLL_wine_get_version
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id @ cdecl wine_get_build_id() NTDLL_wine_get_build_id
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
# Codepages # Codepages
@ cdecl __wine_init_codepages(ptr ptr ptr) @ cdecl __wine_init_codepages(ptr ptr ptr)
......
...@@ -897,6 +897,9 @@ ...@@ -897,6 +897,9 @@
/* Define to 1 if you have the <sys/user.h> header file. */ /* Define to 1 if you have the <sys/user.h> header file. */
#undef HAVE_SYS_USER_H #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. */ /* Define to 1 if you have the <sys/vfs.h> header file. */
#undef HAVE_SYS_VFS_H #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