aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeoff Voelker1999-06-24 22:05:14 +0000
committerGeoff Voelker1999-06-24 22:05:14 +0000
commitc5247da2674c0dfb9fc4d31f1241cc3713bfada3 (patch)
tree204674e3404ca10bf82c4c8468a0ddb5b46d419a /src
parent64b08c88cfec2af278de3b9f6c6641ec3300b52d (diff)
downloademacs-c5247da2674c0dfb9fc4d31f1241cc3713bfada3.tar.gz
emacs-c5247da2674c0dfb9fc4d31f1241cc3713bfada3.zip
(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 *
789get_emacs_configuration (void) 789get_emacs_configuration (void)
790{ 790{
791 char *arch, *oem, *os; 791 char *arch, *oem, *os;
792 int build_num;
792 793
793 /* Determine the processor type. */ 794 /* Determine the processor type. */
794 switch (get_processor_type ()) 795 switch (get_processor_type ())
@@ -830,10 +831,37 @@ get_emacs_configuration (void)
830 /* Let oem be "*" until we figure out how to decode the OEM field. */ 831 /* Let oem be "*" until we figure out how to decode the OEM field. */
831 oem = "*"; 832 oem = "*";
832 833
833 os = (GetVersion () & OS_WIN95) ? "windows95" : "nt"; 834 switch (osinfo_cache.dwPlatformId) {
835 case VER_PLATFORM_WIN32_NT:
836 os = "nt";
837 build_num = osinfo_cache.dwBuildNumber;
838 break;
839 case VER_PLATFORM_WIN32_WINDOWS:
840 if (osinfo_cache.dwMinorVersion == 0) {
841 os = "windows95";
842 } else {
843 os = "windows98";
844 }
845 build_num = LOWORD (osinfo_cache.dwBuildNumber);
846 break;
847 case VER_PLATFORM_WIN32s:
848 /* Not supported, should not happen. */
849 os = "windows32s";
850 build_num = LOWORD (osinfo_cache.dwBuildNumber);
851 break;
852 default:
853 os = "unknown";
854 build_num = 0;
855 break;
856 }
857
858 if (osinfo_cache.dwPlatformId == VER_PLATFORM_WIN32_NT) {
859 sprintf (configuration_buffer, "%s-%s-%s%d.%d.%d", arch, oem, os,
860 get_w32_major_version (), get_w32_minor_version (), build_num);
861 } else {
862 sprintf (configuration_buffer, "%s-%s-%s.%d", arch, oem, os, build_num);
863 }
834 864
835 sprintf (configuration_buffer, "%s-%s-%s%d.%d", arch, oem, os,
836 get_w32_major_version (), get_w32_minor_version ());
837 return configuration_buffer; 865 return configuration_buffer;
838} 866}
839 867