ntdll: Add a function to export the host OS type and version.
This commit is contained in:
parent
baaaa58b50
commit
66eb4bd375
|
@ -7435,6 +7435,7 @@ done
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for ac_header in \
|
||||
|
@ -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"
|
||||
|
@ -155,6 +158,28 @@ const char * CDECL NTDLL_wine_get_build_id(void)
|
|||
return wine_get_build_id();
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* 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.@)
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue