move Windows stub functions to the global sysdep.h header rather than duplicating everywhere

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1204 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 17 years ago
parent a71df446b6
commit 733722108d

@ -7,6 +7,9 @@
non-POSIX ports (like mingw).
* src/cmd/include.c (cmd_include_or_script_run): Add handling of absolute
paths under Windows that take the form <letter>:\.
* sysdep.h, src/flash/amd.c, src/flash/amd_flash.c, src/jtag.c: Move some
Windows stub functions to sysdep.h so we don't have to redeclare them in
every single file and so we don't trigger future bitrot.
2008-05-04 Mike Frysinger <vapier@gentoo.org>

@ -43,11 +43,6 @@
#include <flash.h>
#include <bus.h>
#ifdef __MINGW32__
#include <windows.h>
#define usleep(x) Sleep(x/1E3)
#endif
static int dbg = 0;
static int amd_flash_erase_block( cfi_array_t *cfi_array, uint32_t adr );

@ -39,11 +39,6 @@
#include <flash.h>
#include <bus.h>
#ifdef __MINGW32__
#include <windows.h>
#define usleep(x) Sleep(x/1E3)
#endif
//write specific
#define AMD_SECTOR_PROTECTED

@ -290,13 +290,11 @@ main( int argc, char *const argv[] )
jtag_argv0 = argv[0];
#ifndef __MINGW32__
if(geteuid()==0 && getuid()!=0)
{
printf (_("'%s' must not be run suid root!\n"), "jtag");
return(-1);
}
#endif
#ifdef ENABLE_NLS
/* l10n support */

@ -43,4 +43,12 @@
#define ngettext(s,p,n) s
#endif
#ifdef __MINGW32__
#define _NO_W32_PSEUDO_MODIFIERS
#include <windows.h>
#define geteuid() 0
#define getuid() 0
#define usleep(x) Sleep(x/1E3)
#endif
#endif /* SYSDEP_H */

Loading…
Cancel
Save