mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 02:20:04 +01:00
New function. Returns the Windows version code like GetVersion(), except
2004-08-25 Tor Lillqvist <tml@iki.fi> * glib/gwin32.c (g_win32_get_windows_version): New function. Returns the Windows version code like GetVersion(), except that one can pretend to be running on Win9x by setting the G_WIN32_PRETEND_WIN9X environment variable. This is mainly for debugging purposed. * glib/gwin32.h: Declare it. Define macros G_WIN32_WINDOWS_IS_NT_BASED and G_WIN32_HAVE_WIDECHAR_API to test Windows features at run-time.
This commit is contained in:
parent
0d0f7c9c98
commit
1de0e063fe
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2004-08-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gwin32.c (g_win32_get_windows_version): New
|
||||||
|
function. Returns the Windows version code like GetVersion(),
|
||||||
|
except that one can pretend to be running on Win9x by setting the
|
||||||
|
G_WIN32_PRETEND_WIN9X environment variable. This is mainly for
|
||||||
|
debugging purposed.
|
||||||
|
|
||||||
|
* glib/gwin32.h: Declare it. Define macros G_WIN32_WINDOWS_IS_NT_BASED
|
||||||
|
and G_WIN32_HAVE_WIDECHAR_API to test Windows features at run-time.
|
||||||
|
|
||||||
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Post-release version bump.
|
* configure.in: Post-release version bump.
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2004-08-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gwin32.c (g_win32_get_windows_version): New
|
||||||
|
function. Returns the Windows version code like GetVersion(),
|
||||||
|
except that one can pretend to be running on Win9x by setting the
|
||||||
|
G_WIN32_PRETEND_WIN9X environment variable. This is mainly for
|
||||||
|
debugging purposed.
|
||||||
|
|
||||||
|
* glib/gwin32.h: Declare it. Define macros G_WIN32_WINDOWS_IS_NT_BASED
|
||||||
|
and G_WIN32_HAVE_WIDECHAR_API to test Windows features at run-time.
|
||||||
|
|
||||||
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Post-release version bump.
|
* configure.in: Post-release version bump.
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2004-08-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gwin32.c (g_win32_get_windows_version): New
|
||||||
|
function. Returns the Windows version code like GetVersion(),
|
||||||
|
except that one can pretend to be running on Win9x by setting the
|
||||||
|
G_WIN32_PRETEND_WIN9X environment variable. This is mainly for
|
||||||
|
debugging purposed.
|
||||||
|
|
||||||
|
* glib/gwin32.h: Declare it. Define macros G_WIN32_WINDOWS_IS_NT_BASED
|
||||||
|
and G_WIN32_HAVE_WIDECHAR_API to test Windows features at run-time.
|
||||||
|
|
||||||
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Post-release version bump.
|
* configure.in: Post-release version bump.
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2004-08-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gwin32.c (g_win32_get_windows_version): New
|
||||||
|
function. Returns the Windows version code like GetVersion(),
|
||||||
|
except that one can pretend to be running on Win9x by setting the
|
||||||
|
G_WIN32_PRETEND_WIN9X environment variable. This is mainly for
|
||||||
|
debugging purposed.
|
||||||
|
|
||||||
|
* glib/gwin32.h: Declare it. Define macros G_WIN32_WINDOWS_IS_NT_BASED
|
||||||
|
and G_WIN32_HAVE_WIDECHAR_API to test Windows features at run-time.
|
||||||
|
|
||||||
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Post-release version bump.
|
* configure.in: Post-release version bump.
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2004-08-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gwin32.c (g_win32_get_windows_version): New
|
||||||
|
function. Returns the Windows version code like GetVersion(),
|
||||||
|
except that one can pretend to be running on Win9x by setting the
|
||||||
|
G_WIN32_PRETEND_WIN9X environment variable. This is mainly for
|
||||||
|
debugging purposed.
|
||||||
|
|
||||||
|
* glib/gwin32.h: Declare it. Define macros G_WIN32_WINDOWS_IS_NT_BASED
|
||||||
|
and G_WIN32_HAVE_WIDECHAR_API to test Windows features at run-time.
|
||||||
|
|
||||||
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Post-release version bump.
|
* configure.in: Post-release version bump.
|
||||||
|
@ -1297,3 +1297,20 @@ g_win32_get_package_installation_subdirectory (gchar *package,
|
|||||||
|
|
||||||
return dirname;
|
return dirname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guint
|
||||||
|
g_win32_get_windows_version (void)
|
||||||
|
{
|
||||||
|
static gboolean beenhere = FALSE;
|
||||||
|
static guint version;
|
||||||
|
|
||||||
|
if (!beenhere)
|
||||||
|
{
|
||||||
|
if (getenv ("G_WIN32_PRETEND_WIN9X"))
|
||||||
|
version = 0x80000004;
|
||||||
|
else
|
||||||
|
version = GetVersion ();
|
||||||
|
beenhere = TRUE;
|
||||||
|
}
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
@ -93,6 +93,11 @@ gchar* g_win32_get_package_installation_subdirectory (gchar *package,
|
|||||||
gchar *dll_name,
|
gchar *dll_name,
|
||||||
gchar *subdir);
|
gchar *subdir);
|
||||||
|
|
||||||
|
guint g_win32_get_windows_version (void);
|
||||||
|
|
||||||
|
#define G_WIN32_IS_NT_BASED() (g_win32_get_windows_version () < 0x80000000)
|
||||||
|
#define G_WIN32_HAVE_WIDECHAR_API() (G_WIN32_IS_NT_BASED ())
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* G_PLATFORM_WIN32 */
|
#endif /* G_PLATFORM_WIN32 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user