diff -Naur globus.orig/Security/gaa/gnu_regex.c globus/Security/gaa/gnu_regex.c
--- globus.orig/Security/gaa/gnu_regex.c	Tue Aug  1 20:44:41 2000
+++ globus/Security/gaa/gnu_regex.c	Fri Feb 15 14:30:45 2002
@@ -2271,7 +2271,7 @@
    exactly that if always used MAX_FAILURE_SPACE each time we failed.
    This is a variable only so users of regex can assign to it; we never
    change it ourselves.  */
-int re_max_failures = 2000;
+int gaa_regex_re_max_failures = 2000;
 
 typedef const unsigned char *fail_stack_elt_t;
 
@@ -2303,7 +2303,7 @@
   } while (0)
 
 
-/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
+/* Double the size of FAIL_STACK, up to approximately `gaa_regex_re_max_failures' items.
 
    Return 1 if succeeds, and 0 if either ran out of memory
    allocating space for it or it was already too large.  
@@ -2311,7 +2311,7 @@
    REGEX_REALLOCATE requires `destination' be declared.   */
 
 #define DOUBLE_FAIL_STACK(fail_stack)					\
-  ((fail_stack).size > re_max_failures * MAX_FAILURE_ITEMS		\
+  ((fail_stack).size > gaa_regex_re_max_failures * MAX_FAILURE_ITEMS		\
    ? 0									\
    : ((fail_stack).stack = (fail_stack_elt_t *)				\
         REGEX_REALLOCATE ((fail_stack).stack, 				\
@@ -2600,7 +2600,7 @@
         /* I guess the idea here is to simply not bother with a fastmap
            if a backreference is used, since it's too hard to figure out
            the fastmap for the corresponding group.  Setting
-           `can_be_null' stops `gaa_regex_gaa_regex_re_search_2' from using the fastmap, so
+           `can_be_null' stops `gaa_regex_re_search_2' from using the fastmap, so
            that is all we do.  */
 	case duplicate:
 	  bufp->can_be_null = 1;
@@ -2850,7 +2850,7 @@
 
 /* Searching routines.  */
 
-/* Like gaa_regex_gaa_regex_re_search_2, below, but only one string is specified, and
+/* Like gaa_regex_re_search_2, below, but only one string is specified, and
    doesn't let you say where to stop matching. */
 
 int
@@ -2860,7 +2860,7 @@
      int size, startpos, range;
      struct re_registers *regs;
 {
-  return gaa_regex_gaa_regex_re_search_2 (bufp, NULL, 0, string, size, startpos, range, 
+  return gaa_regex_re_search_2 (bufp, NULL, 0, string, size, startpos, range, 
 		      regs, size);
 }
 
@@ -2887,7 +2887,7 @@
    stack overflow).  */
 
 int
-gaa_regex_gaa_regex_re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
+gaa_regex_re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
      struct re_pattern_buffer *bufp;
      const char *string1, *string2;
      int size1, size2;
@@ -3000,7 +3000,7 @@
         }
     }
   return -1;
-} /* gaa_regex_gaa_regex_re_search_2 */
+} /* gaa_regex_re_search_2 */
 
 /* Declarations and macros for gaa_regex_gaa_regex_re_match_2.  */
 
diff -Naur globus.orig/Security/gaa/gnu_regex.c.in globus/Security/gaa/gnu_regex.c.in
--- globus.orig/Security/gaa/gnu_regex.c.in	Tue Aug  1 20:44:44 2000
+++ globus/Security/gaa/gnu_regex.c.in	Fri Feb 15 14:28:35 2002
@@ -880,7 +880,7 @@
 
 /* Make sure we have at least N more bytes of space in buffer.  */
 #define GET_BUFFER_SPACE(n)						\
-    while (b - bufp->buffer + (n) > bufp->allocated)			\
+    while (b - bufp->buffer + (signed) (n) > (signed) bufp->allocated)			\
       EXTEND_BUFFER ()
 
 /* Make sure we have one more byte of buffer space and then add C to it.  */
