Cleanup Cygwin builds.

* windows/Makefile.am (loaddrv_LDFLAGS): remove, the -mno-cygwin
flag is supposed to be set in CFLAGS by ./configure
* configure.ac: add a check for the presence of usleep(), add a
check whether the linker accepts -static
* avrdude.h: protect prototype for usleep by !defined(HAVE_USLEEP)
* ppwin.c (usleep): protect by !defined(HAVE_USLEEP)
* main.c: silence "array subscript of type char" compiler warnings
by casting all arguments to tolower()/toupper() and isspace()/
isdigit()/ispunct() to "int"
* butterfly.c: (Dito.)
* avr910.c: (Dito.)




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@936 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2010-01-22 16:40:17 +00:00
parent 358d351aff
commit 8ffc939aff
9 changed files with 59 additions and 32 deletions

14
term.c
View File

@@ -125,12 +125,12 @@ static int nexttok(char * buf, char ** tok, char ** next)
char * q, * n;
q = buf;
while (isspace(*q))
while (isspace((int)*q))
q++;
/* isolate first token */
n = q+1;
while (*n && !isspace(*n))
while (*n && !isspace((int)*n))
n++;
if (*n) {
@@ -139,7 +139,7 @@ static int nexttok(char * buf, char ** tok, char ** next)
}
/* find start of next token */
while (isspace(*n))
while (isspace((int)*n))
n++;
*tok = q;
@@ -189,9 +189,9 @@ static int chardump_line(char * buffer, unsigned char * p, int n, int pad)
for (i=0; i<n; i++) {
memcpy(b, p, n);
buffer[i] = '.';
if (isalpha(b[i]) || isdigit(b[i]) || ispunct(b[i]))
if (isalpha((int)(b[i])) || isdigit((int)(b[i])) || ispunct((int)(b[i])))
buffer[i] = b[i];
else if (isspace(b[i]))
else if (isspace((int)(b[i])))
buffer[i] = ' ';
}
@@ -909,7 +909,7 @@ int terminal_mode(PROGRAMMER * pgm, struct avrpart * p)
* find the start of the command, skipping any white space
*/
q = cmdbuf;
while (*q && isspace(*q))
while (*q && isspace((int)*q))
q++;
/* skip blank lines and comments */