Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-05-04 08:30:37 +0400
committerChristopher Faylor <me@cgf.cx>2009-05-04 08:30:37 +0400
commitb7a15524404ee316e205a26c214ca8d3f04f11a3 (patch)
tree8f8a27b5ca566d92d4b14ab9f482adca9c762489 /winsup
parentb65ec404a7aa5e036a7d4de415701be7a7efd5fc (diff)
* libc/minires.c (scanline): Accommodate ctype changes which disallow use of an
unadorned char argument to is* macros. * regex/regcomp.c: Ditto, throughout. * regex/regex2.h (ISWORD): Ditto.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/libc/minires.c4
-rw-r--r--winsup/cygwin/regex/regcomp.c14
-rw-r--r--winsup/cygwin/regex/regex2.h2
4 files changed, 17 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4a6ba7586..b63c6cf8c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * libc/minires.c (scanline): Accommodate ctype changes which disallow
+ use of an unadorned char argument to is* macros.
+ * regex/regcomp.c: Ditto, throughout.
+ * regex/regex2.h (ISWORD): Ditto.
+
2009-05-03 Christopher Faylor <me+cygwin@cgf.cx>
* fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
diff --git a/winsup/cygwin/libc/minires.c b/winsup/cygwin/libc/minires.c
index 606c05dee..af7f59f5d 100644
--- a/winsup/cygwin/libc/minires.c
+++ b/winsup/cygwin/libc/minires.c
@@ -43,11 +43,11 @@ static int scanline(char * in, char **list, int * sizes, int maxnum)
int i;
char * startp;
for (i = 0; i < maxnum; i++) {
- while((*in) && (isspace(*in) || *in == ',')) in++;
+ while((*in) && (isspace((unsigned)*in) || *in == ',')) in++;
if (*in == 0)
break;
startp = in++;
- while((*in) && !isspace(*in) && *in != ',') in++;
+ while((*in) && !isspace((unsigned)*in) && *in != ',') in++;
list[i] = startp;
sizes[i] = in - startp + 1;
if (*in)
diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c
index 580c70328..db83bbcbf 100644
--- a/winsup/cygwin/regex/regcomp.c
+++ b/winsup/cygwin/regex/regcomp.c
@@ -311,7 +311,7 @@ register struct parse *p;
ordinary(p, c);
break;
case '{': /* okay as ordinary except if digit follows */
- REQUIRE(!MORE() || !isdigit(PEEK()), REG_BADRPT);
+ REQUIRE(!MORE() || !isdigit((unsigned)PEEK()), REG_BADRPT);
/* FALLTHROUGH */
default:
ordinary(p, c);
@@ -323,7 +323,7 @@ register struct parse *p;
c = PEEK();
/* we call { a repetition if followed by a digit */
if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit(PEEK2())) ))
+ (c == '{' && MORE2() && isdigit((unsigned)PEEK2())) ))
return; /* no repetition, we're done */
NEXT();
@@ -352,7 +352,7 @@ register struct parse *p;
case '{':
count = p_count(p);
if (EAT(',')) {
- if (isdigit(PEEK())) {
+ if (isdigit((unsigned)PEEK())) {
count2 = p_count(p);
REQUIRE(count <= count2, REG_BADBR);
} else /* single number with comma */
@@ -373,7 +373,7 @@ register struct parse *p;
return;
c = PEEK();
if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit(PEEK2())) ) )
+ (c == '{' && MORE2() && isdigit((unsigned)PEEK2())) ) )
return;
SETERROR(REG_BADRPT);
}
@@ -530,7 +530,7 @@ int starordinary; /* is a leading * an ordinary character? */
} else if (EATTWO('\\', '{')) {
count = p_count(p);
if (EAT(',')) {
- if (MORE() && isdigit(PEEK())) {
+ if (MORE() && isdigit((unsigned)PEEK())) {
count2 = p_count(p);
REQUIRE(count <= count2, REG_BADBR);
} else /* single number with comma */
@@ -561,7 +561,7 @@ register struct parse *p;
register int count = 0;
register int ndigits = 0;
- while (MORE() && isdigit(PEEK()) && count <= DUPMAX) {
+ while (MORE() && isdigit((unsigned)PEEK()) && count <= DUPMAX) {
count = count*10 + (GETNEXT() - '0');
ndigits++;
}
@@ -728,7 +728,7 @@ register cset *cs;
register const char *u;
register char c;
- while (MORE() && isalpha(PEEK()))
+ while (MORE() && isalpha((unsigned)PEEK()))
NEXT();
len = p->next - sp;
for (cp = cclasses; cp->name != NULL; cp++)
diff --git a/winsup/cygwin/regex/regex2.h b/winsup/cygwin/regex/regex2.h
index 8c103fa54..be8b2f5a7 100644
--- a/winsup/cygwin/regex/regex2.h
+++ b/winsup/cygwin/regex/regex2.h
@@ -131,4 +131,4 @@ struct re_guts {
/* misc utilities */
#define OUT (CHAR_MAX+1) /* a non-character value */
-#define ISWORD(c) (isalnum(c) || (c) == '_')
+#define ISWORD(c) (isalnum((unsigned)c) || (c) == '_')