summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeoff Voelker <voelker@cs.washington.edu>1999-06-24 22:05:14 +0000
committerGeoff Voelker <voelker@cs.washington.edu>1999-06-24 22:05:14 +0000
commitc5247da2674c0dfb9fc4d31f1241cc3713bfada3 (patch)
tree204674e3404ca10bf82c4c8468a0ddb5b46d419a /src
parent64b08c88cfec2af278de3b9f6c6641ec3300b52d (diff)
downloademacs-c5247da2674c0dfb9fc4d31f1241cc3713bfada3.tar.gz
(get_emacs_configuration): Use GetVersionEx to
handle NT5.0 correctly. Include build number in configuration. w32heap.c (osinfo_cache): New variable.
Diffstat (limited to 'src')
-rw-r--r--src/w32.c34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/w32.c b/src/w32.c
index 1e855e5c998..bac1425802c 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -789,6 +789,7 @@ char *
get_emacs_configuration (void)
{
char *arch, *oem, *os;
+ int build_num;
/* Determine the processor type. */
switch (get_processor_type ())
@@ -830,10 +831,37 @@ get_emacs_configuration (void)
/* Let oem be "*" until we figure out how to decode the OEM field. */
oem = "*";
- os = (GetVersion () & OS_WIN95) ? "windows95" : "nt";
+ switch (osinfo_cache.dwPlatformId) {
+ case VER_PLATFORM_WIN32_NT:
+ os = "nt";
+ build_num = osinfo_cache.dwBuildNumber;
+ break;
+ case VER_PLATFORM_WIN32_WINDOWS:
+ if (osinfo_cache.dwMinorVersion == 0) {
+ os = "windows95";
+ } else {
+ os = "windows98";
+ }
+ build_num = LOWORD (osinfo_cache.dwBuildNumber);
+ break;
+ case VER_PLATFORM_WIN32s:
+ /* Not supported, should not happen. */
+ os = "windows32s";
+ build_num = LOWORD (osinfo_cache.dwBuildNumber);
+ break;
+ default:
+ os = "unknown";
+ build_num = 0;
+ break;
+ }
+
+ if (osinfo_cache.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ sprintf (configuration_buffer, "%s-%s-%s%d.%d.%d", arch, oem, os,
+ get_w32_major_version (), get_w32_minor_version (), build_num);
+ } else {
+ sprintf (configuration_buffer, "%s-%s-%s.%d", arch, oem, os, build_num);
+ }
- sprintf (configuration_buffer, "%s-%s-%s%d.%d", arch, oem, os,
- get_w32_major_version (), get_w32_minor_version ());
return configuration_buffer;
}