@@ -2233,7 +2233,7 @@
      char' -- the range is inclusive, so if `range_end' == 0xff
      (assuming 8-bit characters), we would otherwise go into an infinite
      loop, since all characters <= 0xff.  */
-  for (this_char = range_start; this_char <= range_end; this_char++)
+  for (this_char = range_start; (signed) this_char <= range_end; this_char++)
     {
       SET_LIST_BIT (TRANSLATE (this_char));
     }
@@ -2351,7 +2351,6 @@
 
 #define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code)	\
   do {									\
-    char *destination;							\
     /* Must be int, so when we don't save any registers, the arithmetic	\
        of 0 + -1 isn't done as unsigned.  */				\
     int this_reg;							\
@@ -2379,7 +2378,7 @@
     /* Push the info, starting with the registers.  */			\
     DEBUG_PRINT1 ("\n");						\
 									\
-    for (this_reg = lowest_active_reg; this_reg <= highest_active_reg;	\
+    for (this_reg = lowest_active_reg; this_reg <= (signed) highest_active_reg;	\
          this_reg++)							\
       {									\
 	DEBUG_PRINT2 ("  Pushing reg: %d\n", this_reg);			\
@@ -2498,7 +2497,7 @@
   low_reg = (unsigned) POP_FAILURE_ITEM ();				\
   DEBUG_PRINT2 ("  Popping  low active reg: %d\n", low_reg);		\
 									\
-  for (this_reg = high_reg; this_reg >= low_reg; this_reg--)		\
+  for (this_reg = high_reg; this_reg >= (signed) low_reg; this_reg--)	\
     {									\
       DEBUG_PRINT2 ("    Popping reg: %d\n", this_reg);			\
 									\
@@ -3310,7 +3309,7 @@
   /* Initialize subexpression text positions to -1 to mark ones that no
      start_memory/stop_memory has been seen for. Also initialize the
      register information struct.  */
-  for (mcnt = 1; mcnt < num_regs; mcnt++)
+  for (mcnt = 1; mcnt < (signed) num_regs; mcnt++)
     {
       regstart[mcnt] = regend[mcnt] 
         = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
@@ -3400,7 +3399,7 @@
                       
                       DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
                       
-                      for (mcnt = 1; mcnt < num_regs; mcnt++)
+                      for (mcnt = 1; mcnt < (signed) num_regs; mcnt++)
                         {
                           best_regstart[mcnt] = regstart[mcnt];
                           best_regend[mcnt] = regend[mcnt];
@@ -3424,7 +3423,7 @@
                   dend = ((d >= string1 && d <= end1)
 		           ? end_match_1 : end_match_2);
 
-		  for (mcnt = 1; mcnt < num_regs; mcnt++)
+		  for (mcnt = 1; mcnt < (signed) num_regs; mcnt++)
 		    {
 		      regstart[mcnt] = best_regstart[mcnt];
 		      regend[mcnt] = best_regend[mcnt];
@@ -3477,7 +3476,7 @@
               
               /* Go through the first `min (num_regs, regs->num_regs)'
                  registers, since that is all we initialized.  */
-	      for (mcnt = 1; mcnt < MIN (num_regs, regs->num_regs); mcnt++)
+	      for (mcnt = 1; mcnt < (signed) MIN (num_regs, regs->num_regs); mcnt++)
 		{
                   if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
                     regs->start[mcnt] = regs->end[mcnt] = -1;
@@ -3493,7 +3492,7 @@
                  we (re)allocated the registers, this is the case,
                  because we always allocate enough to have at least one
                  -1 at the end.  */
-              for (mcnt = num_regs; mcnt < regs->num_regs; mcnt++)
+              for (mcnt = num_regs; mcnt < (signed) regs->num_regs; mcnt++)
                 regs->start[mcnt] = regs->end[mcnt] = -1;
 	    } /* regs && !bufp->no_sub */
 
@@ -3757,7 +3756,7 @@
                       EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
                       
 		      /* Restore this and inner groups' (if any) registers.  */
-                      for (r = *p; r < *p + *(p + 1); r++)
+                      for (r = *p; r < (unsigned) (*p + *(p + 1)); r++)
                         {
                           regstart[r] = old_regstart[r];
 
@@ -4883,7 +4882,7 @@
   size_t msg_size;
 
   if (errcode < 0
-      || errcode >= (sizeof (re_error_msg) / sizeof (re_error_msg[0])))
+      || errcode >= (signed) (sizeof (re_error_msg) / sizeof (re_error_msg[0])))
     /* Only error codes returned by the rest of the code should be passed 
        to this routine.  If we are given anything else, or if other regex
        code generates an invalid error code, then the program has a bug.
diff -Naur globus.orig/Security/gaa/gnu_regex.h globus/Security/gaa/gnu_regex.h
--- globus.orig/Security/gaa/gnu_regex.h	Tue Aug  1 20:44:41 2000
+++ globus/Security/gaa/gnu_regex.h	Fri Feb 15 14:30:45 2002
@@ -312,7 +312,7 @@
   size_t re_nsub;
 
         /* Zero if this pattern cannot match the empty string, one else.
-           Well, in truth it's used only in `gaa_regex_gaa_regex_re_search_2', to see
+           Well, in truth it's used only in `gaa_regex_re_search_2', to see
            whether or not we should use the fastmap, so we don't set
            this absolutely perfectly; see `gaa_regex_gaa_regex_re_compile_fastmap' (the
            `duplicate' case).  */
@@ -434,7 +434,7 @@
 
 /* Like `gaa_regex_re_search', but search in the concatenation of STRING1 and
    STRING2.  Also, stop searching at index START + STOP.  */
-extern int gaa_regex_gaa_regex_re_search_2
+extern int gaa_regex_re_search_2
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
              int length1, const char *string2, int length2,
              int start, int range, struct re_registers *regs, int stop));
@@ -447,7 +447,7 @@
              int length, int start, struct re_registers *regs));
 
 
-/* Relates to `gaa_regex_re_match' as `gaa_regex_gaa_regex_re_search_2' relates to `gaa_regex_re_search'.  */
+/* Relates to `gaa_regex_re_match' as `gaa_regex_re_search_2' relates to `gaa_regex_re_search'.  */
 extern int gaa_regex_gaa_regex_re_match_2 
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
              int length1, const char *string2, int length2,
diff -Naur globus.orig/Security/gaa/make_gnu_regex.sh globus/Security/gaa/make_gnu_regex.sh
--- globus.orig/Security/gaa/make_gnu_regex.sh	Tue Aug  1 20:44:44 2000
+++ globus/Security/gaa/make_gnu_regex.sh	Fri Feb 15 14:30:40 2002
@@ -81,12 +81,13 @@
 s/print_partial_compiled_pattern/gaa_regex_print_partial_compiled_pattern/g
 s/print_compiled_pattern/gaa_regex_print_compiled_pattern/g
 s/print_double_string/gaa_regex_print_double_string/g
+s/re_max_failures/gaa_regex_re_max_failures/g
 s/re_set_syntax/gaa_regex_re_set_syntax/g
 s/regex_compile/gaa_regex_regex_compile/g
 s/re_compile_fastmap/gaa_regex_re_compile_fastmap/g
 s/re_set_registers/gaa_regex_re_set_registers/g
 s/re_search/gaa_regex_re_search/g
-s/re_search_2/gaa_regex_re_search_2/g
+#s/re_search_2/gaa_regex_re_search_2/g
 s/re_match/gaa_regex_re_match/g
 s/re_match_2/gaa_regex_re_match_2/g
 s/re_compile_pattern/gaa_regex_re_compile_pattern/g
