commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r807963 - in /commons/sandbox/runtime/trunk/src/main/native: include/acr_port.h include/arch/windows/acr_arch_private.h srclib/regex/engine.c srclib/regex/regcomp.c srclib/regex/regex2.h srclib/regex/utils.h
Date Wed, 26 Aug 2009 11:22:25 GMT
Author: mturk
Date: Wed Aug 26 11:22:24 2009
New Revision: 807963

URL: http://svn.apache.org/viewvc?rev=807963&view=rev
Log:
Fix warnings on windows

Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
    commons/sandbox/runtime/trunk/src/main/native/srclib/regex/engine.c
    commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regcomp.c
    commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h
    commons/sandbox/runtime/trunk/src/main/native/srclib/regex/utils.h

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h?rev=807963&r1=807962&r2=807963&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h Wed Aug 26 11:22:24 2009
@@ -36,6 +36,11 @@
 size_t strlcpy(char *, const char *, size_t);
 #endif
 
+#if defined(ACR_WANT_ISBLANK)
+int isblank(int);
+#endif
+
+
 #if defined(ACR_WANT_FNMATCH)
 #define FNM_NOMATCH        1    /* Match failed. */
 #define FNM_NOSYS          2    /* Function not supported (unused). */

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h?rev=807963&r1=807962&r2=807963&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
(original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
Wed Aug 26 11:22:24 2009
@@ -83,6 +83,7 @@
 #define ACR_WANT_STRSIGNAL                  1
 #define ACR_WANT_STRLCAT                    1
 #define ACR_WANT_STRLCPY                    1
+#define ACR_WANT_ISBLANK                    1
 #define ACR_WANT_FNMATCH                    1
 
 

Modified: commons/sandbox/runtime/trunk/src/main/native/srclib/regex/engine.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/srclib/regex/engine.c?rev=807963&r1=807962&r2=807963&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/srclib/regex/engine.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/srclib/regex/engine.c Wed Aug 26 11:22:24
2009
@@ -188,7 +188,7 @@
 			STATETEARDOWN(m);
 			return(REG_ESPACE);
 		}
-		for (i = 1; i <= m->g->nsub; i++)
+		for (i = 1; i <= (int)m->g->nsub; i++)
 			m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
 		if (!g->backrefs && !(m->eflags&REG_BACKR)) {
 			NOTE("dissecting");
@@ -246,8 +246,8 @@
 	}
 	if (nmatch > 1) {
 		assert(m->pmatch != NULL);
-		for (i = 1; i < nmatch; i++)
-			if (i <= m->g->nsub)
+		for (i = 1; i < (int)nmatch; i++)
+			if (i <= (int)m->g->nsub)
 				pmatch[i] = m->pmatch[i];
 			else {
 				pmatch[i].rm_so = -1;

Modified: commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regcomp.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regcomp.c?rev=807963&r1=807962&r2=807963&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regcomp.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regcomp.c Wed Aug 26 11:22:24
2009
@@ -1077,7 +1077,7 @@
 static void
 freeset(struct parse *p, cset *cs)
 {
-	int i;
+	size_t i;
 	cset *top = &p->g->sets[p->g->ncsets];
 	size_t css = (size_t)p->g->csetsize;
 
@@ -1100,7 +1100,7 @@
 freezeset(struct parse *p, cset *cs)
 {
 	uch h = cs->hash;
-	int i;
+	size_t i;
 	cset *top = &p->g->sets[p->g->ncsets];
 	cset *cs2;
 	size_t css = (size_t)p->g->csetsize;
@@ -1130,7 +1130,7 @@
 static int			/* character; there is no "none" value */
 firstch(struct parse *p, cset *cs)
 {
-	int i;
+	size_t i;
 	size_t css = (size_t)p->g->csetsize;
 
 	for (i = 0; i < css; i++)
@@ -1146,7 +1146,7 @@
 static int
 nch(struct parse *p, cset *cs)
 {
-	int i;
+	size_t i;
 	size_t css = (size_t)p->g->csetsize;
 	int n = 0;
 

Modified: commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h?rev=807963&r1=807962&r2=807963&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/srclib/regex/regex2.h Wed Aug 26 11:22:24
2009
@@ -131,6 +131,7 @@
 	cat_t catspace[1];	/* actually [NC] */
 };
 
+#undef OUT
 /* misc utilities */
 #define	OUT	(CHAR_MAX+1)	/* a non-character value */
 #define	ISWORD(c)	(isalnum(c) || (c) == '_')

Modified: commons/sandbox/runtime/trunk/src/main/native/srclib/regex/utils.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/srclib/regex/utils.h?rev=807963&r1=807962&r2=807963&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/srclib/regex/utils.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/srclib/regex/utils.h Wed Aug 26 11:22:24
2009
@@ -15,7 +15,11 @@
  */
 
 /* utility definitions */
+#ifdef _POSIX2_RE_DUP_MAX
 #define	DUPMAX		_POSIX2_RE_DUP_MAX	/* xxx is this right? */
+#else
+#define	DUPMAX		255	                /* xxx is this right? */
+#endif
 #define	INFINITY	(DUPMAX + 1)
 #define	NC		(CHAR_MAX - CHAR_MIN + 1)
 typedef unsigned char uch;



Mime
View raw message