Commit 2026418c authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu

[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.
parent 3e16e799
2006-01-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macterm.c [USE_ATSUI] (atsu_get_text_layout_with_text_ptr)
[MAC_OS_X_VERSION_MAX_ALLOWED >= 1020]: Specify kATSLineUseQDRendering.
(XLoadQueryFont) [USE_ATSUI]: Display diacritical marks in
decomposed form.
* process.c [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.
2006-01-10 Stefan Monnier <monnier@iro.umontreal.ca>
* fileio.c (Fexpand_file_name): Remove redundant tests.
......
......@@ -40,6 +40,9 @@ Boston, MA 02110-1301, USA. */
#include <sys/types.h> /* some typedefs are used in sys/file.h */
#include <sys/file.h>
#include <sys/stat.h>
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
......@@ -3596,8 +3599,8 @@ static struct ifflag_def ifflag_table[] = {
#ifdef IFF_DYNAMIC
{ IFF_DYNAMIC, "dynamic" },
#endif
#ifdef IFF_OACTIV
{ IFF_OACTIV, "oactiv" }, /* OpenBSD: transmission in progress */
#ifdef IFF_OACTIVE
{ IFF_OACTIVE, "oactive" }, /* OpenBSD: transmission in progress */
#endif
#ifdef IFF_SIMPLEX
{ IFF_SIMPLEX, "simplex" }, /* OpenBSD: can't hear own transmissions */
......@@ -3683,11 +3686,15 @@ FLAGS is the current flags of the interface. */)
res = Fcons (elt, res);
elt = Qnil;
#if defined(SIOCGIFNETMASK) && defined(ifr_netmask)
#if defined(SIOCGIFNETMASK) && (defined(HAVE_STRUCT_IFREQ_IFR_NETMASK) || defined(HAVE_STRUCT_IFREQ_IFR_ADDR))
if (ioctl (s, SIOCGIFNETMASK, &rq) == 0)
{
any++;
#ifdef HAVE_STRUCT_IFREQ_IFR_NETMASK
elt = conv_sockaddr_to_lisp (&rq.ifr_netmask, sizeof (rq.ifr_netmask));
#else
elt = conv_sockaddr_to_lisp (&rq.ifr_addr, sizeof (rq.ifr_addr));
#endif
}
#endif
res = Fcons (elt, res);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment