push common mingw/cygwin/stropts checks to the common sysdep.h header

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1744 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent b8ccf13c16
commit ca2f6421c8

@ -5,6 +5,11 @@
* configure.ac: Unify calls to AC_CHECK_FUNCS.
* src/apps/jtag/jtag.c, src/bfin/bfin.c, src/svf/svf.c,
src/tap/parport/ppdev.c, src/tap/usbconn/libftd2xx.c,
src/tap/usbconn/libftdi.c, src/tap/usbconn/libusb.c, sysdep.h: Unify
system checks in the common sysdep.h header.
2010-01-28 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_bfin.c: Replace one-insn-a-file option with dynamic instruction

@ -86,11 +86,7 @@ jtag_create_jtagdir (void)
strcat (jdir, JTAGDIR);
/* Create the directory if it doesn't exists. */
#ifdef __MINGW32__
r = mkdir (jdir);
#else
r = mkdir (jdir, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
#endif
if (r == -1)
{
if (errno == EEXIST)

@ -16,7 +16,7 @@
* 02111-1307, USA.
*/
#include "sysdep.h"
#include <sysdep.h>
#include <assert.h>
#include <stdbool.h>
@ -46,11 +46,6 @@ const char *scans[] = {
#define SWRST 0xffc00100
#ifdef __MINGW32__
struct timespec { unsigned long tv_sec, tv_nsec; };
#define nanosleep(req, rem) usleep((req)->tv_sec * 1000 * 1000 + (req)->tv_nsec / 1000)
#endif
int bfin_check_emuready = 1;
static struct timespec bfin_emu_wait_ts = {0, 5000000};

@ -49,18 +49,12 @@
#include <urjtag/data_register.h>
#include <urjtag/cmd.h>
#include <urjtag/svf.h>
#if defined __MINGW32__ || ! defined HAVE_SIGACTION_SA_ONESHOT
#include <urjtag/fclock.h>
#endif
#include "svf.h"
#include "svf_bison.h"
#ifdef __MINGW32__
#include <urjtag/fclock.h>
#endif
/* CHAIN_CLOCK defines the clock function of the chain API that's
deployed for non-timing critical, deferable "chain clocking".
@ -635,7 +629,7 @@ urj_svf_hxr (enum generic_irdr_coding ir_dr, struct ths_params *params)
return URJ_STATUS_OK;
}
#if ! (defined __MINGW32__ || ! defined HAVE_SIGACTION_SA_ONESHOT)
#ifdef HAVE_SIGACTION_SA_ONESHOT
static int max_time_reached;
static void
sigalrm_handler (int signal)
@ -725,7 +719,7 @@ urj_svf_runtest (urj_chain_t *chain, urj_svf_parser_priv_t *priv,
urj_svf_goto_state (chain, priv->runtest_run_state);
#if defined __MINGW32__ || ! defined HAVE_SIGACTION_SA_ONESHOT
#ifndef HAVE_SIGACTION_SA_ONESHOT
if (params->max_time > 0.0)
{
double maxt = urj_lib_frealtime () + params->max_time;

@ -27,10 +27,8 @@
#include <stdio.h>
#include <fcntl.h>
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/ppdev.h>
#include <linux/ioctl.h>

@ -25,14 +25,8 @@
#include <sysdep.h>
#include <fcntl.h>
#if __CYGWIN__ || __MINGW32__
#include <windows.h>
#endif
#include <stdio.h>
#include <string.h>
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>

@ -25,14 +25,8 @@
#include <sysdep.h>
#include <fcntl.h>
#if __CYGWIN__ || __MINGW32__
#include <windows.h>
#endif
#include <stdio.h>
#include <string.h>
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>

@ -27,14 +27,8 @@
#include <sysdep.h>
#include <fcntl.h>
#if __CYGWIN__ || __MINGW32__
#include <windows.h>
#endif
#include <stdio.h>
#include <string.h>
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>

@ -43,6 +43,10 @@
#define ngettext(s,p,n) s
#endif
#if __CYGWIN__
#include <windows.h>
#endif
#ifdef __MINGW32__
/* Diff versions of mingw used slightly different names */
#define NO_W32_PSEUDO_MODIFIERS
@ -53,10 +57,19 @@
/* Microsoft uses a different swprintf() than ISO C requires */
#include <stdio.h>
#define swprintf _snwprintf
/* No perms to give to mkdir */
#include <io.h>
#define mkdir(path, mode) mkdir(path)
#endif
#ifndef HAVE_USLEEP
int usleep (long unsigned usec);
#endif
#ifndef HAVE_NANOSLEEP
#include <unistd.h>
struct timespec { unsigned long tv_sec, tv_nsec; };
#define nanosleep(req, rem) usleep((req)->tv_sec * 1000 * 1000 + (req)->tv_nsec / 1000)
#endif
#endif /* SYSDEP_H */

Loading…
Cancel
Save