+2011-03-17 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (AC_CHECK_FUNCS): Check for kill and pread.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * interp.c (bfin_syscall): Check for HAVE_{KILL,PREAD} before using
+ kill or pread.
+
2011-03-15 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (dv-bfin_gpio.o): New target.
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `kill' function. */
+#undef HAVE_KILL
+
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
+/* Define to 1 if you have the `pread' function. */
+#undef HAVE_PREAD
+
/* Define to 1 if you have the `setgid' function. */
#undef HAVE_SETGID
fi
-for ac_func in getuid getgid geteuid getegid setuid setgid mmap munmap
+for ac_func in getuid getgid geteuid getegid setuid setgid mmap munmap kill pread
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
eth_phy \
)
-AC_CHECK_FUNCS([getuid getgid geteuid getegid setuid setgid mmap munmap])
+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])
BFIN_SIM_EXTRA_OBJS=
sc.errcode = TARGET_ENOSYS;
else
{
+#ifdef HAVE_PREAD
char *data = xmalloc (sc.arg2);
/* XXX: Should add a cb->pread. */
sc.errcode = TARGET_EINVAL;
free (data);
+#else
+ sc.errcode = TARGET_ENOSYS;
+#endif
}
if (sc.errcode)
}
else
{
+#ifdef HAVE_KILL
sc.result = kill (sc.arg1, sc.arg2);
goto sys_finish;
+#else
+ sc.result = -1;
+ sc.errcode = TARGET_ENOSYS;
+#endif
}
break;