From 98bf7f38695dea2dbd31dec9e47e769575f8ce6e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 14 Jun 2010 22:53:22 +0000 Subject: [PATCH] cmd_bfin: include sys/wait.h for wait related defines git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1785 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 5 +++++ urjtag/configure.ac | 5 ++++- urjtag/src/cmd/cmd_bfin.c | 7 +++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index b9a0e50f..9cbbeb84 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -2,6 +2,11 @@ * configure.ac: Drop stropts.h check since parport code no longer uses it. + * configure.ac: Check for sys/wait.h usability. + * src/cmd/cmd_bfin.c: Include sys/wait.h when available since we use macros + from it, and change the mingw check to key off this header instead to make + things a bit more portable. + 2010-05-19 Arnim Laeuger * src/flash/amd.c, doc/UrJTAG.txt: [ 2996919 ] Support for MX29LV320C diff --git a/urjtag/configure.ac b/urjtag/configure.ac index 2eb9cf02..c1e2edac 100644 --- a/urjtag/configure.ac +++ b/urjtag/configure.ac @@ -136,7 +136,10 @@ int sa_flags = SA_ONESHOT; AC_CHECK_HEADERS([linux/ppdev.h], [HAVE_LINUX_PPDEV_H="yes"]) AC_CHECK_HEADERS([dev/ppbus/ppi.h], [HAVE_DEV_PPBUS_PPI_H="yes"]) -AC_CHECK_HEADERS(wchar.h) +AC_CHECK_HEADERS(m4_flatten([ + wchar.h + sys/wait.h +])) VL_LIB_READLINE diff --git a/urjtag/src/cmd/cmd_bfin.c b/urjtag/src/cmd/cmd_bfin.c index ede3ca09..15b67d17 100644 --- a/urjtag/src/cmd/cmd_bfin.c +++ b/urjtag/src/cmd/cmd_bfin.c @@ -26,6 +26,9 @@ #include #include #include +#ifdef HAVE_SYS_WAIT_H +#include +#endif #include #include @@ -245,9 +248,9 @@ cmd_bfin_run (urj_chain_t *chain, char *params[]) } else { -#ifdef __MINGW32__ +#ifndef HAVE_SYS_WAIT_H urj_error_set (URJ_ERROR_BFIN, - "Sorry, dynamic code not available in windows"); + "Sorry, dynamic code not available for your platform"); goto execute_cleanup; #else unsigned char raw_insn[4];