Mercurial > hg > xemacs-beta
comparison src/ntproc.c @ 440:8de8e3f6228a r21-2-28
Import from CVS: tag r21-2-28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:33:38 +0200 |
parents | 3a7e78e1142d |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
439:357dd071b03c | 440:8de8e3f6228a |
---|---|
30 #include <io.h> | 30 #include <io.h> |
31 #include <fcntl.h> | 31 #include <fcntl.h> |
32 #include <signal.h> | 32 #include <signal.h> |
33 | 33 |
34 /* must include CRT headers *before* config.h */ | 34 /* must include CRT headers *before* config.h */ |
35 /* ### I don't believe it - martin */ | 35 /* #### I don't believe it - martin */ |
36 #include <config.h> | 36 #include <config.h> |
37 #undef signal | 37 #undef signal |
38 #undef wait | 38 #undef wait |
39 #undef spawnve | 39 #undef spawnve |
40 #undef select | 40 #undef select |
117 int child_proc_count = 0; | 117 int child_proc_count = 0; |
118 child_process child_procs[ MAX_CHILDREN ]; | 118 child_process child_procs[ MAX_CHILDREN ]; |
119 child_process *dead_child = NULL; | 119 child_process *dead_child = NULL; |
120 | 120 |
121 DWORD WINAPI reader_thread (void *arg); | 121 DWORD WINAPI reader_thread (void *arg); |
122 | |
123 /* Determine if running on Windows 9x and not NT */ | |
124 static int | |
125 windows9x_p (void) | |
126 { | |
127 return GetVersion () & 0x80000000; | |
128 } | |
122 | 129 |
123 /* Find an unused process slot. */ | 130 /* Find an unused process slot. */ |
124 child_process * | 131 child_process * |
125 new_child (void) | 132 new_child (void) |
126 { | 133 { |
666 { | 673 { |
667 UNGCPRO; | 674 UNGCPRO; |
668 errno = EINVAL; | 675 errno = EINVAL; |
669 return -1; | 676 return -1; |
670 } | 677 } |
671 GET_C_STRING_FILENAME_DATA_ALLOCA (full, cmdname); | 678 TO_EXTERNAL_FORMAT (LISP_STRING, full, |
679 C_STRING_ALLOCA, cmdname, | |
680 Qfile_name); | |
672 } | 681 } |
673 else | 682 else |
674 { | 683 { |
675 (char*)cmdname = alloca (strlen (argv[0]) + 1); | 684 (char*)cmdname = alloca (strlen (argv[0]) + 1); |
676 strcpy ((char*)cmdname, argv[0]); | 685 strcpy ((char*)cmdname, argv[0]); |
935 { | 944 { |
936 char window_class[32]; | 945 char window_class[32]; |
937 | 946 |
938 GetClassName (hwnd, window_class, sizeof (window_class)); | 947 GetClassName (hwnd, window_class, sizeof (window_class)); |
939 if (strcmp (window_class, | 948 if (strcmp (window_class, |
940 (os_subtype == OS_WIN95) | 949 windows9x_p() |
941 ? "tty" | 950 ? "tty" |
942 : "ConsoleWindowClass") == 0) | 951 : "ConsoleWindowClass") == 0) |
943 { | 952 { |
944 cp->hwnd = hwnd; | 953 cp->hwnd = hwnd; |
945 return FALSE; | 954 return FALSE; |
1028 else | 1037 else |
1029 { | 1038 { |
1030 if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd) | 1039 if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd) |
1031 { | 1040 { |
1032 #if 1 | 1041 #if 1 |
1033 if (os_subtype == OS_WIN95) | 1042 if (windows9x_p()) |
1034 { | 1043 { |
1035 /* | 1044 /* |
1036 Another possibility is to try terminating the VDM out-right by | 1045 Another possibility is to try terminating the VDM out-right by |
1037 calling the Shell VxD (id 0x17) V86 interface, function #4 | 1046 calling the Shell VxD (id 0x17) V86 interface, function #4 |
1038 "SHELL_Destroy_VM", ie. | 1047 "SHELL_Destroy_VM", ie. |
1417 if (!SetThreadLocale (XINT (lcid))) | 1426 if (!SetThreadLocale (XINT (lcid))) |
1418 return Qnil; | 1427 return Qnil; |
1419 | 1428 |
1420 /* Sync with FSF Emacs 19.34.6 note: dwWinThreadId declared in | 1429 /* Sync with FSF Emacs 19.34.6 note: dwWinThreadId declared in |
1421 w32term.h and defined in w32fns.c, both of which are not in current | 1430 w32term.h and defined in w32fns.c, both of which are not in current |
1422 XEmacs. ### Check what we lose by ifdef'ing out these. --marcpa */ | 1431 XEmacs. #### Check what we lose by ifdef'ing out these. --marcpa */ |
1423 #if 0 | 1432 #if 0 |
1424 /* Need to set input thread locale if present. */ | 1433 /* Need to set input thread locale if present. */ |
1425 if (dwWinThreadId) | 1434 if (dwWinThreadId) |
1426 /* Reply is not needed. */ | 1435 /* Reply is not needed. */ |
1427 PostThreadMessage (dwWinThreadId, WM_EMACS_SETLOCALE, XINT (lcid), 0); | 1436 PostThreadMessage (dwWinThreadId, WM_EMACS_SETLOCALE, XINT (lcid), 0); |