$OpenBSD$

fix deprecated warning

--- sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m.orig	Sun Jan 22 13:22:00 2012
+++ sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m	Sun Jan 22 15:59:49 2012
@@ -939,8 +939,7 @@ static BOOL _setValue(WOKeyPathAssociation *self, id _
 		handleUnknownKey stuff ...
     */
     
-#if GNUSTEP_BASE_LIBRARY && ((GNUSTEP_BASE_MAJOR_VERSION >= 1) && \
-			     (GNUSTEP_BASE_MINOR_VERSION >= 11))
+#if GNUSTEP_BASE_LIBRARY
     // TODO: also do this for OSX 10.4? probably
     [object setValue:_value forKey:info->extra.key];
 #else
@@ -1097,9 +1096,9 @@ static BOOL _setValue(WOKeyPathAssociation *self, id _
     return;
   }
 
-  if (info->type == WOKeyType_kvc) { // takeValue:forKey:..
+  if (info->type == WOKeyType_kvc) { // setValue:forKey:
     NSCAssert(info->extra.key, @"no key object set ..");
-    [_wo takeValue:uintNumObj(_value) forKey:info->extra.key];
+    [_wo setValue:uintNumObj(_value) forKey:info->extra.key];
     return;
   }
   if (info->type == WOKeyType_binding) { // setValue:forBinding:
@@ -1223,7 +1222,7 @@ static BOOL _setValue(WOKeyPathAssociation *self, id _
 
   if (info->type == WOKeyType_kvc) { // takeValue:forKey:
     NSCAssert(info->extra.key, @"no key object set ..");
-    [_wo takeValue:intNumObj(_value) forKey:info->extra.key];
+    [_wo setValue:intNumObj(_value) forKey:info->extra.key];
     return;
   }
   
@@ -1331,7 +1330,7 @@ static BOOL _setValue(WOKeyPathAssociation *self, id _
   }
   else if (info->type == WOKeyType_kvc) { // takeValue:forKey:
       NSCAssert(info->extra.key, @"no key object set ..");
-      [_wo takeValue:[NumberClass numberWithBool:_value]
+      [_wo setValue:[NumberClass numberWithBool:_value]
            forKey:info->extra.key];
   }
   else if (info->type == WOKeyType_binding) { // setValue:forBinding:
$OpenBSD$
--- sope-appserver/NGObjWeb/NGHttp/NGHttpHeaderFields.m.orig	Tue Mar  6 08:42:05 2012
+++ sope-appserver/NGObjWeb/NGHttp/NGHttpHeaderFields.m	Tue Mar  6 08:42:54 2012
@@ -283,8 +283,9 @@ static void _parseUserAgent(NGHttpUserAgent *self) {
 
   if ([self->value hasPrefix:@"Mozilla"]) {
     // Mozilla Browser or compatible
-    NSRange r;
-    int idx, av, iv;
+    NSRange 	r;
+    int 	av, iv;
+    NSInteger 	idx;
 
     r = [self->value rangeOfString:@"/"];
     idx = r.location;
$OpenBSD$
--- sope-appserver/NGObjWeb/WODisplayGroup.m.orig	Tue Feb 14 18:18:59 2012
+++ sope-appserver/NGObjWeb/WODisplayGroup.m	Tue Mar  6 09:02:01 2012
@@ -372,7 +372,7 @@ static NSArray  *uint0Array = nil;
 }
 
 - (void)setSelectedObject:(id)_obj {
-  unsigned idx;
+  NSUInteger idx;
   NSNumber *idxNumber;
   
   // TODO: maybe we need to retain the selection array and just swap the first
@@ -430,7 +430,7 @@ static NSArray  *uint0Array = nil;
 - (BOOL)selectObject:(id)_obj {
   /* returns YES if displayedObjects contains _obj otherwise NO */
   NSNumber *idxNumber;
-  unsigned idx;
+  NSUInteger idx;
   
   if (![self->displayObjects containsObject:_obj])
     return NO;
@@ -951,13 +951,13 @@ static NSArray  *uint0Array = nil;
 }
 
 - (BOOL)deleteSelection {
-  NSArray  *objsToDelete;
-  unsigned i, count;
+  NSArray    *objsToDelete;
+  NSUInteger i, count;
   
   objsToDelete = [[[self selectedObjects] shallowCopy] autorelease];
 
   for (i = 0, count = [objsToDelete count]; i < count; i++) {
-    unsigned idx;
+    NSUInteger idx;
     
     idx = [self->objects indexOfObject:[objsToDelete objectAtIndex:i]];
     if (idx == NSNotFound) {
$OpenBSD$
--- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m.orig	Tue Mar  6 08:43:24 2012
+++ sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m	Tue Mar  6 08:44:19 2012
@@ -396,7 +396,7 @@ static BOOL     debugOn                      = NO;
 #if USE_POOLS
   NSAutoreleasePool *pool = nil;
 #endif
-  NSTimeInterval t;
+  NSTimeInterval t = 0;
   
   if (perfLogger)
     *(&t) = [[NSDate date] timeIntervalSince1970];
$OpenBSD$
--- sope-appserver/WOExtensions/WOTabPanel.m.orig	Tue Mar  6 08:46:00 2012
+++ sope-appserver/WOExtensions/WOTabPanel.m	Tue Mar  6 08:46:56 2012
@@ -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	Tue Mar  6 08:37:00 2012
+++ sope-core/NGExtensions/NGCalendarDateRange.m	Tue Mar  6 08:38:28 2012
@@ -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;
@@ -289,7 +289,7 @@
     NGCalendarDateRange *rangeToAdd;
     NGCalendarDateRange *availRange;
     NGCalendarDateRange *newRange;
-    unsigned idx;
+    NSUInteger idx;
     
     rangeToAdd = [self objectAtIndex:i];
     idx = [ma indexOfFirstIntersectingDateRange:rangeToAdd];
$OpenBSD: patch-sope-core_NGStreams_NGActiveSocket_m,v 1.1 2011/11/18 11:12:44 sebastia Exp $

MSG_NOSIGNAL is not POSIX, OpenBSD doesn't have it, so ignore it

--- sope-core/NGStreams/NGActiveSocket.m.orig	Thu Oct  6 09:15:44 2011
+++ sope-core/NGStreams/NGActiveSocket.m	Thu Oct  6 10:04:09 2011
@@ -73,6 +73,10 @@
 #  define POLLRDNORM POLLIN
 #endif
 
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+
 @interface NGActiveSocket(PrivateMethods)
 
 - (id)_initWithDescriptor:(int)_fd
$OpenBSD$
--- sope-core/NGStreams/NGLockingStream.m.orig	Tue Mar  6 08:39:49 2012
+++ sope-core/NGStreams/NGLockingStream.m	Tue Mar  6 08:40:08 2012
@@ -112,7 +112,7 @@
 }
 
 - (BOOL)safeReadBytes:(void *)_buf  count:(unsigned)_len {
-  BOOL res;
+  BOOL res = NO;
   
   [readLock lock];
 
$OpenBSD$
--- sope-gdl1/GDLAccess/EOExpressionArray.m.orig	Tue Mar  6 08:47:03 2012
+++ sope-gdl1/GDLAccess/EOExpressionArray.m	Tue Mar  6 08:47:32 2012
@@ -247,7 +247,7 @@
     [self->array addObject:_object];
 }
 
-- (unsigned int)indexOfObject:(id)_object {
+- (NSUInteger)indexOfObject:(id)_object {
     return [self->array indexOfObject:_object];
 }
 
$OpenBSD$
--- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m.orig	Tue Mar  6 09:14:49 2012
+++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.m	Tue Mar  6 09:15:13 2012
@@ -419,7 +419,7 @@ static int openConnectionCount = 0;
 {
   NSMutableDictionary *row;
   unsigned     attrCount;
-  int          *indices;
+  NSInteger    *indices;
   unsigned     cnt, fieldDictCount;
   
   if (self->currentTuple == self->tupleCount) {
$OpenBSD$
--- sope-mime/NGImap4/NSString+Imap4.m.orig	Tue Mar  6 08:41:01 2012
+++ sope-mime/NGImap4/NSString+Imap4.m	Tue Mar  6 08:41:38 2012
@@ -151,7 +151,7 @@ static unsigned int _encodeToModifiedUTF7(unichar *_ch
   unsigned int processedSrc, processedDest, cycle;
   unichar c;
   char leftover;
-  BOOL hasLeftOver;
+  BOOL hasLeftOver = NO;
 
   processedSrc = 0;
   processedDest = 0;
$OpenBSD$
--- sope-xml/DOM/DOMElement.m.orig	Sat Jan 21 19:33:18 2012
+++ sope-xml/DOM/DOMElement.m	Sat Jan 21 19:33:33 2012
@@ -104,7 +104,7 @@ static NSNull *null = nil;
   return self->namespaceURI;
 }
 
-- (void)setLine:(NSUInteger)_line {
+- (void)setLine:(NSInteger)_line {
   self->line = _line;
 }
 - (NSUInteger)line {
$OpenBSD$
--- sope-xml/DOM/DOMNodeWithChildren.m.orig	Tue Mar  6 08:27:58 2012
+++ sope-xml/DOM/DOMNodeWithChildren.m	Tue Mar  6 08:29:04 2012
@@ -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 ! */
@@ -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/DOM/DOMSaxHandler.m.orig	Sat Jan 21 19:30:17 2012
+++ sope-xml/DOM/DOMSaxHandler.m	Sat Jan 21 19:34:46 2012
@@ -27,7 +27,7 @@
 #include <SaxObjC/SaxObjC.h>
 
 @interface NSObject(LineInfoProtocol)
-- (void)setLine:(int)_line;
+- (void)setLine:(NSInteger)_line;
 @end
 
 @implementation DOMSaxHandler
$OpenBSD$
--- sope-xml/STXSaxDriver/ExtraSTX/StructuredText.m.orig	Tue Mar  6 08:32:57 2012
+++ sope-xml/STXSaxDriver/ExtraSTX/StructuredText.m	Tue Mar  6 08:34:44 2012
@@ -384,7 +384,7 @@
   StructuredLine	 *line, *prevLine = nil;
   StructuredTextListItem *item = nil;
   StructuredStack	 *paragraphs;
-  int type;
+  NSInteger type;
   
   result     = nil;
   paragraphs = [self paragraphs];
@@ -477,11 +477,11 @@
   return [result autorelease];
 }
 
-- (int)listItemTypology:(StructuredLine *)aLine {
-  NSString *text;
-  int      type = NSNotFound;
-  int      i, h, length;
-  NSRange  range;
+- (NSInteger)listItemTypology:(StructuredLine *)aLine {
+  NSString  *text;
+  NSInteger type = NSNotFound;
+  int       i, h, length;
+  NSRange   range;
 
   text = [aLine text];
 
$OpenBSD$
--- sope-xml/SaxObjC/SaxAttributeList.m.orig	Tue Mar  6 08:25:26 2012
+++ sope-xml/SaxObjC/SaxAttributeList.m	Tue Mar  6 08:26:14 2012
@@ -95,7 +95,7 @@
 }
 
 - (void)removeAttribute:(NSString *)_name {
-  int idx;
+  NSInteger idx;
 
   if ((idx = [self->names indexOfObject:_name]) == NSNotFound)
     return;
@@ -118,7 +118,7 @@
 }
 
 - (NSString *)typeForName:(NSString *)_name {
-  int i;
+  NSInteger i;
 
   if ((i = [self->names indexOfObject:_name]) == NSNotFound)
     return nil;
@@ -126,7 +126,7 @@
   return [self typeAtIndex:i];
 }
 - (NSString *)valueForName:(NSString *)_name {
-  int i;
+  NSInteger i;
 
   if ((i = [self->names indexOfObject:_name]) == NSNotFound)
     return nil;
$OpenBSD$
--- sope-xml/SaxObjC/SaxAttributes.m.orig	Tue Mar  6 08:26:28 2012
+++ sope-xml/SaxObjC/SaxAttributes.m	Tue Mar  6 08:27:43 2012
@@ -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;
$OpenBSD$
--- sope-xml/XmlRpc/XmlRpcDecoder.m.orig	Tue Mar  6 08:30:11 2012
+++ sope-xml/XmlRpc/XmlRpcDecoder.m	Tue Mar  6 08:31:10 2012
@@ -584,7 +584,7 @@ static BOOL  doDebug         = NO;
   return result;
 }
 
-- (int)decodeIntForKey:(NSString *)_key {
+- (NSInteger)decodeIntForKey:(NSString *)_key {
   XmlRpcValue *newValue;
   int result;
   
$OpenBSD$
--- sope-xml/XmlRpc/XmlRpcSaxHandler.m.orig	Tue Mar  6 08:31:40 2012
+++ sope-xml/XmlRpc/XmlRpcSaxHandler.m	Tue Mar  6 08:32:30 2012
@@ -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;
+  NSInteger idx;
   
   [self->timeZone release]; self->timeZone = nil;
   [self->dateTime release]; self->dateTime = nil;
@@ -529,8 +529,8 @@ static BOOL  doDebug         = NO;
   attributes:(id<SaxAttributes>)_attrs
 {
   NSString *tmp = nil;
-  SEL      sel;
-  int      idx;
+  SEL       sel;
+  NSInteger idx;
   
   [self->tagStack addObject:_rawName];
 
$OpenBSD$
--- sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h.orig	Tue Mar  6 08:38:50 2012
+++ sope-core/NGExtensions/NGExtensions/NGCalendarDateRange.h	Tue Mar  6 08:39:13 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/GDLAccess/EOExpressionArray.h.orig	Tue Mar  6 08:47:45 2012
+++ sope-gdl1/GDLAccess/EOExpressionArray.h	Tue Mar  6 08:48:02 2012
@@ -97,7 +97,7 @@
 - (void)insertObject:(id)_obj atIndex:(unsigned int)_idx;
 - (void)addObjectsFromArray:(NSArray *)_array;
 - (void)addObject:(id)_object;
-- (unsigned int)indexOfObject:(id)_object;
+- (NSUInteger)indexOfObject:(id)_object;
 - (id)objectAtIndex:(unsigned int)_idx;
 - (id)lastObject;
 - (NSUInteger)count;
$OpenBSD$
--- sope-gdl1/PostgreSQL/PostgreSQL72Channel.h.orig	Tue Mar  6 09:03:33 2012
+++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.h	Tue Mar  6 09:03:05 2012
@@ -61,9 +61,9 @@ typedef struct {
   NSMutableDictionary *_attributesForTableName;
   NSMutableDictionary *_primaryKeysNamesForTableName;
   
-  int      *fieldIndices;
-  NSString **fieldKeys;
-  id       *fieldValues;
+  NSInteger *fieldIndices;
+  NSString  **fieldKeys;
+  id        *fieldValues;
 }
 
 - (void)setDebugEnabled:(BOOL)_flag;
$OpenBSD$
--- sope-xml/STXSaxDriver/ExtraSTX/StructuredText.h.orig	Tue Mar  6 08:34:57 2012
+++ sope-xml/STXSaxDriver/ExtraSTX/StructuredText.h	Tue Mar  6 08:35:11 2012
@@ -78,7 +78,7 @@
 - (StructuredTextLiteralBlock *)buildLiteralBlock;
 - (StructuredTextList *)buildList;
 
-- (int)listItemTypology:(StructuredLine *)_line;
+- (NSInteger)listItemTypology:(StructuredLine *)_line;
 
 @end
 
$OpenBSD$
--- sope-xml/XmlRpc/XmlRpcCoder.h.orig	Tue Mar  6 09:00:15 2012
+++ sope-xml/XmlRpc/XmlRpcCoder.h	Tue Mar  6 09:00:31 2012
@@ -137,7 +137,7 @@
 - (NSArray *)decodeArrayForKey:(NSString *)_key;
 - (NSData *)decodeBase64ForKey:(NSString *)_key;
 - (BOOL)decodeBooleanForKey:(NSString *)_key;
-- (int)decodeIntForKey:(NSString *)_key;
+- (NSInteger)decodeIntForKey:(NSString *)_key;
 - (double)decodeDoubleForKey:(NSString *)_key;
 - (NSString *)decodeStringForKey:(NSString *)_key;
 - (NSCalendarDate *)decodeDateTimeForKey:(NSString *)_key;
