$OpenBSD$
--- sope-core/NGExtensions/NGStack.m.orig	Thu Dec 19 07:19:14 2013
+++ sope-core/NGExtensions/NGStack.m	Thu Dec 19 07:23:53 2013
@@ -220,7 +220,7 @@
 
 - (NSString *)description {
   return [NSString stringWithFormat:
-                     @"<%@[0x%p] capacity=%u SP=%u count=%u content=%s>",
+    @"<%@[0x%p] capacity=%"PRIuPTR" SP=%"PRIuPTR" count=%"PRIuPTR" content=%s>",
                      NSStringFromClass([self class]), self,
                      [self capacity], [self stackPointer], [self count],
                      [[[self toArray] description] cString]];
@@ -298,19 +298,11 @@
   [self addObject:_obj];
 }
 - (id)pop {
-  unsigned lastIdx = ([self count] - 1);
+  NSUInteger lastIdx = ([self count] - 1);
 
-  if (lastIdx >= 0) {
-    id element = [self objectAtIndex:lastIdx];
-    [self removeObjectAtIndex:lastIdx];
-    return element;
-  }
-  else {
-    [[[NGStackException alloc] initWithName:@"StackException"
-        reason:@"tried to pop an object from an empty stack !"
-        userInfo:nil] raise];
-    return nil;
-  }
+  id element = [self objectAtIndex:lastIdx];
+  [self removeObjectAtIndex:lastIdx];
+  return element;
 }
 
 - (void)clear {
$OpenBSD$
--- sope-core/NGExtensions/NGLogging.subproj/NGLogEventDetailedFormatter.m.orig	Thu Dec 19 07:07:01 2013
+++ sope-core/NGExtensions/NGLogging.subproj/NGLogEventDetailedFormatter.m	Thu Dec 19 07:09:16 2013
@@ -84,7 +84,7 @@ static __inline__ unsigned char *levelPrefixForEvent(N
   fe = [NSMutableString stringWithCapacity:160];
   /* timestamp, process name, process id, level prefix */
   date = [_event date];
-  [fe appendFormat:@"%s %02i %02i:%02i:%02i %s [%d]: %s",
+  [fe appendFormat:@"%s %02"PRIiPTR" %02"PRIiPTR":%02"PRIiPTR":%02"PRIiPTR" %s [%d]: %s",
     monthNames[[date monthOfYear]],
     [date dayOfMonth],
     [date hourOfDay], [date minuteOfHour], [date secondOfMinute],
$OpenBSD$
--- sope-core/NGExtensions/NGLogging.subproj/NGLoggerManager.m.orig	Thu Dec 19 07:05:35 2013
+++ sope-core/NGExtensions/NGLogging.subproj/NGLoggerManager.m	Thu Dec 19 07:06:30 2013
@@ -122,7 +122,8 @@ static BOOL            debugAll        = NO;
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<%@[0x%p] debugAll=%@ #loggers=%d>",
+  return [NSString stringWithFormat:
+		@"<%@[0x%p] debugAll=%@ #loggers=%"PRIuPTR">",
                      NSStringFromClass([self class]), self,
                      debugAll ? @"YES" : @"NO", [self->loggerMap count]];
 }
$OpenBSD$
--- sope-core/NGExtensions/NGBitSet.m.orig	Thu Dec 19 07:09:27 2013
+++ sope-core/NGExtensions/NGBitSet.m	Thu Dec 19 07:11:31 2013
@@ -222,9 +222,9 @@
 }
 
 - (NSUInteger)lastMember {
-  register unsigned int element;
+  register NSUInteger element;
 
-  for (element = (self->universe - 1); element >= 0; element--) {
+  for (element = (self->universe - 1); element > 0; element--) {
     if (NGTestBit(element))
       return element;
   }
$OpenBSD$
--- sope-core/NGExtensions/NGBundleManager.m.orig	Thu Dec 19 07:11:56 2013
+++ sope-core/NGExtensions/NGBundleManager.m	Thu Dec 19 07:15:39 2013
@@ -891,15 +891,15 @@ static NSString *NGEnvVarPathSeparator = @":";
         continue;
       
       if ([i objectForKey:@"exact-version"]) {
-        int v;
+        NSInteger v;
 
-        v = [[i objectForKey:@"exact-version"] intValue];
+        v = [[i objectForKey:@"exact-version"] integerValue];
 	
         if (v != [clazz version]) {
           NSLog(@"ERROR: required exact class match failed:\n"
                 @"  class:            %@\n"
-                @"  required version: %i\n"
-                @"  loaded version:   %i\n"
+                @"  required version: %"PRIiPTR"\n"
+                @"  loaded version:   %"PRIiPTR"\n"
                 @"  bundle:           %@",
                 className,
                 v, [clazz version],
@@ -907,15 +907,15 @@ static NSString *NGEnvVarPathSeparator = @":";
         }
       }
       else if ([i objectForKey:@"version"]) {
-        int v;
+        NSInteger v;
         
         v = [[i objectForKey:@"version"] intValue];
         
         if (v > [clazz version]) {
           NSLog(@"ERROR: provided class does not match required version:\n"
                 @"  class:                  %@\n"
-                @"  least required version: %i\n"
-                @"  loaded version:         %i\n"
+                @"  least required version: %"PRIiPTR"\n"
+                @"  loaded version:         %"PRIiPTR"\n"
                 @"  bundle:                 %@",
                 className,
                 v, [clazz version],
@@ -1139,7 +1139,7 @@ static BOOL _doesInfoMatch(NSArray *keys, NSDictionary
   NSString       *path;
 
   if (debugOn) {
-    NSLog(@"BM LOOKUP pathes (%d bundles loaded): %@ / %@", 
+    NSLog(@"BM LOOKUP pathes (%"PRIuPTR" bundles loaded): %@ / %@", 
           NSCountMapTable(self->loadedBundles), _resourceName, _type);
   }
   
@@ -1315,7 +1315,7 @@ static BOOL _doesInfoMatch(NSArray *keys, NSDictionary
   NSArray       *rnKeys = nil;
   
   if (debugOn) {
-    NSLog(@"BM LOOKUP path (%d bundles loaded): %@ / %@", 
+    NSLog(@"BM LOOKUP path (%"PRIuPTR" bundles loaded): %@ / %@", 
           NSCountMapTable(self->loadedBundles), _resourceName, _type);
   }
   
$OpenBSD$
--- sope-core/NGExtensions/NGHashMap.m.orig	Thu Dec 19 07:15:51 2013
+++ sope-core/NGExtensions/NGHashMap.m	Thu Dec 19 07:19:02 2013
@@ -409,7 +409,7 @@ static inline unsigned __countObjectsForKey(NGHashMap 
   
   if ((_index < list->count) == 0) {
     [NSException raise:NSRangeException
-                 format:@"index %d out of range for key %@ of length %d",
+                format:@"index %"PRIuPTR" out of range for key %@ of length %d",
                    _index, _key, list->count];
     return nil;
   }
@@ -722,7 +722,7 @@ static inline unsigned __countObjectsForKey(NGHashMap 
   if ((root = [self __structForKey:_key]) == NULL) {
     if (_index > 0) {
       [NSException raise:NSRangeException
-                   format:@"index %d out of range in map 0x%p", 
+                   format:@"index %"PRIuPTR" out of range in map 0x%p", 
                     _index, self];
       return;
     }
@@ -734,7 +734,7 @@ static inline unsigned __countObjectsForKey(NGHashMap 
   else {
     if (!(_index < root->count)) {
       [NSException raise:NSRangeException
-                   format:@"index %d out of range in map 0x%p length %d", 
+                  format:@"index %"PRIuPTR" out of range in map 0x%p length %d",
                     _index, self, root->count];
       return;
     }
$OpenBSD$
--- sope-core/NGExtensions/NGCalendarDateRange.m.orig	Thu Dec 19 07:24:03 2013
+++ sope-core/NGExtensions/NGCalendarDateRange.m	Thu Dec 19 07:25:38 2013
@@ -171,7 +171,7 @@
 	  [self->endDate isEqual:[other endDate]]) ? YES : NO;
 }
 
-- (unsigned)hash {
+- (NSUInteger)hash {
   return [self->startDate hash] ^ [self->endDate hash];
 }
 
@@ -193,7 +193,7 @@
     
   description = [NSMutableString stringWithCapacity:64];
 
-  [description appendFormat:@"<%@[0x%x]: startDate:%@ endDate: ", 
+  [description appendFormat:@"<%@[0x%p]: startDate:%@ endDate: ", 
 	         NSStringFromClass(self->isa), self, self->startDate];
   
   if ([self->startDate isEqual:self->endDate])
$OpenBSD$
--- sope-core/NGExtensions/NGResourceLocator.m.orig	Thu Dec 19 07:26:12 2013
+++ sope-core/NGExtensions/NGResourceLocator.m	Thu Dec 19 07:26:27 2013
@@ -263,7 +263,7 @@
     [ms appendString:@":hits"];
   if (self->flags.cachePathMisses)
     [ms appendString:@":misses"];
-  [ms appendFormat:@":#%d", [self->nameToPathCache count]];
+  [ms appendFormat:@":#%"PRIuPTR, [self->nameToPathCache count]];
   
   [ms appendString:@">"];
   return ms;
