Mercurial > hg > xemacs-beta
comparison src/callproc.c @ 288:e11d67e05968 r21-0b42
Import from CVS: tag r21-0b42
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:35:54 +0200 |
parents | 558f606b08ae |
children | 19dcec799385 |
comparison
equal
deleted
inserted
replaced
287:13a0bd77a29d | 288:e11d67e05968 |
---|---|
42 #include "syssignal.h" /* Always include before systty.h */ | 42 #include "syssignal.h" /* Always include before systty.h */ |
43 #include "systty.h" | 43 #include "systty.h" |
44 | 44 |
45 #ifdef WINDOWSNT | 45 #ifdef WINDOWSNT |
46 #define _P_NOWAIT 1 /* from process.h */ | 46 #define _P_NOWAIT 1 /* from process.h */ |
47 #include <windows.h> | |
48 #include "nt.h" | |
47 #endif | 49 #endif |
48 | 50 |
49 #ifdef DOS_NT | 51 #ifdef DOS_NT |
50 /* When we are starting external processes we need to know whether they | 52 /* When we are starting external processes we need to know whether they |
51 take binary input (no conversion) or text input (\n is converted to | 53 take binary input (no conversion) or text input (\n is converted to |
823 if (!NILP (interactivep)) | 825 if (!NILP (interactivep)) |
824 { | 826 { |
825 if (NILP (v)) | 827 if (NILP (v)) |
826 message ("%s not defined in environment", XSTRING_DATA (var)); | 828 message ("%s not defined in environment", XSTRING_DATA (var)); |
827 else | 829 else |
830 /* #### Should use Fprin1_to_string or Fprin1 to handle string | |
831 containing quotes correctly. */ | |
828 message ("\"%s\"", value); | 832 message ("\"%s\"", value); |
829 } | 833 } |
830 RETURN_UNGCPRO (v); | 834 RETURN_UNGCPRO (v); |
831 } | 835 } |
832 | 836 |
867 /* Sync with FSF Emacs 19.34.6 note: this is not in 19.34.6. --marcpa */ | 871 /* Sync with FSF Emacs 19.34.6 note: this is not in 19.34.6. --marcpa */ |
868 /* | 872 /* |
869 ** If NT then we look at COMSPEC for the shell program. | 873 ** If NT then we look at COMSPEC for the shell program. |
870 */ | 874 */ |
871 sh = egetenv ("COMSPEC"); | 875 sh = egetenv ("COMSPEC"); |
872 { | 876 /* |
873 char *tem; | 877 ** If COMSPEC has been set, then convert the |
874 /* | 878 ** DOS formatted name into a UNIX format. Then |
875 ** If COMSPEC has been set, then convert the | 879 ** create a LISP object. |
876 ** DOS formatted name into a UNIX format. Then | 880 */ |
877 ** create a LISP object. | 881 if (sh) |
878 */ | 882 Vshell_file_name = build_string (sh); |
879 if (sh) | 883 /* |
880 { | 884 ** Odd, no COMSPEC, so let's default to our |
881 #if 0 /* This breaks everything -kkm */ | 885 ** best guess for NT. |
882 tem = (char *) alloca (strlen (sh) + 1); | 886 */ |
883 dostounix_filename (strcpy (tem, sh)); | 887 else |
884 Vshell_file_name = build_string (tem); | 888 Vshell_file_name = build_string ("\\WINNT\\system32\\cmd.exe"); |
885 #else | 889 |
886 Vshell_file_name = build_string (sh); | |
887 #endif | |
888 } | |
889 /* | |
890 ** Odd, no COMSPEC, so let's default to our | |
891 ** best guess for NT. | |
892 */ | |
893 else | |
894 { | |
895 Vshell_file_name = build_string ("\\WINNT\\system32\\cmd.exe"); | |
896 } | |
897 } | |
898 #else /* not WINDOWSNT */ | 890 #else /* not WINDOWSNT */ |
891 | |
899 sh = (char *) egetenv ("SHELL"); | 892 sh = (char *) egetenv ("SHELL"); |
900 Vshell_file_name = build_string (sh ? sh : "/bin/sh"); | 893 Vshell_file_name = build_string (sh ? sh : "/bin/sh"); |
894 | |
901 #endif | 895 #endif |
902 } | 896 } |
903 | 897 |
904 #if 0 | 898 #if 0 |
905 void | 899 void |