comparison src/nt.c @ 298:70ad99077275 r21-0b47

Import from CVS: tag r21-0b47
author cvs
date Mon, 13 Aug 2007 10:39:40 +0200
parents c9fe270a4101
children c6de09ad3017
comparison
equal deleted inserted replaced
297:deca3c1083ac 298:70ad99077275
583 DWORD dwType; 583 DWORD dwType;
584 584
585 static char * env_vars[] = 585 static char * env_vars[] =
586 { 586 {
587 "HOME", 587 "HOME",
588 "PRELOAD_WINSOCK",
589 "emacs_dir", 588 "emacs_dir",
590 "EMACSLOADPATH", 589 "EMACSLOADPATH",
590 "EMACSDEBUGPATHS",
591 "SHELL", 591 "SHELL",
592 "CMDPROXY", 592 "CMDPROXY",
593 "EMACSDATA", 593 "EMACSDATA",
594 "EMACSPATH", 594 "EMACSPATH",
595 "EMACSPACKAGEPATH",
595 "EMACSLOCKDIR", 596 "EMACSLOCKDIR",
596 /* We no longer set INFOPATH because Info-default-directory-list 597 "INFOPATH"
597 is then ignored. We use a hook in winnt.el instead. */
598 /* "INFOPATH", */
599 "EMACSDOC",
600 "TERM",
601 }; 598 };
602 599
603 for (i = 0; i < countof (env_vars); i++) 600 for (i = 0; i < countof (env_vars); i++)
604 { 601 {
605 if (!getenv (env_vars[i]) && 602 if (!getenv (env_vars[i]) &&
664 661
665 SetCurrentDirectory (modname); 662 SetCurrentDirectory (modname);
666 } 663 }
667 664
668 init_user_info (); 665 init_user_info ();
669 }
670
671 /* We don't have scripts to automatically determine the system configuration
672 for Emacs before it's compiled, and we don't want to have to make the
673 user enter it, so we define EMACS_CONFIGURATION to invoke this runtime
674 routine. */
675
676 static char configuration_buffer[32];
677
678 const char *
679 get_emacs_configuration (void)
680 {
681 char *arch, *oem, *os;
682
683 /* Determine the processor type. */
684 switch (get_processor_type ())
685 {
686
687 #ifdef PROCESSOR_INTEL_386
688 case PROCESSOR_INTEL_386:
689 case PROCESSOR_INTEL_486:
690 case PROCESSOR_INTEL_PENTIUM:
691 arch = "i386";
692 break;
693 #endif
694
695 #ifdef PROCESSOR_INTEL_860
696 case PROCESSOR_INTEL_860:
697 arch = "i860";
698 break;
699 #endif
700
701 #ifdef PROCESSOR_MIPS_R2000
702 case PROCESSOR_MIPS_R2000:
703 case PROCESSOR_MIPS_R3000:
704 case PROCESSOR_MIPS_R4000:
705 arch = "mips";
706 break;
707 #endif
708
709 #ifdef PROCESSOR_ALPHA_21064
710 case PROCESSOR_ALPHA_21064:
711 arch = "alpha";
712 break;
713 #endif
714
715 default:
716 arch = "unknown";
717 break;
718 }
719
720 /* Let oem be "*" until we figure out how to decode the OEM field. */
721 oem = "*";
722
723 os = (GetVersion () & 0x80000000) ? "win95" : "nt";
724
725 sprintf (configuration_buffer, "%s-%s-%s%d.%d", arch, oem, os,
726 get_nt_major_version (), get_nt_minor_version ());
727 return configuration_buffer;
728 } 666 }
729 667
730 #ifndef HAVE_X_WINDOWS 668 #ifndef HAVE_X_WINDOWS
731 /* X11R6 on NT provides the single parameter version of this command. */ 669 /* X11R6 on NT provides the single parameter version of this command. */
732 670