aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/process.c b/src/process.c
index 058ad5f871f..90ad9c21681 100644
--- a/src/process.c
+++ b/src/process.c
@@ -54,16 +54,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
54#endif 54#endif
55 55
56#include <sys/ioctl.h> 56#include <sys/ioctl.h>
57#if defined(HAVE_NET_IF_H) 57#if defined (HAVE_NET_IF_H)
58#include <net/if.h> 58#include <net/if.h>
59#endif /* HAVE_NET_IF_H */ 59#endif /* HAVE_NET_IF_H */
60 60
61#if defined(HAVE_IFADDRS_H) 61#if defined (HAVE_IFADDRS_H)
62/* Must be after net/if.h */ 62/* Must be after net/if.h */
63#include <ifaddrs.h> 63#include <ifaddrs.h>
64 64
65/* We only use structs from this header when we use getifaddrs. */ 65/* We only use structs from this header when we use getifaddrs. */
66#if defined(HAVE_NET_IF_DL_H) 66#if defined (HAVE_NET_IF_DL_H)
67#include <net/if_dl.h> 67#include <net/if_dl.h>
68#endif 68#endif
69 69
@@ -256,7 +256,7 @@ static void create_pty (Lisp_Object);
256 256
257/* If we support a window system, turn on the code to poll periodically 257/* If we support a window system, turn on the code to poll periodically
258 to detect C-g. It isn't actually used when doing interrupt input. */ 258 to detect C-g. It isn't actually used when doing interrupt input. */
259#if defined(HAVE_WINDOW_SYSTEM) && !defined(USE_ASYNC_EVENTS) 259#if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_ASYNC_EVENTS)
260#define POLL_FOR_INPUT 260#define POLL_FOR_INPUT
261#endif 261#endif
262 262
@@ -2921,7 +2921,7 @@ usage: (make-network-process &rest ARGS) */)
2921 { 2921 {
2922 /* Don't support network sockets when non-blocking mode is 2922 /* Don't support network sockets when non-blocking mode is
2923 not available, since a blocked Emacs is not useful. */ 2923 not available, since a blocked Emacs is not useful. */
2924#if !defined(O_NONBLOCK) && !defined(O_NDELAY) 2924#if !defined (O_NONBLOCK) && !defined (O_NDELAY)
2925 error ("Network servers not supported"); 2925 error ("Network servers not supported");
2926#else 2926#else
2927 is_server = 1; 2927 is_server = 1;
@@ -2975,7 +2975,7 @@ usage: (make-network-process &rest ARGS) */)
2975 tem = Fplist_get (contact, QCfamily); 2975 tem = Fplist_get (contact, QCfamily);
2976 if (NILP (tem)) 2976 if (NILP (tem))
2977 { 2977 {
2978#if defined(HAVE_GETADDRINFO) && defined(AF_INET6) 2978#if defined (HAVE_GETADDRINFO) && defined (AF_INET6)
2979 family = AF_UNSPEC; 2979 family = AF_UNSPEC;
2980#else 2980#else
2981 family = AF_INET; 2981 family = AF_INET;
@@ -3560,7 +3560,7 @@ usage: (make-network-process &rest ARGS) */)
3560} 3560}
3561 3561
3562 3562
3563#if defined(HAVE_NET_IF_H) 3563#if defined (HAVE_NET_IF_H)
3564 3564
3565#ifdef SIOCGIFCONF 3565#ifdef SIOCGIFCONF
3566DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0, 3566DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0,
@@ -3631,7 +3631,7 @@ format; see the description of ADDRESS in `make-network-process'. */)
3631} 3631}
3632#endif /* SIOCGIFCONF */ 3632#endif /* SIOCGIFCONF */
3633 3633
3634#if defined(SIOCGIFADDR) || defined(SIOCGIFHWADDR) || defined(SIOCGIFFLAGS) 3634#if defined (SIOCGIFADDR) || defined (SIOCGIFHWADDR) || defined (SIOCGIFFLAGS)
3635 3635
3636struct ifflag_def { 3636struct ifflag_def {
3637 int flag_bit; 3637 int flag_bit;
@@ -3738,7 +3738,7 @@ FLAGS is the current flags of the interface. */)
3738 return Qnil; 3738 return Qnil;
3739 3739
3740 elt = Qnil; 3740 elt = Qnil;
3741#if defined(SIOCGIFFLAGS) && defined(HAVE_STRUCT_IFREQ_IFR_FLAGS) 3741#if defined (SIOCGIFFLAGS) && defined (HAVE_STRUCT_IFREQ_IFR_FLAGS)
3742 if (ioctl (s, SIOCGIFFLAGS, &rq) == 0) 3742 if (ioctl (s, SIOCGIFFLAGS, &rq) == 0)
3743 { 3743 {
3744 int flags = rq.ifr_flags; 3744 int flags = rq.ifr_flags;
@@ -3772,7 +3772,7 @@ FLAGS is the current flags of the interface. */)
3772 res = Fcons (elt, res); 3772 res = Fcons (elt, res);
3773 3773
3774 elt = Qnil; 3774 elt = Qnil;
3775#if defined(SIOCGIFHWADDR) && defined(HAVE_STRUCT_IFREQ_IFR_HWADDR) 3775#if defined (SIOCGIFHWADDR) && defined (HAVE_STRUCT_IFREQ_IFR_HWADDR)
3776 if (ioctl (s, SIOCGIFHWADDR, &rq) == 0) 3776 if (ioctl (s, SIOCGIFHWADDR, &rq) == 0)
3777 { 3777 {
3778 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil); 3778 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil);
@@ -3784,7 +3784,7 @@ FLAGS is the current flags of the interface. */)
3784 p->contents[n] = make_number (((unsigned char *)&rq.ifr_hwaddr.sa_data[0])[n]); 3784 p->contents[n] = make_number (((unsigned char *)&rq.ifr_hwaddr.sa_data[0])[n]);
3785 elt = Fcons (make_number (rq.ifr_hwaddr.sa_family), hwaddr); 3785 elt = Fcons (make_number (rq.ifr_hwaddr.sa_family), hwaddr);
3786 } 3786 }
3787#elif defined(HAVE_GETIFADDRS) && defined(LLADDR) 3787#elif defined (HAVE_GETIFADDRS) && defined (LLADDR)
3788 if (getifaddrs (&ifap) != -1) 3788 if (getifaddrs (&ifap) != -1)
3789 { 3789 {
3790 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil); 3790 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil);
@@ -3802,7 +3802,7 @@ FLAGS is the current flags of the interface. */)
3802 || sdl->sdl_alen != 6) 3802 || sdl->sdl_alen != 6)
3803 continue; 3803 continue;
3804 3804
3805 memcpy (linkaddr, LLADDR(sdl), sdl->sdl_alen); 3805 memcpy (linkaddr, LLADDR (sdl), sdl->sdl_alen);
3806 for (n = 0; n < 6; n++) 3806 for (n = 0; n < 6; n++)
3807 p->contents[n] = make_number (linkaddr[n]); 3807 p->contents[n] = make_number (linkaddr[n]);
3808 3808
@@ -3819,7 +3819,7 @@ FLAGS is the current flags of the interface. */)
3819 res = Fcons (elt, res); 3819 res = Fcons (elt, res);
3820 3820
3821 elt = Qnil; 3821 elt = Qnil;
3822#if defined(SIOCGIFNETMASK) && (defined(HAVE_STRUCT_IFREQ_IFR_NETMASK) || defined(HAVE_STRUCT_IFREQ_IFR_ADDR)) 3822#if defined (SIOCGIFNETMASK) && (defined (HAVE_STRUCT_IFREQ_IFR_NETMASK) || defined (HAVE_STRUCT_IFREQ_IFR_ADDR))
3823 if (ioctl (s, SIOCGIFNETMASK, &rq) == 0) 3823 if (ioctl (s, SIOCGIFNETMASK, &rq) == 0)
3824 { 3824 {
3825 any = 1; 3825 any = 1;
@@ -3833,7 +3833,7 @@ FLAGS is the current flags of the interface. */)
3833 res = Fcons (elt, res); 3833 res = Fcons (elt, res);
3834 3834
3835 elt = Qnil; 3835 elt = Qnil;
3836#if defined(SIOCGIFBRDADDR) && defined(HAVE_STRUCT_IFREQ_IFR_BROADADDR) 3836#if defined (SIOCGIFBRDADDR) && defined (HAVE_STRUCT_IFREQ_IFR_BROADADDR)
3837 if (ioctl (s, SIOCGIFBRDADDR, &rq) == 0) 3837 if (ioctl (s, SIOCGIFBRDADDR, &rq) == 0)
3838 { 3838 {
3839 any = 1; 3839 any = 1;
@@ -3843,7 +3843,7 @@ FLAGS is the current flags of the interface. */)
3843 res = Fcons (elt, res); 3843 res = Fcons (elt, res);
3844 3844
3845 elt = Qnil; 3845 elt = Qnil;
3846#if defined(SIOCGIFADDR) && defined(HAVE_STRUCT_IFREQ_IFR_ADDR) 3846#if defined (SIOCGIFADDR) && defined (HAVE_STRUCT_IFREQ_IFR_ADDR)
3847 if (ioctl (s, SIOCGIFADDR, &rq) == 0) 3847 if (ioctl (s, SIOCGIFADDR, &rq) == 0)
3848 { 3848 {
3849 any = 1; 3849 any = 1;
@@ -3857,7 +3857,7 @@ FLAGS is the current flags of the interface. */)
3857 return any ? res : Qnil; 3857 return any ? res : Qnil;
3858} 3858}
3859#endif 3859#endif
3860#endif /* defined(HAVE_NET_IF_H) */ 3860#endif /* defined (HAVE_NET_IF_H) */
3861 3861
3862/* Turn off input and output for process PROC. */ 3862/* Turn off input and output for process PROC. */
3863 3863
@@ -7280,7 +7280,7 @@ init_process (void)
7280#ifdef HAVE_GETSOCKNAME 7280#ifdef HAVE_GETSOCKNAME
7281 ADD_SUBFEATURE (QCservice, Qt); 7281 ADD_SUBFEATURE (QCservice, Qt);
7282#endif 7282#endif
7283#if defined(O_NONBLOCK) || defined(O_NDELAY) 7283#if defined (O_NONBLOCK) || defined (O_NDELAY)
7284 ADD_SUBFEATURE (QCserver, Qt); 7284 ADD_SUBFEATURE (QCserver, Qt);
7285#endif 7285#endif
7286 7286
@@ -7472,14 +7472,14 @@ The variable takes effect when `start-process' is called. */);
7472 defsubr (&Sset_network_process_option); 7472 defsubr (&Sset_network_process_option);
7473 defsubr (&Smake_network_process); 7473 defsubr (&Smake_network_process);
7474 defsubr (&Sformat_network_address); 7474 defsubr (&Sformat_network_address);
7475#if defined(HAVE_NET_IF_H) 7475#if defined (HAVE_NET_IF_H)
7476#ifdef SIOCGIFCONF 7476#ifdef SIOCGIFCONF
7477 defsubr (&Snetwork_interface_list); 7477 defsubr (&Snetwork_interface_list);
7478#endif 7478#endif
7479#if defined(SIOCGIFADDR) || defined(SIOCGIFHWADDR) || defined(SIOCGIFFLAGS) 7479#if defined (SIOCGIFADDR) || defined (SIOCGIFHWADDR) || defined (SIOCGIFFLAGS)
7480 defsubr (&Snetwork_interface_info); 7480 defsubr (&Snetwork_interface_info);
7481#endif 7481#endif
7482#endif /* defined(HAVE_NET_IF_H) */ 7482#endif /* defined (HAVE_NET_IF_H) */
7483#ifdef DATAGRAM_SOCKETS 7483#ifdef DATAGRAM_SOCKETS
7484 defsubr (&Sprocess_datagram_address); 7484 defsubr (&Sprocess_datagram_address);
7485 defsubr (&Sset_process_datagram_address); 7485 defsubr (&Sset_process_datagram_address);