From 8ff42a540e10c99532a82ba4b6b93f203cdf8da8 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 31 Oct 2004 16:31:41 +0000 Subject: [PATCH] Document g_win32_get_windows_version(). 2004-10-31 Tor Lillqvist * glib/gwin32.c: Document g_win32_get_windows_version(). --- ChangeLog | 2 ++ ChangeLog.pre-2-10 | 2 ++ ChangeLog.pre-2-12 | 2 ++ ChangeLog.pre-2-6 | 2 ++ ChangeLog.pre-2-8 | 2 ++ glib/gwin32.c | 31 +++++++++++++++++++++++++------ 6 files changed, 35 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67c9e1a7..c49f2a8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-10-31 Tor Lillqvist + * glib/gwin32.c: Document g_win32_get_windows_version(). + * glib/gstdio.[ch]: Add g_lstat(). 2004-10-29 Matthias Clasen diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 67c9e1a7..c49f2a8f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,7 @@ 2004-10-31 Tor Lillqvist + * glib/gwin32.c: Document g_win32_get_windows_version(). + * glib/gstdio.[ch]: Add g_lstat(). 2004-10-29 Matthias Clasen diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 67c9e1a7..c49f2a8f 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,5 +1,7 @@ 2004-10-31 Tor Lillqvist + * glib/gwin32.c: Document g_win32_get_windows_version(). + * glib/gstdio.[ch]: Add g_lstat(). 2004-10-29 Matthias Clasen diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 67c9e1a7..c49f2a8f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,7 @@ 2004-10-31 Tor Lillqvist + * glib/gwin32.c: Document g_win32_get_windows_version(). + * glib/gstdio.[ch]: Add g_lstat(). 2004-10-29 Matthias Clasen diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 67c9e1a7..c49f2a8f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,7 @@ 2004-10-31 Tor Lillqvist + * glib/gwin32.c: Document g_win32_get_windows_version(). + * glib/gstdio.[ch]: Add g_lstat(). 2004-10-29 Matthias Clasen diff --git a/glib/gwin32.c b/glib/gwin32.c index 17fcf6ce..4e06dfc0 100644 --- a/glib/gwin32.c +++ b/glib/gwin32.c @@ -71,12 +71,13 @@ g_win32_ftruncate (gint fd, /** * g_win32_getlocale: * - * The setlocale in the Microsoft C library uses locale names of the - * form "English_United States.1252" etc. We want the UNIXish standard - * form "en_US", "zh_TW" etc. This function gets the current thread - * locale from Windows - without any encoding info - and returns it as - * a string of the above form for use in forming file names etc. The - * returned string should be deallocated with g_free(). + * The setlocale() function in the Microsoft C library uses locale + * names of the form "English_United States.1252" etc. We want the + * UNIXish standard form "en_US", "zh_TW" etc. This function gets the + * current thread locale from Windows - without any encoding info - + * and returns it as a string of the above form for use in forming + * file names etc. The returned string should be deallocated with + * g_free(). * * Returns: newly-allocated locale name. **/ @@ -1301,6 +1302,24 @@ _g_win32_thread_init (void) g_win32_windows_version_init (); } +/** + * g_win32_get_windows_version: + * + * Returns version information for the Windows operating system the + * code is running on. See MSDN documentation for the GetVersion() + * function. To summarize, the most significant bit is one on Win9x, + * and zero on NT-based systems. The least significant byte is 4 on + * Windows NT 4, 5 on Windows XP. Software that needs really detailled + * version and feature information should use Win32 API like + * GetVersionEx() and VerifyVersionInfo(). + * + * If there is an environment variable G_WIN32_PRETEND_WIN9X defined + * (with any value), this function always returns a version code for + * Windows 9x. This is mainly an internal debugging aid for GTK and + * GLib developers, to be able to check the code paths for Win9x. + * + * Returns: The version information. + **/ guint g_win32_get_windows_version (void) { -- 2.34.1