$OpenBSD$
--- sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m.orig	Mon Dec 16 07:37:27 2013
+++ sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m	Mon Dec 16 07:38:24 2013
@@ -456,7 +456,7 @@ static NSException *_makeException(NSException *_excep
             register unsigned pos;
             const unsigned char *startPos, *endPos;
 
-            for (pos = _idx; (pos >= 0) && (_buffer[pos] != '\n'); pos--)
+            for (pos = _idx; (pos > 0) && (_buffer[pos] != '\n'); pos--)
                 ;
             startPos = &(_buffer[pos + 1]);
 
$OpenBSD$
--- sope-core/NGExtensions/FdExt.subproj/NSProcessInfo+misc.m.orig	Wed Dec  4 17:51:26 2013
+++ sope-core/NGExtensions/FdExt.subproj/NSProcessInfo+misc.m	Tue Dec 17 07:11:27 2013
@@ -68,7 +68,7 @@
   NSString *s;
   cnt++;
   s = [NSString stringWithFormat:
-                  @"%04X%X%02X.tmp", getpid(), time(NULL),
+                  @"%04X%llX%02X.tmp", getpid(), (long long)time(NULL),
                   cnt];
   return [_prefix stringByAppendingString:s];
 }
$OpenBSD$
--- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m.orig	Mon Dec 16 07:15:13 2013
+++ sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m	Mon Dec 16 07:16:45 2013
@@ -197,7 +197,7 @@ static char *iconv_wrapper(id self, char *_src, unsign
   inbuf      = NULL;
   outbuf     = NULL;
   
-  if ((type == (iconv_t)-1)) {
+  if (type == (iconv_t)-1) {
     [self logWithFormat:@"%s: Could not handle iconv encoding. FromEncoding:%@"
           @" to encoding:%@", __PRETTY_FUNCTION__, _fromEncode, _toEncode];
     goto CLEAR_AND_RETURN;
$OpenBSD$
--- sope-core/NGExtensions/FdExt.subproj/NSString+Escaping.m.orig	Mon Dec 16 07:17:30 2013
+++ sope-core/NGExtensions/FdExt.subproj/NSString+Escaping.m	Mon Dec 16 07:18:17 2013
@@ -71,7 +71,7 @@
 }
 
 - (NSString *)stringByEscapingCharactersFromSet:(NSCharacterSet *)_escSet
-  usingStringEscaping:(<NGStringEscaping>)_esc
+  usingStringEscaping:(id <NGStringEscaping>)_esc
 {
   NSMutableString *safeString;
   unsigned length;
$OpenBSD$
--- sope-core/NGExtensions/FdExt.subproj/NSString+Ext.m.orig	Mon Dec 16 07:11:20 2013
+++ sope-core/NGExtensions/FdExt.subproj/NSString+Ext.m	Mon Dec 16 07:14:18 2013
@@ -64,16 +64,16 @@
 - (NSString *)stringByTrimmingTailWhiteSpaces
 {
     // should check 'whitespaceAndNewlineCharacterSet' ..
-    unsigned len;
+    NSUInteger len;
     
     if ((len = [self length]) > 0) {
         unichar  *buf;
-        unsigned idx;
+        NSUInteger idx;
         
         buf = calloc(len + 1, sizeof(unichar));
         [self getCharacters:buf];
 
-        for (idx = (len - 1); (idx >= 0) && (buf[idx] == 32); idx--)
+        for (idx = (len - 1); (idx > 0) && (buf[idx] == 32); idx--)
             ;
         
         self = [NSString stringWithCharacters:buf length:(idx + 1)];
$OpenBSD$
--- sope-core/NGExtensions/FdExt.subproj/NSString+misc.m.orig	Wed Dec  4 17:51:26 2013
+++ sope-core/NGExtensions/FdExt.subproj/NSString+misc.m	Tue Dec 17 07:15:41 2013
@@ -23,12 +23,6 @@
 #include "NSString+misc.h"
 #include "common.h"
 
-@interface NSStringVariableBindingException : NSException
-@end
-
-@implementation NSStringVariableBindingException
-@end
-
 @implementation NSObject(StringBindings)
 
 - (NSString *)valueForStringBinding:(NSString *)_key {
@@ -56,9 +50,10 @@
     
     if (pos + 1 == len) { /* last entry */
       if (wbuf[pos] == '$') { /* found $ without end-char */
-        [[[NSStringVariableBindingException alloc]
-	   initWithFormat:@"did not find end of variable for string %@", self]
-	   raise];
+	[[NSException exceptionWithName: @"NSStringVariableBindingException"
+		reason:[NSString stringWithFormat:
+			@"did not find end of variable for string %@", self]
+		userInfo:nil] raise];
       }
       break;
     }
@@ -84,9 +79,10 @@
 	break;
     }
     if (pos == len) { /* end of string was reached */
-      [[[NSStringVariableBindingException alloc]
-	 initWithFormat:@"did not find end of variable for string %@", self]
-	 raise];
+	[[NSException exceptionWithName: @"NSStringVariableBindingException"
+		reason:[NSString stringWithFormat:
+			@"did not find end of variable for string %@", self]
+		userInfo:nil] raise];
     }
     else {
       NSString *key = nil;
@@ -119,9 +115,10 @@
   while (pos < len) {
     if (pos + 1 == len) { /* last entry */
       if (wbuf[pos] == '$') { /* found $ without end-char */
-        [[[NSStringVariableBindingException alloc]
-	   initWithFormat:@"did not find end of variable for string %@", self]
-	  raise];
+	[[NSException exceptionWithName: @"NSStringVariableBindingException"
+		reason:[NSString stringWithFormat:
+			@"did not find end of variable for string %@", self]
+		userInfo:nil] raise];
       }
       break;
     }
@@ -145,9 +142,10 @@
             break;
         }
         if (pos == len) { /* end of string was reached */
-          [[[NSStringVariableBindingException alloc]
-	     initWithFormat:@"did not find end of variable for string %@", 
-	     self] raise];
+	[[NSException exceptionWithName: @"NSStringVariableBindingException"
+		reason:[NSString stringWithFormat:
+			@"did not find end of variable for string %@", self]
+		userInfo:nil] raise];
 	}
         else {
           NSString *key;
@@ -159,10 +157,13 @@
 	  
           if ((value = [_bindings valueForStringBinding:key]) == nil) {
             if (_unknown == nil) {
-              [[[NSStringVariableBindingException alloc]
-                          initWithFormat:@"did not find binding for "
-                                         @"name %@ in binding-dictionary %@",
-                                         [key autorelease], _bindings] raise];
+		[[NSException exceptionWithName:
+			@"NSStringVariableBindingException"
+			reason:[NSString stringWithFormat:
+				@"did not find binding for "
+				@"name %@ in binding-dictionary %@",
+				[key autorelease], _bindings]
+			userInfo:nil] raise];
             }
             else
               value = _unknown;
