comparison src/process.c @ 91702:b7a5a89054dc

* configure.in (LIBX11_MACHINE, HAVE_XFREE386): Remove code dealing with obsolete variables. * fakemail.c (MAIL_PROGRAM_NAME): Remove unused conditional. (main): Replace MAIL_PROGRAM_NAME with its value. * src/Makefile.in: * src/emacs.c: * src/gmalloc.c: * src/keyboard.c: * src/lisp.h: * src/m/ibm370aix.h: * src/process.c: * src/regex.c: * src/s/hpux.h: * src/sysdep.c: * src/sysselect.h: * src/systty.h: * src/unexec.c: * src/w32term.c: * src/xsmfns.c: * src/xterm.c: Remove code that deals with obsolete variables. * s/msdos.h (DONT_NEED_ENVIRON): Don't define. * ecrt0.c: Replace the DONT_NEED_ENVIRON test with MSDOS test, nothing else needs it anymore.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 09 Feb 2008 18:03:10 +0000
parents f14242124fd7
children f32eae6092fa
comparison
equal deleted inserted replaced
91701:8fac5ad6ff83 91702:b7a5a89054dc
55 #ifdef HAVE_SOCKETS /* TCP connection support, if kernel can do it */ 55 #ifdef HAVE_SOCKETS /* TCP connection support, if kernel can do it */
56 #include <sys/socket.h> 56 #include <sys/socket.h>
57 #include <netdb.h> 57 #include <netdb.h>
58 #include <netinet/in.h> 58 #include <netinet/in.h>
59 #include <arpa/inet.h> 59 #include <arpa/inet.h>
60 #ifdef NEED_NET_ERRNO_H
61 #include <net/errno.h>
62 #endif /* NEED_NET_ERRNO_H */
63 60
64 /* Are local (unix) sockets supported? */ 61 /* Are local (unix) sockets supported? */
65 #if defined (HAVE_SYS_UN_H) && !defined (NO_SOCKETS_IN_FILE_SYSTEM) 62 #if defined (HAVE_SYS_UN_H)
66 #if !defined (AF_LOCAL) && defined (AF_UNIX) 63 #if !defined (AF_LOCAL) && defined (AF_UNIX)
67 #define AF_LOCAL AF_UNIX 64 #define AF_LOCAL AF_UNIX
68 #endif 65 #endif
69 #ifdef AF_LOCAL 66 #ifdef AF_LOCAL
70 #define HAVE_LOCAL_SOCKETS 67 #define HAVE_LOCAL_SOCKETS
74 #endif /* HAVE_SOCKETS */ 71 #endif /* HAVE_SOCKETS */
75 72
76 /* TERM is a poor-man's SLIP, used on GNU/Linux. */ 73 /* TERM is a poor-man's SLIP, used on GNU/Linux. */
77 #ifdef TERM 74 #ifdef TERM
78 #include <client.h> 75 #include <client.h>
79 #endif
80
81 /* On some systems, inet_addr returns a 'struct in_addr'. */
82 #ifdef HAVE_BROKEN_INET_ADDR
83 #define IN_ADDR struct in_addr
84 #define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1)
85 #else
86 #define IN_ADDR unsigned long
87 #define NUMERIC_ADDR_ERROR (numeric_addr == -1)
88 #endif 76 #endif
89 77
90 #if defined(BSD_SYSTEM) 78 #if defined(BSD_SYSTEM)
91 #include <sys/ioctl.h> 79 #include <sys/ioctl.h>
92 #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) 80 #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5)
213 #endif 201 #endif
214 202
215 /* t means use pty, nil means use a pipe, 203 /* t means use pty, nil means use a pipe,
216 maybe other values to come. */ 204 maybe other values to come. */
217 static Lisp_Object Vprocess_connection_type; 205 static Lisp_Object Vprocess_connection_type;
218
219 #ifdef SKTPAIR
220 #ifndef HAVE_SOCKETS
221 #include <sys/socket.h>
222 #endif
223 #endif /* SKTPAIR */
224 206
225 /* These next two vars are non-static since sysdep.c uses them in the 207 /* These next two vars are non-static since sysdep.c uses them in the
226 emulation of `select'. */ 208 emulation of `select'. */
227 /* Number of events of change of status of a process. */ 209 /* Number of events of change of status of a process. */
228 int process_tick; 210 int process_tick;
1903 #endif /* not USG, or USG_SUBTTY_WORKS */ 1885 #endif /* not USG, or USG_SUBTTY_WORKS */
1904 pty_flag = 1; 1886 pty_flag = 1;
1905 } 1887 }
1906 else 1888 else
1907 #endif /* HAVE_PTYS */ 1889 #endif /* HAVE_PTYS */
1908 #ifdef SKTPAIR
1909 {
1910 if (socketpair (AF_UNIX, SOCK_STREAM, 0, sv) < 0)
1911 report_file_error ("Opening socketpair", Qnil);
1912 outchannel = inchannel = sv[0];
1913 forkout = forkin = sv[1];
1914 }
1915 #else /* not SKTPAIR */
1916 { 1890 {
1917 int tem; 1891 int tem;
1918 tem = pipe (sv); 1892 tem = pipe (sv);
1919 if (tem < 0) 1893 if (tem < 0)
1920 report_file_error ("Creating pipe", Qnil); 1894 report_file_error ("Creating pipe", Qnil);
1928 report_file_error ("Creating pipe", Qnil); 1902 report_file_error ("Creating pipe", Qnil);
1929 } 1903 }
1930 outchannel = sv[1]; 1904 outchannel = sv[1];
1931 forkin = sv[0]; 1905 forkin = sv[0];
1932 } 1906 }
1933 #endif /* not SKTPAIR */
1934 1907
1935 #if 0 1908 #if 0
1936 /* Replaced by close_process_descs */ 1909 /* Replaced by close_process_descs */
1937 set_exclusive_use (inchannel); 1910 set_exclusive_use (inchannel);
1938 set_exclusive_use (outchannel); 1911 set_exclusive_use (outchannel);
3154 address_in.sin_family = family; 3127 address_in.sin_family = family;
3155 } 3128 }
3156 else 3129 else
3157 /* Attempt to interpret host as numeric inet address */ 3130 /* Attempt to interpret host as numeric inet address */
3158 { 3131 {
3159 IN_ADDR numeric_addr; 3132 unsigned long numeric_addr;
3160 numeric_addr = inet_addr ((char *) SDATA (host)); 3133 numeric_addr = inet_addr ((char *) SDATA (host));
3161 if (NUMERIC_ADDR_ERROR) 3134 if (numeric_addr == -1)
3162 error ("Unknown host \"%s\"", SDATA (host)); 3135 error ("Unknown host \"%s\"", SDATA (host));
3163 3136
3164 bcopy ((char *)&numeric_addr, (char *) &address_in.sin_addr, 3137 bcopy ((char *)&numeric_addr, (char *) &address_in.sin_addr,
3165 sizeof (address_in.sin_addr)); 3138 sizeof (address_in.sin_addr));
3166 } 3139 }