sim: bfin: drop old linux/mii.h workarounds

We had some workarounds for old linux/mii.h headers, but it breaks with
newer ones.  So tweak the checks a bit to work with newer ones.  We'll
worry about older systems once someone complains.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2012-03-04 19:56:57 +00:00
parent 6597b100b5
commit 84de2f06d8
5 changed files with 35 additions and 23 deletions

View file

@ -1,3 +1,11 @@
2012-02-04 Mike Frysinger <vapier@gentoo.org>
* config.in: Regenerate.
* configure: Likewise.
* configure.ac: Add linux/types.h to AC_CHECK_HEADERS.
* dv-eth_phy.c: Check for HAVE_LINUX_TYPES_H, and delete __u16 and
_LINUX_TYPES_H defines.
2011-12-03 Mike Frysinger <vapier@gentoo.org>
* interp.c (bfin_syscall): Increase _tbuf storage. Declare new local

View file

@ -1,20 +1,5 @@
/* config.in. Generated from configure.ac by autoheader. */
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
#undef HAVE_CATGETS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* Define as 1 if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
@ -58,6 +43,9 @@
/* Define to 1 if you have the `kill' function. */
#undef HAVE_KILL
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
@ -70,6 +58,9 @@
/* Define to 1 if you have the <linux/mii.h> header file. */
#undef HAVE_LINUX_MII_H
/* Define to 1 if you have the <linux/types.h> header file. */
#undef HAVE_LINUX_TYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

15
sim/bfin/configure vendored
View file

@ -2468,9 +2468,9 @@ sim_inline="-DDEFAULT_INLINE=0"
# AC_PROG_CPP_WERROR
# Test for GNAT.
# We require the gnatbind program, and a compiler driver that
# understands Ada. We use the user's CC setting, already found,
# and possibly add $1 to the command-line parameters.
# We require the gnatbind & gnatmake programs, as well as a compiler driver
# that understands Ada. We use the user's CC setting, already found, and
# possibly add $1 to the command-line parameters.
#
# Sets the shell variable have_gnat to yes or no as appropriate, and
# substitutes GNATBIND and GNATMAKE.
@ -5414,7 +5414,14 @@ _ACEOF
fi
done
for ac_header in sys/ioctl.h sys/mman.h net/if.h linux/if_tun.h linux/mii.h
for ac_header in \
linux/if_tun.h \
linux/mii.h \
linux/types.h \
net/if.h \
sys/ioctl.h \
sys/mman.h \
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

View file

@ -45,7 +45,14 @@ SIM_AC_OPTION_HARDWARE(yes,,\
)
AC_CHECK_FUNCS([getuid getgid geteuid getegid setuid setgid mmap munmap kill pread])
AC_CHECK_HEADERS([sys/ioctl.h sys/mman.h net/if.h linux/if_tun.h linux/mii.h])
AC_CHECK_HEADERS([ \
linux/if_tun.h \
linux/mii.h \
linux/types.h \
net/if.h \
sys/ioctl.h \
sys/mman.h \
])
BFIN_SIM_EXTRA_OBJS=

View file

@ -23,11 +23,10 @@
#include "sim-main.h"
#include "devices.h"
#ifdef HAVE_LINUX_MII_H
#if defined (HAVE_LINUX_MII_H) && defined (HAVE_LINUX_TYPES_H)
/* Workaround old/broken linux headers. */
#define _LINUX_TYPES_H
#define __u16 unsigned short
#include <linux/types.h>
#include <linux/mii.h>
#define REG_PHY_SIZE 0x20