diff options
| -rw-r--r-- | src/process.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index 6bf32c4033b..74e8fc49475 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -46,6 +46,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 46 | #include <arpa/inet.h> | 46 | #include <arpa/inet.h> |
| 47 | #endif /* HAVE_SOCKETS */ | 47 | #endif /* HAVE_SOCKETS */ |
| 48 | 48 | ||
| 49 | /* TERM is a poor-man's SLIP, used on Linux. */ | ||
| 50 | #ifdef TERM | ||
| 51 | #include <client.h> | ||
| 52 | #endif | ||
| 53 | |||
| 49 | #if defined(BSD) || defined(STRIDE) | 54 | #if defined(BSD) || defined(STRIDE) |
| 50 | #include <sys/ioctl.h> | 55 | #include <sys/ioctl.h> |
| 51 | #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) | 56 | #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) |
| @@ -1396,6 +1401,7 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ | |||
| 1396 | port = svc_info->s_port; | 1401 | port = svc_info->s_port; |
| 1397 | } | 1402 | } |
| 1398 | 1403 | ||
| 1404 | #ifndef TERM | ||
| 1399 | host_info_ptr = gethostbyname (XSTRING (host)->data); | 1405 | host_info_ptr = gethostbyname (XSTRING (host)->data); |
| 1400 | if (host_info_ptr == 0) | 1406 | if (host_info_ptr == 0) |
| 1401 | /* Attempt to interpret host as numeric inet address */ | 1407 | /* Attempt to interpret host as numeric inet address */ |
| @@ -1440,6 +1446,13 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ | |||
| 1440 | report_file_error ("connection failed", | 1446 | report_file_error ("connection failed", |
| 1441 | Fcons (host, Fcons (name, Qnil))); | 1447 | Fcons (host, Fcons (name, Qnil))); |
| 1442 | } | 1448 | } |
| 1449 | #else /* TERM */ | ||
| 1450 | s = connect_server (0); | ||
| 1451 | if (s < 0) | ||
| 1452 | report_file_error ("error creating socket", Fcons (name, Qnil)); | ||
| 1453 | send_command (s, C_PORT, 0, "%s:%d", XSTRING (host)->data, ntohs (port)); | ||
| 1454 | send_command (s, C_DUMB, 1, 0); | ||
| 1455 | #endif /* TERM */ | ||
| 1443 | 1456 | ||
| 1444 | inch = s; | 1457 | inch = s; |
| 1445 | outch = dup (s); | 1458 | outch = dup (s); |