diff options
| author | YAMAMOTO Mitsuharu | 2006-01-12 08:16:12 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2006-01-12 08:16:12 +0000 |
| commit | 2026418cf3f153c6f94884eacf6eabda31141ca9 (patch) | |
| tree | 54612211b56959db11e0127657f2291174ddba8a /src/process.c | |
| parent | 3e16e7992b7b5dbab6ce07695010b897551a64e9 (diff) | |
| download | emacs-2026418cf3f153c6f94884eacf6eabda31141ca9.tar.gz emacs-2026418cf3f153c6f94884eacf6eabda31141ca9.zip | |
[HAVE_INTTYPES_H]: Include inttypes.h.
(ifflag_table): Fix typo (IFF_OACTIV -> IFF_OACTIVE).
(Fnetwork_interface_info): Use HAVE_STRUCT_IFREQ_IFR_NETMASK
macro. Also try member ifr_addr when getting netmask.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index 526e3518390..ffb1cd664e3 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -40,6 +40,9 @@ Boston, MA 02110-1301, USA. */ | |||
| 40 | #include <sys/types.h> /* some typedefs are used in sys/file.h */ | 40 | #include <sys/types.h> /* some typedefs are used in sys/file.h */ |
| 41 | #include <sys/file.h> | 41 | #include <sys/file.h> |
| 42 | #include <sys/stat.h> | 42 | #include <sys/stat.h> |
| 43 | #ifdef HAVE_INTTYPES_H | ||
| 44 | #include <inttypes.h> | ||
| 45 | #endif | ||
| 43 | #ifdef HAVE_UNISTD_H | 46 | #ifdef HAVE_UNISTD_H |
| 44 | #include <unistd.h> | 47 | #include <unistd.h> |
| 45 | #endif | 48 | #endif |
| @@ -3596,8 +3599,8 @@ static struct ifflag_def ifflag_table[] = { | |||
| 3596 | #ifdef IFF_DYNAMIC | 3599 | #ifdef IFF_DYNAMIC |
| 3597 | { IFF_DYNAMIC, "dynamic" }, | 3600 | { IFF_DYNAMIC, "dynamic" }, |
| 3598 | #endif | 3601 | #endif |
| 3599 | #ifdef IFF_OACTIV | 3602 | #ifdef IFF_OACTIVE |
| 3600 | { IFF_OACTIV, "oactiv" }, /* OpenBSD: transmission in progress */ | 3603 | { IFF_OACTIVE, "oactive" }, /* OpenBSD: transmission in progress */ |
| 3601 | #endif | 3604 | #endif |
| 3602 | #ifdef IFF_SIMPLEX | 3605 | #ifdef IFF_SIMPLEX |
| 3603 | { IFF_SIMPLEX, "simplex" }, /* OpenBSD: can't hear own transmissions */ | 3606 | { IFF_SIMPLEX, "simplex" }, /* OpenBSD: can't hear own transmissions */ |
| @@ -3683,11 +3686,15 @@ FLAGS is the current flags of the interface. */) | |||
| 3683 | res = Fcons (elt, res); | 3686 | res = Fcons (elt, res); |
| 3684 | 3687 | ||
| 3685 | elt = Qnil; | 3688 | elt = Qnil; |
| 3686 | #if defined(SIOCGIFNETMASK) && defined(ifr_netmask) | 3689 | #if defined(SIOCGIFNETMASK) && (defined(HAVE_STRUCT_IFREQ_IFR_NETMASK) || defined(HAVE_STRUCT_IFREQ_IFR_ADDR)) |
| 3687 | if (ioctl (s, SIOCGIFNETMASK, &rq) == 0) | 3690 | if (ioctl (s, SIOCGIFNETMASK, &rq) == 0) |
| 3688 | { | 3691 | { |
| 3689 | any++; | 3692 | any++; |
| 3693 | #ifdef HAVE_STRUCT_IFREQ_IFR_NETMASK | ||
| 3690 | elt = conv_sockaddr_to_lisp (&rq.ifr_netmask, sizeof (rq.ifr_netmask)); | 3694 | elt = conv_sockaddr_to_lisp (&rq.ifr_netmask, sizeof (rq.ifr_netmask)); |
| 3695 | #else | ||
| 3696 | elt = conv_sockaddr_to_lisp (&rq.ifr_addr, sizeof (rq.ifr_addr)); | ||
| 3697 | #endif | ||
| 3691 | } | 3698 | } |
| 3692 | #endif | 3699 | #endif |
| 3693 | res = Fcons (elt, res); | 3700 | res = Fcons (elt, res); |