Mercurial > emacs
comparison src/w32.c @ 24885:5f1b1f5fd7c8
(get_emacs_configuration): Use GetVersionEx to
handle NT5.0 correctly. Include build number in configuration.
w32heap.c (osinfo_cache): New variable.
author | Geoff Voelker <voelker@cs.washington.edu> |
---|---|
date | Thu, 24 Jun 1999 22:05:14 +0000 |
parents | 031247d14ba1 |
children | 953155ee541a |
comparison
equal
deleted
inserted
replaced
24884:1e6ee49f9474 | 24885:5f1b1f5fd7c8 |
---|---|
787 | 787 |
788 char * | 788 char * |
789 get_emacs_configuration (void) | 789 get_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 ()) |
795 { | 796 { |
796 | 797 |
828 } | 829 } |
829 | 830 |
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) { |
834 | 835 case VER_PLATFORM_WIN32_NT: |
835 sprintf (configuration_buffer, "%s-%s-%s%d.%d", arch, oem, os, | 836 os = "nt"; |
836 get_w32_major_version (), get_w32_minor_version ()); | 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 } | |
864 | |
837 return configuration_buffer; | 865 return configuration_buffer; |
838 } | 866 } |
839 | 867 |
840 #include <sys/timeb.h> | 868 #include <sys/timeb.h> |
841 | 869 |