Mercurial > hg > xemacs-beta
comparison src/process-nt.c @ 4985:358aa3bb603f
Automatic merge
| author | Ben Wing <ben@xemacs.org> |
|---|---|
| date | Fri, 05 Feb 2010 12:12:28 -0600 |
| parents | 4aebb0131297 |
| children | b5df3737028a |
comparison
equal
deleted
inserted
replaced
| 4984:f23cd0184dcf | 4985:358aa3bb603f |
|---|---|
| 694 | 694 |
| 695 static DOESNT_RETURN | 695 static DOESNT_RETURN |
| 696 mswindows_report_winsock_error (const Ascbyte *reason, Lisp_Object data, | 696 mswindows_report_winsock_error (const Ascbyte *reason, Lisp_Object data, |
| 697 int errnum) | 697 int errnum) |
| 698 { | 698 { |
| 699 report_file_type_error (Qnetwork_error, mswindows_lisp_error (errnum), | 699 signal_error_2 (Qnetwork_error, reason, mswindows_lisp_error (errnum), data); |
| 700 reason, data); | |
| 701 } | 700 } |
| 702 | 701 |
| 703 static void | 702 static void |
| 704 ensure_console_window_exists (void) | 703 ensure_console_window_exists (void) |
| 705 { | 704 { |
| 859 invalid_argument | 858 invalid_argument |
| 860 ("Bogus return value from `mswindows-construct-process-command-line'", | 859 ("Bogus return value from `mswindows-construct-process-command-line'", |
| 861 args_or_ret); | 860 args_or_ret); |
| 862 | 861 |
| 863 /* #### What about path names, which may be links? */ | 862 /* #### What about path names, which may be links? */ |
| 864 LISP_STRING_TO_TSTR (args_or_ret, command_line); | 863 command_line = LISP_STRING_TO_TSTR (args_or_ret); |
| 865 | 864 |
| 866 UNGCPRO; /* args_or_ret */ | 865 UNGCPRO; /* args_or_ret */ |
| 867 } | 866 } |
| 868 | 867 |
| 869 /* Set `proc_env' to a nul-separated array of the strings in | 868 /* Set `proc_env' to a nul-separated array of the strings in |
| 1235 /* First check if HOST is already a numeric address */ | 1234 /* First check if HOST is already a numeric address */ |
| 1236 { | 1235 { |
| 1237 Extbyte *hostext; | 1236 Extbyte *hostext; |
| 1238 unsigned long inaddr; | 1237 unsigned long inaddr; |
| 1239 | 1238 |
| 1240 LISP_STRING_TO_EXTERNAL (host, hostext, Qmswindows_host_name_encoding); | 1239 hostext = LISP_STRING_TO_EXTERNAL (host, Qmswindows_host_name_encoding); |
| 1241 inaddr = inet_addr (hostext); | 1240 inaddr = inet_addr (hostext); |
| 1242 if (inaddr != INADDR_NONE) | 1241 if (inaddr != INADDR_NONE) |
| 1243 { | 1242 { |
| 1244 address->sin_addr.s_addr = inaddr; | 1243 address->sin_addr.s_addr = inaddr; |
| 1245 return 0; | 1244 return 0; |
| 1253 | 1252 |
| 1254 /* Post name resolution request */ | 1253 /* Post name resolution request */ |
| 1255 { | 1254 { |
| 1256 Extbyte *hostext; | 1255 Extbyte *hostext; |
| 1257 | 1256 |
| 1258 LISP_STRING_TO_EXTERNAL (host, hostext, Qmswindows_host_name_encoding); | 1257 hostext = LISP_STRING_TO_EXTERNAL (host, Qmswindows_host_name_encoding); |
| 1259 | 1258 |
| 1260 hasync = WSAAsyncGetHostByName (hwnd, XM_SOCKREPLY, hostext, | 1259 hasync = WSAAsyncGetHostByName (hwnd, XM_SOCKREPLY, hostext, |
| 1261 buf, sizeof (buf)); | 1260 buf, sizeof (buf)); |
| 1262 if (hasync == NULL) | 1261 if (hasync == NULL) |
| 1263 { | 1262 { |
| 1347 { | 1346 { |
| 1348 struct servent *svc_info; | 1347 struct servent *svc_info; |
| 1349 Extbyte *servext; | 1348 Extbyte *servext; |
| 1350 | 1349 |
| 1351 CHECK_STRING (service); | 1350 CHECK_STRING (service); |
| 1352 LISP_STRING_TO_EXTERNAL (service, servext, | 1351 servext = LISP_STRING_TO_EXTERNAL (service, |
| 1353 Qmswindows_service_name_encoding); | 1352 Qmswindows_service_name_encoding); |
| 1354 | 1353 |
| 1355 svc_info = getservbyname (servext, "tcp"); | 1354 svc_info = getservbyname (servext, "tcp"); |
| 1356 if (svc_info == 0) | 1355 if (svc_info == 0) |
| 1357 invalid_argument ("Unknown service", service); | 1356 invalid_argument ("Unknown service", service); |
| 1358 port = svc_info->s_port; | 1357 port = svc_info->s_port; |
