$OpenBSD$
--- sope-appserver/NGObjWeb/NGHttp/NGHttpHeaderFields.m.orig	Fri May 11 14:36:17 2012
+++ sope-appserver/NGObjWeb/NGHttp/NGHttpHeaderFields.m	Fri May 11 14:38:08 2012
@@ -145,7 +145,7 @@
 
 - (NSString *)stringValue {
   NSMutableString *str = [[NSMutableString allocWithZone:[self zone]] init];
-  int  cnt, count = [self->charsets count];
+  NSUInteger  cnt, count = [self->charsets count];
 
   for (cnt = 0; cnt < count; cnt++) {
     if (cnt != 0) [str appendString:@","];
@@ -201,7 +201,7 @@
 
 - (NSString *)stringValue {
   NSMutableString *str;
-  int  cnt, count;
+  NSUInteger      cnt, count;
 
   str = [[NSMutableString allocWithZone:[self zone]] init];
   count = [self->types count];
@@ -260,7 +260,7 @@
 
 - (NSString *)stringValue {
   NSMutableString *str = [[NSMutableString allocWithZone:[self zone]] init];
-  int  cnt, count = [self->languages count];
+  NSUInteger      cnt, count = [self->languages count];
 
   for (cnt = 0; cnt < count; cnt++) {
     if (cnt != 0) [str appendString:@", "];
@@ -283,8 +283,8 @@ static void _parseUserAgent(NGHttpUserAgent *self) {
 
   if ([self->value hasPrefix:@"Mozilla"]) {
     // Mozilla Browser or compatible
-    NSRange r;
-    int idx, av, iv;
+    NSRange    r;
+    NSUInteger idx, av, iv;
 
     r = [self->value rangeOfString:@"/"];
     idx = r.location;
@@ -299,7 +299,7 @@ static void _parseUserAgent(NGHttpUserAgent *self) {
 
       self->browser = @"Mozilla";
 
-      sscanf([tmp cString], "%i.%i", &av, &iv);
+      sscanf([tmp cString], "%"PRIuPTR".%"PRIuPTR"", &av, &iv);
       self->majorVersion = av;
       self->minorVersion = iv;
 
@@ -310,7 +310,7 @@ static void _parseUserAgent(NGHttpUserAgent *self) {
           tmp = [self->value substringFromIndex:(idx + 5)];
           self->browser = @"MSIE";
 
-          sscanf([tmp cString], "%i.%i", &av, &iv);
+          sscanf([tmp cString], "%"PRIuPTR".%"PRIuPTR"", &av, &iv);
           self->majorVersion = av;
           self->minorVersion = iv;
         }
@@ -553,8 +553,8 @@ static void _parseUserAgent(NGHttpUserAgent *self) {
     NSData *data = [_credentials dataByDecodingBase64];
 
     if (data) {
-      char *str   = (char *)[data bytes];
-      int  len    = [data length];
+      char *str = (char *)[data bytes];
+      NSUInteger len = [data length];
       char *start = str;
 
       while ((*str != '\0') && (*str != ':') && (len > 0)) {
$OpenBSD$
--- sope-appserver/WOExtensions/WOTabPanel.m.orig	Fri May 11 15:00:45 2012
+++ sope-appserver/WOExtensions/WOTabPanel.m	Fri May 11 15:04:27 2012
@@ -82,7 +82,7 @@
   {
     WOComponent *sComponent;
     NSArray     *ttabs;
-    unsigned    i;
+    NSUInteger  i;
     
     sComponent = [_ctx component];
     ttabs      = [self->tabs valueInComponent:sComponent];
@@ -118,17 +118,17 @@
   if ([section isEqualToString:@"tab"]) {
     WOComponent *sComponent;
     NSArray *ttabs;
-    int idx;
+    NSUInteger idx;
     
     [_ctx consumeElementID]; // consume 'tab'
     
     sComponent = [_ctx component];
     ttabs = [self->tabs valueInComponent:sComponent];
 
-    idx = [[_ctx currentElementID] intValue];
+    idx = [[_ctx currentElementID] unsignedIntegerValue];
     [_ctx consumeElementID]; // consume index
 
-    if (idx >= (int)[ttabs count]) {
+    if (idx >= [ttabs count]) {
       /* index out of range */
       idx = 0;
     }
@@ -156,7 +156,7 @@
   WOComponent *sComponent;
   NSArray     *ttabs;
   BOOL        isInForm;
-  unsigned    i, selIdx;
+  NSUInteger  i, selIdx;
   NSString    *selColor, *unselColor, *s;
   
   if ([_ctx isRenderingDisabled]) {
$OpenBSD$
--- sope-core/NGExtensions/NGCalendarDateRange.m.orig	Fri May 11 14:06:10 2012
+++ sope-core/NGExtensions/NGCalendarDateRange.m	Fri May 11 14:08:30 2012
@@ -217,7 +217,7 @@
   andEndDateKey:(NSString *)e
 {
   NSMutableArray *ma;
-  unsigned i, count;
+  NSUInteger     i, count;
   
   count = [self count];
   ma    = [NSMutableArray arrayWithCapacity:count];
@@ -243,7 +243,7 @@
 }
 
 - (BOOL)dateRangeArrayContainsDate:(NSCalendarDate *)_date {
-  unsigned i, count;
+  NSUInteger i, count;
   
   if (_date == nil) 
     return NO;
@@ -256,8 +256,8 @@
   }
   return NO;
 }
-- (unsigned)indexOfFirstIntersectingDateRange:(NGCalendarDateRange *)_range {
-  unsigned i, count;
+- (NSUInteger)indexOfFirstIntersectingDateRange:(NGCalendarDateRange *)_range {
+  NSUInteger i, count;
   
   if (_range == nil)
     return NO;
@@ -276,7 +276,7 @@
   // TODO: this is a candidate for unit testing ...
   // TODO: pretty "slow" algorithm, improve
   NSMutableArray *ma;
-  unsigned i, count;
+  NSUInteger     i, count;
   
   count = [self count];
   if (count < 2)
@@ -289,7 +289,7 @@
     NGCalendarDateRange *rangeToAdd;
     NGCalendarDateRange *availRange;
     NGCalendarDateRange *newRange;
-    unsigned idx;
+    NSUInteger idx;
     
     rangeToAdd = [self objectAtIndex:i];
     idx = [ma indexOfFirstIntersectingDateRange:rangeToAdd];
$OpenBSD$
--- sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h.orig	Fri May 11 14:08:47 2012
+++ sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h	Fri May 11 14:09:18 2012
@@ -67,7 +67,7 @@
 - (NSArray *)arrayByCreatingDateRangesFromObjectsWithStartDateKey:(NSString *)s
   andEndDateKey:(NSString *)e;
 
-- (unsigned)indexOfFirstIntersectingDateRange:(NGCalendarDateRange *)_range;
+- (NSUInteger)indexOfFirstIntersectingDateRange:(NGCalendarDateRange *)_range;
 - (BOOL)dateRangeArrayContainsDate:(NSCalendarDate *)_date;
 
 - (NSArray *)arrayByCompactingContainedDateRanges;
$OpenBSD$
--- sope-gdl1/PostgreSQL/PGResultSet.m.orig	Fri May 11 16:12:08 2012
+++ sope-gdl1/PostgreSQL/PGResultSet.m	Fri May 11 16:12:29 2012
@@ -98,12 +98,7 @@
 }
 
 - (int)indexOfFieldNamed:(NSString *)_name {
-#if LIB_FOUNDATION_LIBRARY
-  // TBD: might be wrong even in this case?
-  return PQfnumber(self->results, [_name cString]);
-#else
   return PQfnumber(self->results, [_name UTF8String]);
-#endif
 }
 
 - (int)fieldSizeAtIndex:(unsigned int)_idx {
$OpenBSD$
--- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m.orig	Fri May 11 15:59:50 2012
+++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.m	Fri May 11 16:04:23 2012
@@ -394,21 +394,29 @@ static int openConnectionCount = 0;
   
   for (cnt = 0; cnt < attrCount; cnt++) {
     EOAttribute *attribute;
+#ifndef GDL_USE_PQFNUMBER_INDEX
+    NSUInteger  res;
+#endif
     
     attribute = [_attributes objectAtIndex:cnt];
 #if GDL_USE_PQFNUMBER_INDEX
     self->fieldIndices[cnt] = 
       [self->resultSet indexOfFieldNamed:[attribute columnName]];
+    if (self->fieldIndices[cnt] == -1) {
+      [PostgreSQL72Exception raiseWithFormat:
+                               @"attribute %@ not covered by query",
+                             attribute];
+    }
 #else
-    self->fieldIndices[cnt] = 
-      [fieldNames indexOfObject:[attribute columnName]];
-#endif
+    res = [fieldNames indexOfObject:[attribute columnName]];
     
-    if (self->fieldIndices[cnt] == NSNotFound) {
+    if (res == NSNotFound) {
       [PostgreSQL72Exception raiseWithFormat:
                                @"attribute %@ not covered by query",
                              attribute];
     }
+    self->fieldIndices[cnt] = (int)res;
+#endif
     [fieldNames replaceObjectAtIndex:self->fieldIndices[cnt] withObject:null];
   }
   [fieldNames release]; fieldNames = nil;
$OpenBSD$
--- sope-xml/DOM/DOMNodeWithChildren.m.orig	Fri May 11 13:40:52 2012
+++ sope-xml/DOM/DOMNodeWithChildren.m	Fri May 11 13:42:31 2012
@@ -59,7 +59,7 @@
     : nil;
 }
 - (id<NSObject,DOMNode>)lastChild {
-  unsigned count;
+  NSUInteger count;
 
   return (count = [self->childNodes count]) > 0 
     ? [self->childNodes objectAtIndex:(count - 1)]
@@ -69,7 +69,7 @@
 /* modification */
 
 - (id<NSObject,DOMNode>)removeChild:(id<NSObject,DOMNode>)_node {
-  unsigned idx;
+  NSUInteger idx;
 
   if (self->childNodes == nil)
     /* this node has no childnodes ! */
@@ -93,7 +93,7 @@
   
   if ([_node nodeType] == DOM_DOCUMENT_FRAGMENT_NODE) {
     id             fragNodes;
-    unsigned       i, count;
+    NSUInteger     i, count;
     NSMutableArray *cache;
     
     fragNodes = [_node childNodes];
@@ -133,7 +133,7 @@
 /* sibling navigation */
 
 - (id)_domNodeBeforeNode:(id)_node {
-  unsigned idx;
+  NSUInteger idx;
   
   if ((idx = [self->childNodes indexOfObject:_node]) == NSNotFound)
     /* given node isn't a child of this node */
@@ -145,7 +145,7 @@
   return [self->childNodes objectAtIndex:(idx - 1)];
 }
 - (id)_domNodeAfterNode:(id)_node {
-  unsigned idx, count;
+  NSUInteger idx, count;
 
   if ((count = [self->childNodes count]) == 0)
     /* this node has no children at all .. */
$OpenBSD$
--- sope-xml/STXSaxDriver/ExtraSTX/StructuredText.h.orig	Fri May 11 14:03:41 2012
+++ sope-xml/STXSaxDriver/ExtraSTX/StructuredText.h	Fri May 11 14:05:24 2012
@@ -62,7 +62,7 @@
 
 - (void)parse;
 
-- (int)lineType:(StructuredLine *)_line;
+- (NSUInteger)lineType:(StructuredLine *)_line;
 
 - (void)separateIntoBlocks;
 - (void)adjustLineLevels;
@@ -78,7 +78,7 @@
 - (StructuredTextLiteralBlock *)buildLiteralBlock;
 - (StructuredTextList *)buildList;
 
-- (int)listItemTypology:(StructuredLine *)_line;
+- (NSUInteger)listItemTypology:(StructuredLine *)_line;
 
 @end
 
$OpenBSD$
--- sope-xml/STXSaxDriver/ExtraSTX/StructuredText.m.orig	Fri May 11 13:57:49 2012
+++ sope-xml/STXSaxDriver/ExtraSTX/StructuredText.m	Fri May 11 14:05:12 2012
@@ -105,7 +105,7 @@
   NSString	  *text, *currentLine, *trimmedLine;
   NSMutableString *buf;
   NSCharacterSet  *set;
-  int i, count;
+  NSUInteger      i, count;
   
   set   = [NSCharacterSet characterSetWithCharactersInString:@"\r"];
   buf   = [NSMutableString stringWithCapacity:256];
@@ -278,7 +278,7 @@
   [objectStack release];
 }
 
-- (int)lineType:(StructuredLine *)aLine {
+- (NSUInteger)lineType:(StructuredLine *)aLine {
   if ([self checkForListItem:aLine])
     return StructuredTextParserLine_List;
   
@@ -357,7 +357,7 @@
   
   if ([[text stringByTrimmingCharactersInSet:
 	       [NSCharacterSet whitespaceCharacterSet]] hasSuffix:@"::"]) {
-    int length;
+    NSUInteger length;
 
     length = [text length];
     text   = [text substringToIndex:length - 2];
@@ -384,7 +384,7 @@
   StructuredLine	 *line, *prevLine = nil;
   StructuredTextListItem *item = nil;
   StructuredStack	 *paragraphs;
-  int type;
+  NSUInteger		 type;
   
   result     = nil;
   paragraphs = [self paragraphs];
@@ -428,7 +428,7 @@
       break;
     case StructuredTextList_DEFINITION: {
       NSArray *components;
-      int i, count;
+      NSUInteger i, count;
 
       components = [text componentsSeparatedByString:@" -- "];
       count = [components count];
@@ -477,10 +477,10 @@
   return [result autorelease];
 }
 
-- (int)listItemTypology:(StructuredLine *)aLine {
-  NSString *text;
-  int      type = NSNotFound;
-  int      i, h, length;
+- (NSUInteger)listItemTypology:(StructuredLine *)aLine {
+  NSString   *text;
+  NSUInteger type = NSNotFound;
+  NSUInteger i, h, length;
   NSRange  range;
 
   text = [aLine text];
$OpenBSD$
--- sope-xml/SaxObjC/SaxAttributeList.m.orig	Fri May 11 13:33:18 2012
+++ sope-xml/SaxObjC/SaxAttributeList.m	Fri May 11 13:36:37 2012
@@ -33,7 +33,7 @@
 }
 - (id)initWithAttributeList:(id<SaxAttributeList>)_attrList {
   if ((self = [self init])) {
-    unsigned i;
+    NSUInteger i;
 
     for (i = 0; i < [_attrList count]; i++) {
       [self->names  addObject:[_attrList nameAtIndex:i]];
@@ -46,7 +46,7 @@
 
 - (id)initWithAttributes:(id<SaxAttributes>)_attrList {
   if ((self = [self init])) {
-    int i, c;
+    NSUInteger i, c;
 
     for (i = 0, c = [_attrList count]; i < c; i++) {
       [self->names  addObject:[_attrList rawNameAtIndex:i]];
@@ -67,7 +67,7 @@
 /* modify operations */
 
 - (void)setAttributeList:(id<SaxAttributeList>)_attrList {
-  unsigned i;
+  NSUInteger i;
 
   [self clear];
   
@@ -95,7 +95,7 @@
 }
 
 - (void)removeAttribute:(NSString *)_name {
-  int idx;
+  NSUInteger idx;
 
   if ((idx = [self->names indexOfObject:_name]) == NSNotFound)
     return;
@@ -118,7 +118,7 @@
 }
 
 - (NSString *)typeForName:(NSString *)_name {
-  int i;
+  NSUInteger i;
 
   if ((i = [self->names indexOfObject:_name]) == NSNotFound)
     return nil;
@@ -126,7 +126,7 @@
   return [self typeAtIndex:i];
 }
 - (NSString *)valueForName:(NSString *)_name {
-  int i;
+  NSUInteger i;
 
   if ((i = [self->names indexOfObject:_name]) == NSNotFound)
     return nil;
@@ -157,7 +157,7 @@
 - (NSString *)description {
   NSMutableString *s;
   NSString        *is;
-  int i, c;
+  NSUInteger i, c;
   
   s = [[NSMutableString alloc] init];
   [s appendFormat:@"<%08X[%@]:", self, NSStringFromClass([self class])];
$OpenBSD$

Fix Exception in OGo when uploading a calendar.

--- sope-xml/SaxObjC/SaxAttributes.m.orig	Fri Mar 23 15:16:19 2012
+++ sope-xml/SaxObjC/SaxAttributes.m	Fri May 11 13:40:32 2012
@@ -36,7 +36,7 @@
 }
 - (id)initWithAttributes:(id<SaxAttributes>)_attrs {
   if ((self = [self init])) {
-    int i, c;
+    NSUInteger i, c;
     
     for (i = 0, c = [_attrs count]; i < c; i++) {
       [self addAttribute:[_attrs nameAtIndex:i]
@@ -51,7 +51,7 @@
 
 - (id)initWithAttributeList:(id<SaxAttributeList>)_attrList {
   if ((self = [self init])) {
-    unsigned i;
+    NSUInteger i;
     
     for (i = 0; i < [_attrList count]; i++) {
       [self addAttribute:[_attrList nameAtIndex:i] uri:@""
@@ -115,7 +115,7 @@
 }
 - (NSUInteger)indexOfName:(NSString *)_localPart uri:(NSString *)_uri
 {
-  unsigned int i, c;
+  NSUInteger i, c;
   
   for (i = 0, c = [self count]; i < c; i++) {
     NSString *name;
@@ -160,7 +160,7 @@
 /* lookup data by name */
 
 - (NSString *)typeForRawName:(NSString *)_rawName {
-  unsigned int i;
+  NSUInteger i;
 
   if ((i = [self indexOfRawName:_rawName]) == NSNotFound)
     return nil;
@@ -168,7 +168,7 @@
   return [self typeAtIndex:i];
 }
 - (NSString *)typeForName:(NSString *)_localName uri:(NSString *)_uri {
-  unsigned int i;
+  NSUInteger i;
   
   if ((i = [self indexOfName:_localName uri:_uri]) == NSNotFound)
     return nil;
@@ -177,7 +177,7 @@
 }
 
 - (NSString *)valueForRawName:(NSString *)_rawName {
-  unsigned int i;
+  NSUInteger i;
 
   if ((i = [self indexOfRawName:_rawName]) == NSNotFound)
     return nil;
@@ -185,7 +185,7 @@
   return [self valueAtIndex:i];
 }
 - (NSString *)valueForName:(NSString *)_localName uri:(NSString *)_uri {
-  unsigned int i;
+  NSUInteger i;
   
   if ((i = [self indexOfName:_localName uri:_uri]) == NSNotFound)
     return nil;
@@ -210,7 +210,7 @@
 - (NSString *)description {
   NSMutableString *s;
   NSString        *is;
-  int i, c;
+  NSUInteger i, c;
   
   s = [[NSMutableString alloc] init];
   [s appendFormat:@"<%08X[%@]:", self, NSStringFromClass([self class])];
$OpenBSD$
--- sope-xml/XmlRpc/NSObject+XmlRpc.h.orig	Fri May 11 13:55:58 2012
+++ sope-xml/XmlRpc/NSObject+XmlRpc.h	Fri May 11 13:56:27 2012
@@ -29,7 +29,7 @@
 @interface NSObject(XmlRpcValues)
 
 + (id)objectWithXmlRpcType:(NSString *)_type
-  characters:(unichar *)_chars length:(int)_len;
+  characters:(unichar *)_chars length:(NSUInteger)_len;
 
 @end
 
$OpenBSD$
--- sope-xml/XmlRpc/NSObject+XmlRpc.m.orig	Fri May 11 13:52:30 2012
+++ sope-xml/XmlRpc/NSObject+XmlRpc.m	Fri May 11 13:55:47 2012
@@ -31,25 +31,25 @@
 @interface NSString(XmlRpcParsing)
 - (id)initWithXmlRpcType:(NSString *)_type
   characters:(unichar *)_chars
-  length:(int)_len;
+  length:(NSUInteger)_len;
 @end
 
 @interface NSDate(XmlRpcParsing)
 - (id)initWithXmlRpcType:(NSString *)_type
   characters:(unichar *)_chars
-  length:(int)_len;
+  length:(NSUInteger)_len;
 @end
 
 @interface NSNumber(XmlRpcParsing)
 - (id)initWithXmlRpcType:(NSString *)_type
   characters:(unichar *)_chars
-  length:(int)_len;
+  length:(NSUInteger)_len;
 @end
 
 @interface NSData(XmlRpcParsing)
 - (id)initWithXmlRpcType:(NSString *)_type
   characters:(unichar *)_chars
-  length:(int)_len;
+  length:(NSUInteger)_len;
 @end
 
 @interface NSData(UsedNGExtensions)
@@ -132,7 +132,7 @@
 }
 
 + (id)objectWithXmlRpcType:(NSString *)_type
-  characters:(unichar *)_chars length:(int)_len
+  characters:(unichar *)_chars length:(NSUInteger)_len
 {
   static NSDictionary *typeToClass = nil;
   Class ObjClass = Nil;
@@ -171,7 +171,7 @@
 }
 
 - (id)initWithXmlRpcType:(NSString *)_type
-  characters:(unichar *)_chars length:(int)_len
+  characters:(unichar *)_chars length:(NSUInteger)_len
 {
   if ([self respondsToSelector:@selector(initWithString:)]) {
     NSString *s;
@@ -194,7 +194,7 @@
 /* NSData represents the xml-rpc base type 'base64' */
 
 - (id)initWithXmlRpcType:(NSString *)_type
-  characters:(unichar *)_chars length:(int)_len
+  characters:(unichar *)_chars length:(NSUInteger)_len
 {
   NSString *v;
 
@@ -215,7 +215,7 @@
 
 /* NSDate represents the xml-rpc type dateTime.iso8601: */
 - (id)initWithXmlRpcType:(NSString *)_type
-  characters:(unichar *)_chars length:(int)_len
+  characters:(unichar *)_chars length:(NSUInteger)_len
 {
   /* eg 19980717T14:08:55 */
   if (_len < 17) {
@@ -283,7 +283,7 @@
 /* NSNumber represents the xml-rpc base types: 'int', 'double', 'boolean': */
 
 - (id)initWithXmlRpcType:(NSString *)_type
-  characters:(unichar *)_chars length:(int)_len
+  characters:(unichar *)_chars length:(NSUInteger)_len
 {
   if ([_type isEqualToString:@"boolean"]) {
     BOOL v;
@@ -318,7 +318,7 @@
 @implementation NSString(XmlRpcParsing)
 
 - (id)initWithXmlRpcType:(NSString *)_type
-  characters:(unichar *)_chars length:(int)_len
+  characters:(unichar *)_chars length:(NSUInteger)_len
 {
   /* this is *never* called, since NSString+alloc returns a NSTemporaryString*/
   return [self initWithCharacters:_chars length:_len];
$OpenBSD$
--- sope-xml/XmlRpc/XmlRpcDecoder.m.orig	Fri May 11 16:20:10 2012
+++ sope-xml/XmlRpc/XmlRpcDecoder.m	Fri May 11 16:46:42 2012
@@ -589,8 +589,8 @@ static BOOL  doDebug         = NO;
   int result;
   
   if ((newValue = [self beginDecodingKey:_key]) == nil)
-    /* any useful alternatives ? */
-    return NSNotFound;
+    /* NSKeyedArchiver returns 0, we too */
+    return 0;
   
   result = [self decodeInt];
   [self finishedDecodingKey];
$OpenBSD$
--- sope-xml/XmlRpc/XmlRpcSaxHandler.m.orig	Fri May 11 13:43:10 2012
+++ sope-xml/XmlRpc/XmlRpcSaxHandler.m	Fri May 11 13:57:24 2012
@@ -158,7 +158,7 @@ static BOOL  doDebug         = NO;
 - (void)end_name {
   self->nextCharactersProcessor = NULL;
 }
-- (void)_name:(unichar *)_chars length:(int)_len {
+- (void)_name:(unichar *)_chars length:(NSUInteger)_len {
   NSString *name;
   name = [NSString stringWithCharacters:_chars length:_len];
   [self->memberNameStack addObject:name];
@@ -184,7 +184,7 @@ static BOOL  doDebug         = NO;
   self->valueNestingLevel--;
 }
 
-- (void)_dateValue:(unichar *)_chars length:(int)_len {
+- (void)_dateValue:(unichar *)_chars length:(NSUInteger)_len {
   if (self->dateTime)
     return;
   
@@ -193,7 +193,7 @@ static BOOL  doDebug         = NO;
                               retain];
 }
 
-- (void)_baseValue:(unichar *)_chars length:(int)_len {
+- (void)_baseValue:(unichar *)_chars length:(NSUInteger)_len {
   id value;
 
   if (self->valueNestingLevel == 0) {
@@ -239,8 +239,8 @@ static BOOL  doDebug         = NO;
   self->nextCharactersProcessor = @selector(_baseValue:length:);
 }
 - (void)start_dateTime:(id<SaxAttributes>)_attrs {
-  NSString *tz;
-  int      idx;
+  NSString   *tz;
+  NSUInteger idx;
   
   [self->timeZone release]; self->timeZone = nil;
   [self->dateTime release]; self->dateTime = nil;
@@ -467,7 +467,7 @@ static BOOL  doDebug         = NO;
 - (void)end_methodName {
   self->nextCharactersProcessor = NULL;
 }
-- (void)_methodName:(unichar *)_chars length:(int)_len {
+- (void)_methodName:(unichar *)_chars length:(NSUInteger)_len {
   [self->methodName release];
   self->methodName = [[NSString alloc] initWithCharacters:_chars length:_len];
 }
@@ -529,8 +529,8 @@ static BOOL  doDebug         = NO;
   attributes:(id<SaxAttributes>)_attrs
 {
   NSString *tmp = nil;
-  SEL      sel;
-  int      idx;
+  SEL        sel;
+  NSUInteger idx;
   
   [self->tagStack addObject:_rawName];
 
@@ -559,14 +559,14 @@ static BOOL  doDebug         = NO;
   namespace:(NSString *)_ns
   rawName:(NSString *)_rawName
 {
-  unsigned stackDepth, lastIdx;
+  NSUInteger stackDepth, lastIdx;
   NSString *tmp;
   SEL sel;
 
   if (self->nextCharactersProcessor != NULL) {
-    void (*m)(id, SEL, unichar *, int);
+    void (*m)(id, SEL, unichar *, NSUInteger);
     unichar *chars;
-    unsigned len;
+    NSUInteger len;
 
     len   = [self->characters length];
     chars = malloc(sizeof(unichar)*len);
@@ -606,7 +606,7 @@ static BOOL  doDebug         = NO;
   }
 }
 
-- (void)characters:(unichar *)_chars length:(int)_len {
+- (void)characters:(unichar *)_chars length:(NSUInteger)_len {
   if (_len > 0) {
     [self->characters appendString:
          [NSString stringWithCharacters:_chars length:_len]];
