diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-03-04 19:56:57 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-03-04 19:56:57 +0000 |
commit | 84de2f06d84e2ba7aef3bba62b3a4833bb2fb6ca (patch) | |
tree | 57479316a7a27741eab68ab5f1df99dd7f0f62dc /sim | |
parent | 6597b100b5034a27219b7c5823af25747f4d27f5 (diff) | |
download | gdb-84de2f06d84e2ba7aef3bba62b3a4833bb2fb6ca.zip gdb-84de2f06d84e2ba7aef3bba62b3a4833bb2fb6ca.tar.gz gdb-84de2f06d84e2ba7aef3bba62b3a4833bb2fb6ca.tar.bz2 |
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>
Diffstat (limited to 'sim')
-rw-r--r-- | sim/bfin/ChangeLog | 8 | ||||
-rw-r--r-- | sim/bfin/config.in | 21 | ||||
-rwxr-xr-x | sim/bfin/configure | 15 | ||||
-rw-r--r-- | sim/bfin/configure.ac | 9 | ||||
-rw-r--r-- | sim/bfin/dv-eth_phy.c | 5 |
5 files changed, 35 insertions, 23 deletions
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 1376e6b..812c782 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -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 diff --git a/sim/bfin/config.in b/sim/bfin/config.in index 2b25645..4175dad 100644 --- a/sim/bfin/config.in +++ b/sim/bfin/config.in @@ -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 diff --git a/sim/bfin/configure b/sim/bfin/configure index a8c4639..fe1fc7c 100755 --- a/sim/bfin/configure +++ b/sim/bfin/configure @@ -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" diff --git a/sim/bfin/configure.ac b/sim/bfin/configure.ac index 1917c01..cda3ac9 100644 --- a/sim/bfin/configure.ac +++ b/sim/bfin/configure.ac @@ -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= diff --git a/sim/bfin/dv-eth_phy.c b/sim/bfin/dv-eth_phy.c index f7d7172..e42b213 100644 --- a/sim/bfin/dv-eth_phy.c +++ b/sim/bfin/dv-eth_phy.c @@ -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 |