From bjoern@opengroupware.org Mon Jul 14 19:16:03 2003 From: bjoern@opengroupware.org (Bjoern Stierand) Date: Mon, 14 Jul 2003 20:16:03 +0200 Subject: [OGo-GNUstep-Port] Administrativa Message-ID: <3F12F363.8000203@opengroupware.org> Please ignore this message Bjoern -- http://www.opengroupware.org From mechanix@debian.org Mon Jul 14 23:38:20 2003 From: mechanix@debian.org (Filip Van Raemdonck) Date: Tue, 15 Jul 2003 00:38:20 +0200 Subject: [OGo-GNUstep-Port] GNUstep define Message-ID: <20030714223820.GA17438@debian> Hi, I assume this list is about building OpenGroupware.org with "regular" GNUstep environment instead of the one in ThirdParty? I've been trying to do that last friday, and this evening. I've had to make a few changes here and there, especially about including certain header files or not including them - mostly about Foundation Extensions. Now currently I'm using #if(n)def GNUSTEP to mark such changes; however AFAICT that is defined by NGExtensions which is from OGo and not GNUstep which makes it a chicken and egg problem while building NGExtensions itself (I just removed or altered conflicting code blocks there) and also requires the NGExtensions to be included to actually work. Since my knowledge of GNUstep is not all too extensive, does anyone with a better knowledge of it than me know of a #define which is GNUstep specific? Regards, Filip -- War does not prove who is right, it proves who is left. From nicola@brainstorm.co.uk Tue Jul 15 08:40:34 2003 From: nicola@brainstorm.co.uk (Nicola Pero) Date: Tue, 15 Jul 2003 08:40:34 +0100 (BST) Subject: [OGo-GNUstep-Port] GNUstep define In-Reply-To: <20030714223820.GA17438@debian> Message-ID: On Tue, 15 Jul 2003, Filip Van Raemdonck wrote: > Hi, > > I assume this list is about building OpenGroupware.org with "regular" > GNUstep environment instead of the one in ThirdParty? > > I've been trying to do that last friday, and this evening. I've had to > make a few changes here and there, especially about including certain > header files or not including them - mostly about Foundation Extensions. > Now currently I'm using #if(n)def GNUSTEP to mark such changes; however > AFAICT that is defined by NGExtensions which is from OGo and not GNUstep > which makes it a chicken and egg problem while building NGExtensions > itself (I just removed or altered conflicting code blocks there) and also > requires the NGExtensions to be included to actually work. > > Since my knowledge of GNUstep is not all too extensive, does anyone with a > better knowledge of it than me know of a #define which is GNUstep specific? There seems to be some confusion here. GNUSTEP *is* a GNUstep specific #define. :-) The theory is that GNUSTEP is a GNUstep specific #define, and is #defined by gnustep-base to let the code know that gnustep-base is being used (check core/base/base.make). Which makes sense after all. It's unfortunate that NGExtensions/common.h is #defining GNUSTEP too. Maybe it was used in the past if the software was built without gnustep-make, to make a difference between the two ? Anyway, I suggest renaming that #define to something else as a start, to prevent conflicts. I can't really change the #define of GNUSTEP inside gnustep-base both because there is a lot of software outside my control using that #define, and because after all it makes more sense that GNUstep itself #defines GNUSTEP :-) My suggestions for changes in this area are to standardize the #defines used to the ones automatically defined by gnustep-make when compiling, documenting the options, and using them consistently in all the code. In practice, I'd suggest - - use GNUSTEP (or GNUSTEP_BASE_LIBRARY) to check that gnustep-base is used. - use LIB_FOUNDATION_LIBRARY to check that libFoundation is used. - use NeXT_FOUNDATION_LIBRARY to check that Cocoa FoundationKit is used. - use NeXT_RUNTIME and GNU_RUNTIME to check the ObjC runtime which is being used. I personally think that supporting the original NeXT runtime / NeXT foundation library is not worth the effort, and that we should better try to support the Apple Mac OS X runtime / foundation library properly, but I'm Ok with supporting it if people want to. I can add a #define APPLE_FOUNDATION_LIBRARY in gnustep-make if it seems more appropriate than NeXT_FOUNDATION_LIBRARY when compiling on Apple Mac OS X (that would be in addition to, not as a replacement of, NeXT_FOUNDATION_LIBRARY not to break code using NeXT_FOUNDATION_LIBRARY to check for non-GNU foundation libraries; I know it makes difficult to make a difference between Apple and NeXT foundation library, but is that really important ? who's using NeXT nowadays anyway ? ;-) ) I'd keep NeXT_RUNTIME because that is the official name which is also used in GCC's command line switches; newer GCC also predefine __NEXT_RUNTIME__ when using the NeXT ObjC runtime. I'd stick with this terminology, so I'd prefer not to define APPLE_RUNTIME. Let me know if you have any problems with these #defines. Else, I'd suggest to stick with this list of #defines, and to revise all OpenGroupWare code so that it consistently uses these #defines, and only these. Of course the #defines should be defined by gnustep-make (and additional makefiles installed in gnustep-make), not by OpenGroupWare itself. From gnustep-port@opengroupware.org Thu Jul 17 20:16:33 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Thu, 17 Jul 2003 21:16:33 +0200 Subject: [OGo-GNUstep-Port] SOPE changes Message-ID: <20030717191633.GA23462@debian> --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Attached are two patches - one for SOPE/skyrix-core and one for SOPE/skyrix-xml. Comments for the skyrix-sope patch are contained within; I tried grouping chunks by functionality as much as I could. The skyrix-xml patch are mostly just compiler warning fixes, except for the last chunk. That one makes it use a different codepath when building with GNUstep-base. (although I think it may even affect builds with the contained ThirdParty/ libs; See also my comment in an earlier message about definition if GNUSTEP) Feedback welcome. If this looks good, please someone apply them. They make skyrix-xml and skyrix-core build with almost no really relevant compiler warnings anymore when building with GNUstep-base. Regards, Filip -- "The most beautiful thing we can experience is the mysterious. It is the source of all true art and science." -- Albert Einstein --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff-skyrix-core # # zlib.h contains all we need to build on all systems, not just OS X. I think # the outer ifdef should be removed entirely, and zutil.h get rid of. # --- opengroupware.org-core-0.9.0cvs20030717.orig/NGExtensions/FdExt.subproj/NSData+gzip.m +++ opengroupware.org-core-0.9.0cvs20030717/NGExtensions/FdExt.subproj/NSData+gzip.m @@ -26,7 +26,7 @@ #ifdef Assert #undef Assert #endif -#ifdef __APPLE__ +//#ifdef __APPLE__ # include # ifndef DEF_MEM_LEVEL /* zutil.h */ # if MAX_MEM_LEVEL >= 8 @@ -36,9 +36,9 @@ # endif # define OS_CODE 0x07 # endif -#else -# include "zutil.h" -#endif +//#else +//# include "zutil.h" +//#endif #undef Assert @implementation NSData(gzip) --- opengroupware.org-core-0.9.0cvs20030717.orig/NGStreams/NGGZipStream.m +++ opengroupware.org-core-0.9.0cvs20030717/NGStreams/NGGZipStream.m @@ -28,7 +28,7 @@ #ifdef Assert #undef Assert #endif -#ifdef __APPLE__ +//#ifdef __APPLE__ # include # ifndef DEF_MEM_LEVEL /* zutil.h */ # if MAX_MEM_LEVEL >= 8 @@ -38,9 +38,9 @@ # endif # define OS_CODE 0x07 # endif -#else -# include "zutil.h" -#endif +//#else +//# include "zutil.h" +//#endif #undef Assert @implementation NGGZipStream # # NSMethodSignature+misc.m needs some work to properly build with GNUstep-base; # however it isn't used anywhere in the OGo source tree - rather remove it # --- opengroupware.org-core-0.9.0cvs20030717.orig/NGExtensions/GNUmakefile +++ opengroupware.org-core-0.9.0cvs20030717/NGExtensions/GNUmakefile @@ -83,7 +83,6 @@ NSEnumerator+misc.h \ NSException+misc.h \ NSFileManager+Extensions.h \ - NSMethodSignature+misc.h \ NSNull+misc.h \ NSObject+Logs.h \ NSObject+Values.h \ --- opengroupware.org-core-0.9.0cvs20030717.orig/NGExtensions/NGExtensions.m +++ opengroupware.org-core-0.9.0cvs20030717/NGExtensions/NGExtensions.m @@ -33,7 +33,6 @@ #include "NSArray+enumerator.h" #include "NSData+misc.h" #include "NSException+misc.h" -#include "NSMethodSignature+misc.h" #include "NSObject+Values.h" #include "NSSet+enumerator.h" #include "NSString+Formatting.h" --- opengroupware.org-core-0.9.0cvs20030717.orig/NGExtensions/FdExt.subproj/GNUmakefile +++ opengroupware.org-core-0.9.0cvs20030717/NGExtensions/FdExt.subproj/GNUmakefile @@ -14,7 +14,6 @@ NSEnumerator+misc.m \ NSException+misc.m \ NSFileManager+Extensions.m \ - NSMethodSignature+misc.m \ NSNull+misc.m \ NSObject+Logs.m \ NSObject+Values.m \ --- opengroupware.org-core-0.9.0cvs20030717.orig/SxCore.pbproj/project.pbxproj +++ opengroupware.org-core-0.9.0cvs20030717/SxCore.pbproj/project.pbxproj @@ -878,7 +878,6 @@ E80E559F04811A4000A865E9, E80E55A004811A4000A865E9, E80E55A104811A4000A865E9, - E80E55A204811A4000A865E9, E80E55A304811A4000A865E9, E80E55A404811A4000A865E9, E80E55A504811A4000A865E9, @@ -5109,7 +5108,6 @@ E80E55DC04811A4000A865E9, E80E55DD04811A4000A865E9, E80E55DE04811A4000A865E9, - E80E55DF04811A4000A865E9, E80E55E004811A4000A865E9, E80E55E104811A4000A865E9, E80E55E204811A4000A865E9, @@ -5173,7 +5171,6 @@ E80E561C04811A8300A865E9, E80E561D04811A8300A865E9, E80E561E04811A8300A865E9, - E80E561F04811A8300A865E9, E80E562004811A8300A865E9, E80E562104811A8300A865E9, E80E562204811A8300A865E9, @@ -7173,7 +7170,6 @@ E80E560804811A8300A865E9, E80E560904811A8300A865E9, E80E560A04811A8300A865E9, - E80E560B04811A8300A865E9, E80E560C04811A8300A865E9, E80E560D04811A8300A865E9, E80E560E04811A8300A865E9, @@ -7551,13 +7547,6 @@ path = "NGExtensions/NGExtensions/NSFileManager+Extensions.h"; refType = 4; }; - E80E55A204811A4000A865E9 = { - fileEncoding = 4; - isa = PBXFileReference; - name = "NSMethodSignature+misc.h"; - path = "NGExtensions/NGExtensions/NSMethodSignature+misc.h"; - refType = 4; - }; E80E55A304811A4000A865E9 = { fileEncoding = 4; isa = PBXFileReference; @@ -8078,15 +8067,6 @@ ); }; }; - E80E55DF04811A4000A865E9 = { - fileRef = E80E55A204811A4000A865E9; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; E80E55E004811A4000A865E9 = { fileRef = E80E55A304811A4000A865E9; isa = PBXBuildFile; @@ -8396,13 +8376,6 @@ path = "NGExtensions/FdExt.subproj/NSFileManager+Extensions.m"; refType = 4; }; - E80E560B04811A8300A865E9 = { - fileEncoding = 4; - isa = PBXFileReference; - name = "NSMethodSignature+misc.m"; - path = "NGExtensions/FdExt.subproj/NSMethodSignature+misc.m"; - refType = 4; - }; E80E560C04811A8300A865E9 = { fileEncoding = 4; isa = PBXFileReference; @@ -8527,12 +8500,6 @@ settings = { }; }; - E80E561F04811A8300A865E9 = { - fileRef = E80E560B04811A8300A865E9; - isa = PBXBuildFile; - settings = { - }; - }; E80E562004811A8300A865E9 = { fileRef = E80E560C04811A8300A865E9; isa = PBXBuildFile; # # The tests whether to link with libFoundationExt tell to do so even when # trying to build with GNUstep-base. Can someone with better knowledge of # GNUstep come up with failproof tests? # About the sasl thing: it (and with the right soname) should get pulled in # by libldap* if the latter is linked properly. # --- opengroupware.org-core-0.9.0cvs20030717.orig/EOControl/GNUmakefile.preamble +++ opengroupware.org-core-0.9.0cvs20030717/EOControl/GNUmakefile.preamble @@ -8,7 +8,7 @@ libEOControl_LIBRARIES_DEPEND_UPON += -lFoundation endif ifeq ($(FOUNDATION_LIB),nx) -libEOControl_LIBRARIES_DEPEND_UPON += -lFoundationExt +#libEOControl_LIBRARIES_DEPEND_UPON += -lFoundationExt endif ifeq ($(FOUNDATION_LIB),gnu) libEOControl_LIBRARIES_DEPEND_UPON += -lgnustep-base --- opengroupware.org-core-0.9.0cvs20030717.orig/NGExtensions/GNUmakefile.preamble +++ opengroupware.org-core-0.9.0cvs20030717/NGExtensions/GNUmakefile.preamble @@ -8,7 +8,7 @@ libNGExtensions_LIBRARIES_DEPEND_UPON += -lEOControl -lDOM -lz ifneq ($(FOUNDATION_LIB),fd) -libNGExtensions_LIBRARIES_DEPEND_UPON += -lFoundationExt +#libNGExtensions_LIBRARIES_DEPEND_UPON += -lFoundationExt endif ifeq ($(GNUSTEP_TARGET_OS),mingw32) @@ -19,10 +19,10 @@ endif ifeq ($(GNUSTEP_HOST_OS),rhapsody5.5) -libNGExtensions_LIBRARIES_DEPEND_UPON += -lFoundationExt +#libNGExtensions_LIBRARIES_DEPEND_UPON += -lFoundationExt endif ifeq ($(FOUNDATION_LIB),nx) -libNGExtensions_LIBRARIES_DEPEND_UPON += -lFoundationExt +#libNGExtensions_LIBRARIES_DEPEND_UPON += -lFoundationExt ADDITIONAL_LDFLAGS += -framework Foundation endif --- opengroupware.org-core-0.9.0cvs20030717.orig/NGLdap/GNUmakefile.preamble +++ opengroupware.org-core-0.9.0cvs20030717/NGLdap/GNUmakefile.preamble @@ -12,7 +12,8 @@ ifneq ($(FOUNDATION_LIB),nx) ifneq ($(nosasl),yes) -libNGLdap_LIBRARIES_DEPEND_UPON += -lsasl +# libsasl2 is pulled in by libldap; libsasl not found +#libNGLdap_LIBRARIES_DEPEND_UPON += -lsasl endif ifneq ($(nossl),yes) libNGLdap_LIBRARIES_DEPEND_UPON += -lssl @@ -20,9 +21,9 @@ else -libNGLdap_LIBRARIES_DEPEND_UPON += -lFoundationExt +#libNGLdap_LIBRARIES_DEPEND_UPON += -lFoundationExt ADDITIONAL_LDFLAGS += -framework Foundation -ADDITIONAL_TOOL_LIBS += -lFoundationExt +#ADDITIONAL_TOOL_LIBS += -lFoundationExt endif --- opengroupware.org-core-0.9.0cvs20030717.orig/NGMime/GNUmakefile.preamble +++ opengroupware.org-core-0.9.0cvs20030717/NGMime/GNUmakefile.preamble @@ -11,7 +11,7 @@ endif ifeq ($(GNUSTEP_TARGET_OS),darwin1.2) -libNGMime_LIBRARIES_DEPEND_UPON += -lFoundationExt +#libNGMime_LIBRARIES_DEPEND_UPON += -lFoundationExt endif libNGMime_LIB_DIRS += \ --- opengroupware.org-core-0.9.0cvs20030717.orig/NGStreams/GNUmakefile.preamble +++ opengroupware.org-core-0.9.0cvs20030717/NGStreams/GNUmakefile.preamble @@ -10,7 +10,7 @@ endif ifeq ($(FOUNDATION_LIB),nx) -libNGStreams_LIBRARIES_DEPEND_UPON += -lFoundationExt +#libNGStreams_LIBRARIES_DEPEND_UPON += -lFoundationExt endif ifeq ($(reentrant),yes) # # Fixes to not include extensions headers when using GNUstep-base. # I'm not sure how these affect building with Skyrix foundation libraries. # --- opengroupware.org-core-0.9.0cvs20030717.orig/NGExtensions/NGHashMap.m +++ opengroupware.org-core-0.9.0cvs20030717/NGExtensions/NGHashMap.m @@ -20,14 +20,14 @@ */ // $Id: NGHashMap.m,v 1.3 2003/07/11 17:12:46 jan Exp $ -#import "common.h" -#import "NGHashMap.h" -#import "NGMemoryAllocation.h" +#include "common.h" +#include "NGHashMap.h" +#include "NGMemoryAllocation.h" #if LIB_FOUNDATION_LIBRARY # import #elif GNUSTEP_BASE_LIBRARY -# import +//# import #else # import # import --- opengroupware.org-core-0.9.0cvs20030717.orig/NGExtensions/FdExt.subproj/NSNull+misc.m +++ opengroupware.org-core-0.9.0cvs20030717/NGExtensions/FdExt.subproj/NSNull+misc.m @@ -24,10 +24,12 @@ #include "common.h" #if LIB_FOUNDATION_LIBRARY || GNUSTEP_BASE_LIBRARY -# import -# import -# import +# include +# include +# include +#ifndef GNUSTEP # import +#endif #else # import # import --- opengroupware.org-core-0.9.0cvs20030717.orig/NGExtensions/FdExt.subproj/NSString+misc.m +++ opengroupware.org-core-0.9.0cvs20030717/NGExtensions/FdExt.subproj/NSString+misc.m @@ -20,9 +20,9 @@ */ // $Id: NSString+misc.m,v 1.3 2003/07/11 17:12:49 jan Exp $ -#import "common.h" -#import "NGMemoryAllocation.h" -#import "NSString+misc.h" +#include "common.h" +#include "NGMemoryAllocation.h" +#include "NSString+misc.h" #if !LIB_FOUNDATION_LIBRARY && !GNUSTEP_BASE_LIBRARY # import @@ -66,7 +66,7 @@ } buffer[pos] = '\0'; -#if NeXT_Foundation_LIBRARY +#if NeXT_Foundation_LIBRARY || GNUSTEP { NSString *s; --- opengroupware.org-core-0.9.0cvs20030717.orig/NGMime/NGMail/common.h +++ opengroupware.org-core-0.9.0cvs20030717/NGMime/NGMail/common.h @@ -23,7 +23,7 @@ #ifndef __NGMail_common_H__ #define __NGMail_common_H__ -#import +#include #if LIB_FOUNDATION_LIBRARY # import @@ -32,8 +32,10 @@ # import # import # else +# ifndef GNUSTEP # import # import +# endif # endif #endif --- opengroupware.org-core-0.9.0cvs20030717.orig/NGStreams/common.h +++ opengroupware.org-core-0.9.0cvs20030717/NGStreams/common.h @@ -25,7 +25,7 @@ // common include files -#import +#include // configuration @@ -55,8 +55,10 @@ # import # import #else +#ifndef GNUSTEP # include #endif +#endif #if !LIB_FOUNDATION_LIBRARY && !NeXT_Foundation_LIBRARY # define NSWillBecomeMultiThreadedNotification NSBecomingMultiThreaded --- opengroupware.org-core-0.9.0cvs20030717.orig/samples/common.h +++ opengroupware.org-core-0.9.0cvs20030717/samples/common.h @@ -20,12 +20,12 @@ */ // $Id: common.h,v 1.2 2003/07/11 17:12:50 jan Exp $ -#import +#include #if LIB_FOUNDATION_LIBRARY # import #elif GNUSTEP_BASE_LIBRARY -# import +//# import #else # import # import # # Fixes to use GNUstep (and OS X Foundation too AFAICT) classes & methods, # or extend them to get needed functionality. # --- opengroupware.org-core-0.9.0cvs20030717.orig/NGLdap/NGLdapConnection.m +++ opengroupware.org-core-0.9.0cvs20030717/NGLdap/NGLdapConnection.m @@ -722,7 +722,8 @@ while ((value = [values nextObject])) { unsigned idx; - if ((idx = [value indexOfString:@":"]) == NSNotFound) + //if ((idx = [value indexOfString:@":"]) == NSNotFound) + if ((idx = [value rangeOfString:@":"].location) == NSNotFound) /* couldn't parse value */ continue; --- opengroupware.org-core-0.9.0cvs20030717.orig/NGMime/NGImap4/NGImap4Client.m +++ opengroupware.org-core-0.9.0cvs20030717/NGMime/NGImap4/NGImap4Client.m @@ -40,6 +40,14 @@ @end /* NGImap4Client(ConnectionRegistration); */ +/* FIXME: move someplace better */ +@implementation NSException (setUserInfo) +- (id) setUserInfo: (NSDictionary*) _userInfo { + ASSIGN (self->_e_info, _userInfo); + return self; +} +@end + @interface NGImap4Client(Private) - (NGHashMap *)processCommand:(NSString *)_command; @@ -1615,7 +1623,7 @@ NSString *pref; pref = [VersionPrefixDict objectForKey:key]; - index = [lowServer indexOfString:pref]; + index = [lowServer rangeOfString:pref].location; if (index != NSNotFound) { /* cyrus server */ --- opengroupware.org-core-0.9.0cvs20030717.orig/NGMime/NGImap4/common.h +++ opengroupware.org-core-0.9.0cvs20030717/NGMime/NGImap4/common.h @@ -23,10 +23,12 @@ #ifndef __NGImap4_common_H__ #define __NGImap4_common_H__ -#import +#include #if LIB_FOUNDATION_LIBRARY || GNUSTEP_BASE_LIBRARY +#ifndef GNUSTEP # include +#endif #else # import # import @@ -35,11 +37,15 @@ # import #endif -#import +#include #include #include #include #include #include +@interface NSException (setUserInfo) +- (id) setUserInfo: (NSDictionary*) _userInfo; +@end + #endif /* __NGImap4_common_H__ */ --- opengroupware.org-core-0.9.0cvs20030717.orig/NGiCal/iCalDateHolder.m +++ opengroupware.org-core-0.9.0cvs20030717/NGiCal/iCalDateHolder.m @@ -85,7 +85,6 @@ - (id)awakeAfterUsingSaxDecoder:(id)_decoder { NSString *s; NSTimeZone *tz; - unsigned idx; s = self->string; if ([s length] < 5) { @@ -104,7 +103,8 @@ else tz = [self timeZone]; - if ((idx = [s indexOfString:@"T"]) != NSNotFound) { + //if ((idx = [s indexOfString:@"T"]) != NSNotFound) { + if ([s rangeOfString:@"T"].location != NSNotFound) { /* 012345678901234 20021009T094500 - 15 chars # # Just compiler warning fixes (about missing declarations or other things). # --- opengroupware.org-core-0.9.0cvs20030717.orig/samples/EOQualTool.h +++ opengroupware.org-core-0.9.0cvs20030717/samples/EOQualTool.h @@ -20,7 +20,10 @@ */ // $Id: EOQualTool.h,v 1.2 2003/07/11 17:12:50 jan Exp $ -#import +#ifndef __OGo_EOQualTool_H__ +#define __OGo_EOQualTool_H__ + +#include @class NSArray, EOQualifier; @@ -39,3 +42,4 @@ - (int)runWithArguments:(NSArray *)_args; @end +#endif --- opengroupware.org-core-0.9.0cvs20030717.orig/samples/EOQualTool.m +++ opengroupware.org-core-0.9.0cvs20030717/samples/EOQualTool.m @@ -20,10 +20,11 @@ */ // $Id: EOQualTool.m,v 1.2 2003/07/11 17:12:50 jan Exp $ -#import "EOQualTool.h" -#import "common.h" +#include "EOQualTool.h" +#include "common.h" #include #include +#include @interface dateTime : NSDate @end --- opengroupware.org-core-0.9.0cvs20030717.orig/samples/EncodingTool.h +++ opengroupware.org-core-0.9.0cvs20030717/samples/EncodingTool.h @@ -20,8 +20,11 @@ */ // $Id: EncodingTool.h,v 1.2 2003/07/11 17:12:50 jan Exp $ -#import -#import +#ifndef __OGo_EncodingTool_H__ +#define __OGo_EncodingTool_H__ + +#include +#include @class NSString; @@ -41,3 +44,4 @@ - (int)runWithArguments:(NSArray *)_args; @end +#endif --- opengroupware.org-core-0.9.0cvs20030717.orig/samples/ImapListTool.h +++ opengroupware.org-core-0.9.0cvs20030717/samples/ImapListTool.h @@ -20,7 +20,10 @@ */ // $Id: ImapListTool.h,v 1.2 2003/07/11 17:12:50 jan Exp $ -#import "ImapTool.h" +#ifndef __OGo_ImapListTool_H__ +#define __OGo_ImapListTool_H__ + +#include "ImapTool.h" @class NSArray; @@ -41,3 +44,4 @@ - (int)runWithArguments:(NSArray *)_args; @end +#endif --- opengroupware.org-core-0.9.0cvs20030717.orig/samples/Mime2XmlTool.h +++ opengroupware.org-core-0.9.0cvs20030717/samples/Mime2XmlTool.h @@ -20,7 +20,10 @@ */ // $Id: Mime2XmlTool.h,v 1.2 2003/07/11 17:12:50 jan Exp $ -#import +#ifndef __OGo_Mime2XMLTool_H__ +#define __OGo_Mime2XMLTool_H__ + +#include @class NSArray; @@ -45,3 +48,4 @@ - (int)runWithArguments:(NSArray *)_args; @end +#endif --- opengroupware.org-core-0.9.0cvs20030717.orig/samples/test_qpdecode.m +++ opengroupware.org-core-0.9.0cvs20030717/samples/test_qpdecode.m @@ -25,6 +25,7 @@ */ #include "common.h" +#include static void test(void) { static unsigned char *fields[] = { --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff-skyrix-xml --- OpenGroupware.org/SOPE/skyrix-xml/DOM/DOMNode.m +++ skyrix-xml/opengroupware.org-xml-0.9.0cvs20030717/DOM/DOMNode.m @@ -172,7 +172,7 @@ - (id)previousSibling { DOMNode *parent; - if ((parent = [self parentNode]) == nil) return nil; + if ((parent = (DOMNode*) [self parentNode]) == nil) return nil; if (parent == nil) return nil; if (![parent respondsToSelector:@selector(_domNodeBeforeNode:)]) return nil; return [parent _domNodeBeforeNode:self]; @@ -180,7 +180,7 @@ - (id)nextSibling { DOMNode *parent; - if ((parent = [self parentNode]) == nil) return nil; + if ((parent = (DOMNode*) [self parentNode]) == nil) return nil; if (parent == nil) return nil; if (![parent respondsToSelector:@selector(_domNodeBeforeNode:)]) return nil; return [parent _domNodeAfterNode:self]; --- OpenGroupware.org/SOPE/skyrix-xml/DOM/DOMXMLOutputter.m +++ skyrix-xml/opengroupware.org-xml-0.9.0cvs20030717/DOM/DOMXMLOutputter.m @@ -182,7 +182,7 @@ unsigned i, count; // getting new attributes prefixes and namespaces - list = [self newAttributePrefixesAndNamespaces:[_node attributes]]; + list = [self newAttributePrefixesAndNamespaces: (NSArray*) [_node attributes]]; // push new attribute prefixes and namespaces to stack for (i = 0, count = [list count]; i < count; i = i + 2) { --- OpenGroupware.org/SOPE/skyrix-xml/SaxObjC/SaxXMLReaderFactory.m +++ skyrix-xml/opengroupware.org-xml-0.9.0cvs20030717/SaxObjC/SaxXMLReaderFactory.m @@ -28,6 +28,7 @@ - (id)copyWithZone:(NSZone *)_zone { return [self retain]; } +@end #endif @implementation SaxXMLReaderFactory --- OpenGroupware.org/SOPE/skyrix-xml/XmlRpc/NSNotification+XmlRpcCoding.m +++ skyrix-xml/opengroupware.org-xml-0.9.0cvs20030717/XmlRpc/NSNotification+XmlRpcCoding.m @@ -41,7 +41,7 @@ - (void)encodeWithXmlRpcCoder:(XmlRpcEncoder *)_coder { NSString *n; -#if APPLE_Foundation_LIBRARY || NeXT_Foundation_LIBRARY +#if APPLE_Foundation_LIBRARY || NeXT_Foundation_LIBRARY || GNUSTEP n = [self name]; #else n = [self notificationName]; --uAKRQypu60I7Lcqm-- From gnustep-port@opengroupware.org Thu Jul 17 21:26:13 2003 From: gnustep-port@opengroupware.org (Fabien VALLON) Date: Thu, 17 Jul 2003 22:26:13 +0200 Subject: [OGo-GNUstep-Port] Re: [OGo-Developer] Roadmap and Versioning In-Reply-To: <01624AD8-B891-11D7-8344-000393C29C2A@opengroupware.org> References: <20030717122549.62994.qmail@web10704.mail.yahoo.com> <3F16AF97.8010702@opengroupware.org> <20030717193958.GA17822@vitel.alcove-fr> <01624AD8-B891-11D7-8344-000393C29C2A@opengroupware.org> Message-ID: <20030717202613.GA17948@vitel.alcove-fr> Helge Hess (helge.hess@opengroupware.org) wrote: > On Donnerstag, 17. Juli 2003, at 21:39 Uhr, Fabien VALLON wrote: > >>Excellent :-) I hope more people (znek!) join in and can actually > >>start > >>to get something going regarding the OSX port. > >>Fabien said he might help on that, too. > >> > >>I can help on specific problems, but lets talk about that at > >>macosx@ogo. > > > >why did you separate MOSX (Cocoa) & GNUstep port ? > >It should be quite the same .... > > Hm. I'm not sure. I think Cocoa is quite different to GNUstep, depends > on how we intend to do it, eg PBX or gnustep-make on Cocoa (I would now > prefer the latter). Is there a problem using gnustep-make on OSX (Nicola ?) I think MOSX could use it :) ( who says "Embrace & Extends" ;-) I'm talking about code. Do you plan separate cvs tree ? > And the target audience usually is also quite different, little OSX > people knowing GNUstep very well and the reverse as well. Well GNUstep/Foundation & Cocoa/Foundation are quite the same ... > Anyway, feel free to do crossposts ;-) done :) Fabien -- Fabien VALLON - fabien.vallon@fr.alcove.com Ingénieur Informatique Libre - Alcôve - http://www.alcove.com GNUstep - http://www.gnustep.org - From gnustep-port@opengroupware.org Fri Jul 18 08:03:04 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 09:03:04 +0200 Subject: [OGo-GNUstep-Port] Cocoa Porting, was: Re: [OGo-Developer] Roadmap and Versioning In-Reply-To: <20030717202613.GA17948@vitel.alcove-fr> References: <20030717122549.62994.qmail@web10704.mail.yahoo.com> <3F16AF97.8010702@opengroupware.org> <20030717193958.GA17822@vitel.alcove-fr> <01624AD8-B891-11D7-8344-000393C29C2A@opengroupware.org> <20030717202613.GA17948@vitel.alcove-fr> Message-ID: <3F179BA8.8080005@opengroupware.org> I took out developer@, since this is a macosx/gnustep-port issue. Fabien VALLON wrote: > Is there a problem using gnustep-make on OSX (Nicola ?) I don't think that there is a general problem. I invited Nicola to join the list, we'll see whether he finds time ;-) > I think MOSX could use it :) Yes, but it might be complicate to setup since the developer needs to fiddle around with all those environment sourcing which is a bit difficult in Finder. And the build-results should definitely be independend from GNUstep, that is, the build process should create frameworks and bundles usable without the GNUstep environment. Nicola has shown that this can work with Renaissance. > I'm talking about code. > Do you plan separate cvs tree ? Definitely not. A single codebase should work everywhere. >>And the target audience usually is also quite different, little OSX >>people knowing GNUstep very well and the reverse as well. > > Well GNUstep/Foundation & Cocoa/Foundation are quite the same ... Like libFoundation. GNUstep-base differs as much from libFoundation as Cocoa Foundation does. One concrete example is porting the file-descriptor handling in NSRunLoop, which isn't part of ObjC Cocoa, but both, libFoundation and gstep-base provide that. So we should use exactly that on gstep-base and find a good workaround for Cocoa (we currently use a hack there which uses NSFileHandle but seems to work fine). I think on Cocoa we might fix that by using CFRunLoop instead of NSRunLoop. Anyway, people should just get started ;-) regards, Helge -- http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 09:21:14 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 10:21:14 +0200 Subject: [OGo-GNUstep-Port] Now I'm in ... Message-ID: <3F17ADFA.1060207@opengroupware.org> Hi, I didn't realize that I'm actually not yet subscribed to the list, sigh ... Nice to see Nicola in here :-) There were patches to SOPE, can someone please send me the patches, I'll try if it breaks something and commit if not. regards, Helge -- http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 09:37:34 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 10:37:34 +0200 Subject: [OGo-GNUstep-Port] Patches Message-ID: <3F17B1CE.3020303@skyrix.com> Hi, please send any patches you want to have applied to patches@opengroupware.org. We are going to review/edit, test a bit and commit if everything looks fine. Thanks a lot, Helge -- __________________________________________________________________ Helge Hess Email: helge.hess@skyrix.com SKYRIX Software AG Tel: +49-391-6623-0 Universitaetsplatz 12 Fax: +49-391-6623-599 39104 Magdeburg, Germany Internet: http://www.skyrix.com __________________________________________________________________ Exchange your Exchange http://www.opengroupware.org/ __________________________________________________________________ From gnustep-port@opengroupware.org Fri Jul 18 10:34:04 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Fri, 18 Jul 2003 11:34:04 +0200 Subject: [OGo-GNUstep-Port] Re: [OGo-Developer] Patches In-Reply-To: <3F17B2CD.7030109@opengroupware.org> References: <3F17B2CD.7030109@opengroupware.org> Message-ID: <20030718093404.GJ10720@debian> On Fri, Jul 18, 2003 at 10:41:49AM +0200, Helge Hess wrote: > > please send any patches you want to have applied to > patches@opengroupware.org. We are going to review/edit, test a bit and > commit if everything looks fine. Is this to stay that way? Or only for now? Wouldn't it be better to send patches to (a) relevant mailing list(s) for review/feedback by more people? (you never know who's lurking) Regards, Filip -- "The MS-DOS filesystem is nice for removable media." -- H. Peter Anvin From gnustep-port@opengroupware.org Fri Jul 18 10:40:12 2003 From: gnustep-port@opengroupware.org (Nicola Pero) Date: Fri, 18 Jul 2003 10:40:12 +0100 (BST) Subject: [OGo-GNUstep-Port] Re: [OGo-Developer] Patches In-Reply-To: <20030718093404.GJ10720@debian> Message-ID: > > please send any patches you want to have applied to > > patches@opengroupware.org. We are going to review/edit, test a bit and > > commit if everything looks fine. > > Is this to stay that way? Or only for now? > > Wouldn't it be better to send patches to (a) relevant mailing list(s) for > review/feedback by more people? (you never know who's lurking) I agree. From gnustep-port@opengroupware.org Fri Jul 18 10:49:12 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 11:49:12 +0200 Subject: [OGo-GNUstep-Port] Re: [OGo-Developer] Patches In-Reply-To: <20030718093404.GJ10720@debian> References: <3F17B2CD.7030109@opengroupware.org> <20030718093404.GJ10720@debian> Message-ID: <3F17C298.3090301@opengroupware.org> Filip Van Raemdonck wrote: > On Fri, Jul 18, 2003 at 10:41:49AM +0200, Helge Hess wrote: >>please send any patches you want to have applied to >>patches@opengroupware.org. We are going to review/edit, test a bit and >>commit if everything looks fine. > > Is this to stay that way? Or only for now? We'll see what works out best. But we will stay to make tight control on who exactly is allowed to commit to ensure high quality of the codebase (I think this is the same for other OpenSource projects). I think I'll put up a list of people who are allowed to commit to the codebase later. For now, just post to patches. > Wouldn't it be better to send patches to (a) relevant mailing list(s) for > review/feedback by more people? (you never know who's lurking) Yes, it's certainly a good idea to post patches to a mailing list to get some feedback prior posting ot patches@ogo. Thanks a lot, Helge -- http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 12:12:47 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 13:12:47 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: <3F17ADFA.1060207@opengroupware.org> References: <3F17ADFA.1060207@opengroupware.org> Message-ID: <3F17D62F.80803@opengroupware.org> Hi, regarding the patches. The skyrix-xml patches are all applied in CVS. But various things in core are dubious and I'm still inspecting them ;-) eg: --- -#if NeXT_Foundation_LIBRARY +#if NeXT_Foundation_LIBRARY || GNUSTEP --- Shouldn't that be || GNUSTEP_BASE_LIBRARY ? Otherwise the code will be selected even for Cocoa and libFoundation when used with gstep-make, right ? Note: I won't accept any patches which will break Cocoa or libFoundation. I definitely do not want to have the mess which happend with gstep-gui, which back when Ovidiu worked on it happened to work with any Foundation (even the NeXT one) and now has a lot of ties into gstep-base internals. Please take care that lF and Cocoa compatibility are not broken. I would actually prefer that all of you have a parallel libFoundation/OGo-gstep-base installation to ensure that patches actually work (lessens workload on me ;-). best regards, Helge -- http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 12:21:41 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 13:21:41 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: <3F17B1CE.3020303@skyrix.com> References: <3F17B1CE.3020303@skyrix.com> Message-ID: <3F17D845.7040202@opengroupware.org> Hi, Helge Hess wrote: > please send any patches you want to have applied to > patches@opengroupware.org. We are going to review/edit, test a bit and > commit if everything looks fine. If you replace indexOfString: with rangeOfString:, AFAIK this is not supposed to work: --- - index = [lowServer indexOfString:pref]; + index = [lowServer rangeOfString:pref].location; if (index != NSNotFound) { --- If you use -rangeOfString:, you need to check the length, to find out whether something was actually found: --- r = [lowServer rangeOfString:pref] if (r.length > 0) { --- I think I run into this on Cocoa, but I'm not sure. regards, Helge -- http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 12:41:03 2003 From: gnustep-port@opengroupware.org (Nicola Pero) Date: Fri, 18 Jul 2003 12:41:03 +0100 (BST) Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: <3F17D62F.80803@opengroupware.org> Message-ID: > eg: > --- > -#if NeXT_Foundation_LIBRARY > +#if NeXT_Foundation_LIBRARY || GNUSTEP > --- > > Shouldn't that be || GNUSTEP_BASE_LIBRARY ? Otherwise the code will be > selected even for Cocoa and libFoundation when used with gstep-make, right ? No. gnustep-make/base #define GNUSTEP if and only if gnustep-base is being used. GNUSTEP and GNUSTEP_BASE_LIBRARY are equivalent. I know OGo's own makefile #defines GNUSTEP if gnustep-make is being used, but that's OGo's own strange quirk which should be removed (see my previous posts before replying). The macro GNUSTEP should of course be #defined by gnustep itself, not by OGo's makefile. > Note: I won't accept any patches which will break Cocoa or > libFoundation. That is fine. I agree. > I would actually prefer that all of you have a parallel > libFoundation/OGo-gstep-base installation to ensure that patches > actually work (lessens workload on me ;-). To setup the parallel installation you can use library-combos - if you do make sure to enable library-combos when ./configuring gnustep-make, as they are disabled by default in the latest gnustep-make (at popular request). From gnustep-port@opengroupware.org Fri Jul 18 12:53:48 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 13:53:48 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: References: Message-ID: <3F17DFCC.9050905@opengroupware.org> Hi, more issues, I think I post them to developer too, before other people step over it ;-) skyrix-core/NGLdap ---snip--- ifneq ($(nosasl),yes) -libNGLdap_LIBRARIES_DEPEND_UPON += -lsasl +# libsasl2 is pulled in by libldap; libsasl not found +#libNGLdap_LIBRARIES_DEPEND_UPON += -lsasl endif ---snap---- Wrong. OGo shouldn't only work on the latest, hippiest GNU/Linux distribution but even on old ones. And if we added a special compilation option on that, it certainly made some sense ;-) To be exact, there are deployed libldap libraries in some distribution (I think it was SuSE 6.3 or something) which do NOT link against libsasl even though requiring it. I know that it breaks on the latest GNU/Linux systems which use libsasl2, probably we need to make a configure script which checks for the proper sasl library available in the system. So on modern systems, you can type make debug=yes nosasl=yes all Maybe we should toggle the default-value, probably makes sense. best regards, Helge PS: I know I should post the OGo source styleguides, will do later ... -- http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 13:11:44 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Fri, 18 Jul 2003 14:11:44 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: <3F17D845.7040202@opengroupware.org> References: <3F17B1CE.3020303@skyrix.com> <3F17D845.7040202@opengroupware.org> Message-ID: <20030718121144.GK10720@debian> On Fri, Jul 18, 2003 at 01:21:41PM +0200, Helge Hess wrote: > > If you use -rangeOfString:, you need to check the length, to find out > whether something was actually found: <...> > I think I run into this on Cocoa, but I'm not sure. And it appears you're right, according to http://216.239.37.104/search?q=cache:3yf0ePoBBYIJ:developer.apple.com/techpubs/macosx/ReleaseNotes/CoreFoundation.html+rangeOfString+location+NSNotFound&hl=nl&ie=UTF-8 which mentions that being a bug and it being fixed in 10.2. So, I guess it's better to check the length then. /me goes of fixing that in other changes he has pipelined :-/ Regards, Filip -- "The nice thing about standards is that there are so many to choose from. And if you really don't like all the standards you just have to wait another year until the one arises you are looking for." -- Andrew Tanenbaum, "Introduction to Computer Networks" From gnustep-port@opengroupware.org Fri Jul 18 13:19:34 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 14:19:34 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: <20030718121144.GK10720@debian> References: <3F17B1CE.3020303@skyrix.com> <3F17D845.7040202@opengroupware.org> <20030718121144.GK10720@debian> Message-ID: <3F17E5D6.1090209@opengroupware.org> Further: -#import +#include I won't check that in, since it breaks Cocoa. I know that #import will be removed from gcc, but I'm not going to replace the Foundation includes for #import _now_, we can take how to deal with the issue later. Any other #import (imports which do not include Foundation, Cocoa or Appkit), should be replaced with #include of course. regards, Helge -- http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 13:50:02 2003 From: gnustep-port@opengroupware.org (Nicola Pero) Date: Fri, 18 Jul 2003 13:50:02 +0100 (BST) Subject: [OGo-GNUstep-Port] Re: [OGo-Developer] Roadmap and Versioning In-Reply-To: <20030717202613.GA17948@vitel.alcove-fr> Message-ID: > > >>Excellent :-) I hope more people (znek!) join in and can actually > > >>start > > >>to get something going regarding the OSX port. > > >>Fabien said he might help on that, too. > > >> > > >>I can help on specific problems, but lets talk about that at > > >>macosx@ogo. > > > > > >why did you separate MOSX (Cocoa) & GNUstep port ? > > >It should be quite the same .... > > > > Hm. I'm not sure. I think Cocoa is quite different to GNUstep, depends > > on how we intend to do it, eg PBX or gnustep-make on Cocoa (I would now > > prefer the latter). > > Is there a problem using gnustep-make on OSX (Nicola ?) > I think MOSX could use it :) Yes. I don't think there is anything wrong with using PBX, but using gnustep-make should be very easy, and be cross-platform. You can check Renaissance. We can probably improve on the framework vs library support. From gnustep-port@opengroupware.org Fri Jul 18 13:59:40 2003 From: gnustep-port@opengroupware.org (Nicola Pero) Date: Fri, 18 Jul 2003 13:59:40 +0100 (BST) Subject: [OGo-GNUstep-Port] Cocoa Porting, was: Re: [OGo-Developer] Roadmap and Versioning In-Reply-To: <3F179BA8.8080005@opengroupware.org> Message-ID: > Yes, but it might be complicate to setup since the developer needs to > fiddle around with all those environment sourcing which is a bit > difficult in Finder. > And the build-results should definitely be independend from GNUstep, > that is, the build process should create frameworks and bundles usable > without the GNUstep environment. Yes - I agree. gnustep-make should only be required when building. But for building, it works nicely for me, and it's quite easy to do. > Nicola has shown that this can work with Renaissance. Yes. It works nicely for me. Much more nicely than having to support PBX files, which would be difficult for me since I'm almost always on a linux box (left my Apple in Italy, so I rarely touch it now), and PBX files are inherently difficult to edit by hand. With Renaissance I can change the makefiles in linux, and be reasonably confident that if it compiles on linux, the result will build according to the new makefiles on Apple as well. If you attempt this route, please get/use the latest gnustep-make from CVS, and please contribute back to the main gnustep-make all changes and enhancements you do. Sharing is the root of success. :-) From gnustep-port@opengroupware.org Fri Jul 18 14:17:21 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 15:17:21 +0200 Subject: [OGo-GNUstep-Port] Re: [OGo-Developer] Roadmap and Versioning In-Reply-To: References: Message-ID: <2A3362E6-B922-11D7-B026-000393C29C2A@opengroupware.org> On Freitag, 18. Juli 2003, at 14:50 Uhr, Nicola Pero wrote: >> Is there a problem using gnustep-make on OSX (Nicola ?) >> I think MOSX could use it :) > > Yes. I don't think there is anything wrong with using PBX, but using > gnustep-make should be very easy, and be cross-platform. You can check > Renaissance. Problem is, that compilation for PBX users isn't that easy. We would need at least detailed instructions on how to setup the environment. Or we write some "make" wrapper (maybe gsmake) which sources GNUstep.sh prior forking make. Then we have the Xcode issue, not sure whether it will still support legacy targets. But I agree, we should start out using gstep-make and can add "proper" PBX files later. The PBX projects could support both, GNUstep make and own targets at the same time (and I actually think I prepared them that way). > We can probably improve on the framework vs library support. I guess we should resolve this issue first, IMHO it's a very important one. We should in no case use frameworks on any other OS but OSX. And we should definitely use frameworks on OSX. Since this is a pretty general topic, I think it should be covered by library.make (maybe supporting a XXX_NO_FRAMEWORK bool variable for disabling frameworks on OSX, so that they can still be used for libraries on that platform). regards, Helge -- OpenGroupware.org - http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 14:27:20 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 15:27:20 +0200 Subject: [OGo-MacOSX] Re: [OGo-GNUstep-Port] Cocoa Porting, was: Re: [OGo-Developer] Roadmap and Versioning In-Reply-To: References: Message-ID: <8F3A9ED7-B923-11D7-B026-000393C29C2A@opengroupware.org> On Freitag, 18. Juli 2003, at 14:59 Uhr, Nicola Pero wrote: > If you attempt this route, please get/use the latest gnustep-make from > CVS, and please contribute back to the main gnustep-make all changes > and > enhancements you do. Sharing is the root of success. :-) Yes, this needs to be done, but it may be a bit hard since OGo gstep-make has changes which need to be merged and which may conflict with "official" GNUstep make policies. It also contains some workarounds around "weird" bugs we found during package building on some old distributions. Also I definitely want to keep a "proven" gstep-make in CVS, GNUstep make wasn't very stable in the past changing a lot of things like pathes which are certainly important for GNUstep in it's state, but would break too much code considered stable in OGo. So I would suggest that we find a way where the OGo sources work with the OGo gstep-make and with the "official" GNUstep make packages at the same time. Does gstep-make allow USER_ROOT=SYSTEM_ROOT=LOCAL_ROOT ? (aka a --with-user-root configure option ?). regards, Helge -- OpenGroupware.org - http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 16:20:19 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 17:20:19 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: References: Message-ID: <577993A4-B933-11D7-8201-00039340AF4A@opengroupware.org> On Freitag, 18. Juli 2003, at 13:41 Uhr, Nicola Pero wrote: >> Shouldn't that be || GNUSTEP_BASE_LIBRARY ? Otherwise the code will be >> selected even for Cocoa and libFoundation when used with gstep-make, >> right ? > > No. gnustep-make/base #define GNUSTEP if and only if gnustep-base is > being used. GNUSTEP and GNUSTEP_BASE_LIBRARY are equivalent. Well, that doesn't make a lot of sense to me. Either GNUSTEP is different to GNUSTEP_BASE_LIBRARY (what does it mean then, gnu-gnu-gnu library combo ?) or if it is the same like GNUSTEP_BASE_LIBRARY, it should be removed. In any case GNUSTEP_BASE_LIBRARY is what was *meant* in the source code (since the section is gstep-base specific) and should be used. In other words: patches should use GNUSTEP_BASE_LIBRARY for denoting base-library specific sections (just like we use LIB_FOUNDATION_LIBRARY and APPLE_FOUNDATION_LIBRARY, case may differ). > I know OGo's own makefile #defines GNUSTEP if gnustep-make is being > used, > but that's OGo's own strange quirk which should be removed (see my > previous posts before replying). The macro GNUSTEP should of course be > #defined by gnustep itself, not by OGo's makefile. I guess GNUSTEP is used instead of something like GNUSTEP_MAKEFILES_ACTIVE, but I don't see the point of it anyway then. I think we need to distinguish two things: a) is gstep-make used for compilation or not b) is gstep-make used at runtime or not (eg use env for resource lookup) (didn't found a previous post of you, sorry ;-) > To setup the parallel installation you can use library-combos - if you > do > make sure to enable library-combos when ./configuring gnustep-make, as > they are disabled by default in the latest gnustep-make (at popular > request). Well, if that actually works in practice ;-) regards, Helge -- OpenGroupware.org http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 16:50:10 2003 From: gnustep-port@opengroupware.org (Nicola Pero) Date: Fri, 18 Jul 2003 16:50:10 +0100 (BST) Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: <577993A4-B933-11D7-8201-00039340AF4A@opengroupware.org> Message-ID: > >> Shouldn't that be || GNUSTEP_BASE_LIBRARY ? Otherwise the code will be > >> selected even for Cocoa and libFoundation when used with gstep-make, > >> right ? > > > > No. gnustep-make/base #define GNUSTEP if and only if gnustep-base is > > being used. GNUSTEP and GNUSTEP_BASE_LIBRARY are equivalent. > > Well, that doesn't make a lot of sense to me. Either GNUSTEP is > different to GNUSTEP_BASE_LIBRARY (what does it mean then, gnu-gnu-gnu > library combo ?) or if it is the same like GNUSTEP_BASE_LIBRARY, it > should be removed. GNUSTEP really means *-gnu-gnu, while GNUSTEP_BASE_LIBRARY means *-gnu-*. In OGo's case, the gui part of the library combo does not count, moreover at the moment gnustep-base implies gnustep-gui (which is not going to change unless Apple ports their AppKit to run on gnustep), so the two are equivalent from your point of view. You can use GNUSTEP_BASE_LIBRARY and forget about GNUSTEP if you think it's the only name which makes sense of the two. In that case, please remove any GNUSTEP define in your code to avoid conflicts with the other usage. > In any case GNUSTEP_BASE_LIBRARY is what was *meant* in the source code > (since the section is gstep-base specific) and should be used. Ok. That's fine then. > In other words: patches should use GNUSTEP_BASE_LIBRARY for denoting > base-library specific sections (just like we use LIB_FOUNDATION_LIBRARY > and APPLE_FOUNDATION_LIBRARY, case may differ). Ok. I'm absolutely happy with that. APPLE_FOUNDATION_LIBRARY is not currently defined in gnustep-make, but we can add it (I'd like the #defines used in OGo, and the ones generally #defined by gnustep-make and which everyone else is using, to match). > > I know OGo's own makefile #defines GNUSTEP if gnustep-make is being used, > > but that's OGo's own strange quirk which should be removed (see my > > previous posts before replying). The macro GNUSTEP should of course be > > #defined by gnustep itself, not by OGo's makefile. > > I guess GNUSTEP is used instead of something like > GNUSTEP_MAKEFILES_ACTIVE, but I don't see the point of it anyway then. > > I think we need to distinguish two things: > a) is gstep-make used for compilation or not > b) is gstep-make used at runtime or not (eg use env for resource lookup) How important is it to know inside the Objective-C source code if gnustep-make is used or not ? If it is, maybe gnustep-make should #define something itself to let code know it's being used to compile. > (didn't found a previous post of you, sorry ;-) http://mail.opengroupware.org/pipermail/gnustep-port/2003-July/000002.html From gnustep-port@opengroupware.org Fri Jul 18 19:28:18 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Fri, 18 Jul 2003 20:28:18 +0200 Subject: [OGo-GNUstep-Port] NSString extensions Message-ID: <20030718182818.GB29813@debian> --WhfpMioaduB5tiZL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Some string extensions used in OGo are not in gnustep-base anymore; attached is a patch which fixes that by changing the conditions whether they should be built internally or not. Also in the patch are two more small fixes, one for (not) linking Foundation extensions and another for (not) including Foundation extension headers. Regards, Filip -- www.benefon.fi is running Microsoft-IIS/4.0 on Solaris neat trick hmms. how come I think that netcraft is on crack --WhfpMioaduB5tiZL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff-skyrix-core --- opengroupware.org-core-0.9.0cvs20030718.orig/NGExtensions/FdExt.subproj/NSString+misc.m +++ opengroupware.org-core-0.9.0cvs20030718/NGExtensions/FdExt.subproj/NSString+misc.m @@ -20,9 +20,9 @@ */ // $Id: NSString+misc.m,v 1.3 2003/07/11 17:12:49 jan Exp $ -#import "common.h" -#import "NGMemoryAllocation.h" -#import "NSString+misc.h" +#include "common.h" +#include "NGMemoryAllocation.h" +#include "NSString+misc.h" #if !LIB_FOUNDATION_LIBRARY && !GNUSTEP_BASE_LIBRARY # import @@ -66,7 +66,7 @@ } buffer[pos] = '\0'; -#if NeXT_Foundation_LIBRARY +#if NeXT_Foundation_LIBRARY || GNUSTEP_BASE_LIBRARY { NSString *s; --- opengroupware.org-core-0.9.0cvs20030718.orig/NGExtensions/NGExtensions/NSString+Ext.h +++ opengroupware.org-core-0.9.0cvs20030718/NGExtensions/NGExtensions/NSString+Ext.h @@ -23,31 +23,40 @@ #ifndef __NGExtensions_NSString_Ext_H__ #define __NGExtensions_NSString_Ext_H__ #import -/* specific to gstep-base, supported in libFoundation */ +#if !LIB_FOUNDATION_LIBRARY + +@interface NSString(lfNSURLUtilities) + +- (BOOL)isAbsoluteURL; +- (NSString *)urlScheme; -#if !LIB_FOUNDATION_LIBRARY && !GNUSTEP_BASE_LIBRARY +@end @interface NSString(GSAdditions) +/* the following are not available in gstep-base 1.6 */ + - (NSString *)stringWithoutPrefix:(NSString *)_prefix; - (NSString *)stringWithoutSuffix:(NSString *)_suffix; +- (NSString *)stringByTrimmingLeadWhiteSpaces; +- (NSString *)stringByTrimmingTailWhiteSpaces; +- (NSString *)stringByTrimmingWhiteSpaces; + +#if !GNUSTEP_BASE_LIBRARY - (NSString *)stringByReplacingString:(NSString *)_orignal withString:(NSString *)_replacement; - (NSString *)stringByTrimmingLeadSpaces; - (NSString *)stringByTrimmingTailSpaces; - (NSString *)stringByTrimmingSpaces; - -/* the following are not available in gstep-base 1.6 ? */ -- (NSString *)stringByTrimmingLeadWhiteSpaces; -- (NSString *)stringByTrimmingTailWhiteSpaces; -- (NSString *)stringByTrimmingWhiteSpaces; +#endif @end /* NSString(GSAdditions) */ +#if !GNUSTEP_BASE_LIBRARY @interface NSMutableString(GNUstepCompatibility) - (void)trimLeadSpaces; @@ -55,20 +64,8 @@ - (void)trimSpaces; @end /* NSMutableString(GNUstepCompatibility) */ +#endif /* !GNUSTEP_BASE_LIBRARY */ -#endif - -/* specific to libFoundation */ - -#if !LIB_FOUNDATION_LIBRARY - -@interface NSString(lfNSURLUtilities) - -- (BOOL)isAbsoluteURL; -- (NSString *)urlScheme; - -@end - -#endif +#endif /* !LIB_FOUNDATION_LIBRARY */ #endif /* __NGExtensions_NSString_Ext_H__ */ --- opengroupware.org-core-0.9.0cvs20030718.orig/NGStreams/GNUmakefile.preamble +++ opengroupware.org-core-0.9.0cvs20030718/NGStreams/GNUmakefile.preamble @@ -10,7 +10,7 @@ endif ifeq ($(FOUNDATION_LIB),nx) -libNGStreams_LIBRARIES_DEPEND_UPON += -lFoundationExt +#libNGStreams_LIBRARIES_DEPEND_UPON += -lFoundationExt endif ifeq ($(reentrant),yes) --- opengroupware.org-core-0.9.0cvs20030718.orig/NGStreams/common.h +++ opengroupware.org-core-0.9.0cvs20030718/NGStreams/common.h @@ -25,7 +25,7 @@ // common include files -#import +#include // configuration @@ -55,8 +55,10 @@ # import # import #else +#ifndef GNUSTEP_BASE_LIBRARY # include #endif +#endif #if !LIB_FOUNDATION_LIBRARY && !NeXT_Foundation_LIBRARY # define NSWillBecomeMultiThreadedNotification NSBecomingMultiThreaded --WhfpMioaduB5tiZL-- From gnustep-port@opengroupware.org Fri Jul 18 21:09:39 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Fri, 18 Jul 2003 22:09:39 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: References: Message-ID: On Freitag, 18. Juli 2003, at 17:50 Uhr, Nicola Pero wrote: > GNUSTEP really means *-gnu-gnu, while GNUSTEP_BASE_LIBRARY means > *-gnu-*. OK. > You can use GNUSTEP_BASE_LIBRARY and forget about GNUSTEP if you think > it's the only name which makes sense of the two. In the case of OGo it's obviously the one and only correct selection since OGo code only cares about Foundation. And #ifdef GNUSTEP would imply a dependency on gui, which it has not. I also like the consistency in the naming (XXX_Foundation_LIBRARY). > In that case, please remove any GNUSTEP define in your code to avoid > conflicts with the other usage. Can anyone provide a patch for that ? Is it really used somewhere ? Actually I think it isn't used anywhere, but I'm not sure. >> In any case GNUSTEP_BASE_LIBRARY is what was *meant* in the source >> code >> (since the section is gstep-base specific) and should be used. > Ok. That's fine then. Yup :-) Didn't want to be offend, just wanted to point out how we do things, after all this is not a GNUstep project ;-) >> In other words: patches should use GNUSTEP_BASE_LIBRARY for denoting >> base-library specific sections (just like we use >> LIB_FOUNDATION_LIBRARY >> and APPLE_FOUNDATION_LIBRARY, case may differ). > > Ok. I'm absolutely happy with that. APPLE_FOUNDATION_LIBRARY is not > currently defined in gnustep-make, but we can add it (I'd like the > #defines used in OGo, and the ones generally #defined by gnustep-make > and > which everyone else is using, to match). I currently mix up NeXT_Foundation_LIBRARY and APPLE_Foundation_LIBRARY all over the code. It does mean the same to OGo source code :-( Anyone willing to provide a patch for that ? Actually I think we use COCOA_Foundation_LIBRARY, not APPLE. I don't know, someone just needs to clear that up and send a patch. Didn't say that MacOSX port is ready, said that it needs quite some work ;-) >> I guess GNUSTEP is used instead of something like >> GNUSTEP_MAKEFILES_ACTIVE, but I don't see the point of it anyway then. >> >> I think we need to distinguish two things: >> a) is gstep-make used for compilation or not >> b) is gstep-make used at runtime or not (eg use env for resource >> lookup) > > How important is it to know inside the Objective-C source code if > gnustep-make is used or not ? If it is, maybe gnustep-make should > #define > something itself to let code know it's being used to compile. Good question. I think it definitely needs to know whether it is compiled *for* a GNUstep environment (I suggested to split GNUstep-make into GNUstep-env and -make long time ago :-( ), so that we know whether we should consider the GNUSTEP_XXX variables. >> (didn't found a previous post of you, sorry ;-) > http://mail.opengroupware.org/pipermail/gnustep-port/2003-July/ > 000002.html Ah, OK. Well, this contains some errors (which you corrected above) and you should document the exact meanings of the define somewhere, eg: ---snip--- The theory is that GNUSTEP is a GNUstep specific #define, and is #defined by gnustep-base to let the code know that gnustep-base is being used (check core/base/base.make). Which makes sense after all. ---snap--- As we all know now, it specifies a gnustep-base + gnustep-gui (and should be defined by gnustep-make, since gnustep-base can't know whether it's used with gnustep-gui. I think we can stay with NeXT_Foundation_LIBRARY. best regards, Helge -- OpenGroupware.org - http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 18 21:37:38 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Fri, 18 Jul 2003 22:37:38 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: References: Message-ID: <20030718203738.GC29813@debian> On Fri, Jul 18, 2003 at 10:09:39PM +0200, Helge Hess wrote: > On Freitag, 18. Juli 2003, at 17:50 Uhr, Nicola Pero wrote: >> >> In that case, please remove any GNUSTEP define in your code to avoid >> conflicts with the other usage. > > Is it really used somewhere? It is defined in some files, but not actually used anywhere it seems: mechanix@yggdrasil:opengroupware.org$ grep -r [^_-]GNUSTEP[^_-] OpenGroupware.org/ | grep -v ChangeLog | grep -v '/\*' OpenGroupware.org/SOPE/skyrix-core/NGExtensions/common.h:# define GNUSTEP 1 OpenGroupware.org/SOPE/skyrix-core/NGExtensions/common.h:# define GNUSTEP 0 OpenGroupware.org/SOPE/skyrix-core/NGExtensions/common.h:# define GNUSTEP 1 OpenGroupware.org/SOPE/skyrix-core/NGExtensions/NGExtensions/AutoDefines.h:# define GNUSTEP 1 OpenGroupware.org/SOPE/skyrix-core/NGExtensions/NGExtensions/AutoDefines.h:# define GNUSTEP 1 OpenGroupware.org/SOPE/skyrix-core/NGExtensions/NGExtensions/AutoDefines.h:# define GNUSTEP 0 OpenGroupware.org/SOPE/skyrix-core/NGExtensions/NGExtensions/AutoDefines.h:# define GNUSTEP 1 OpenGroupware.org/ThirdParty/libFoundation/Foundation/libFoundation.make.in:FND_DEFINE = -DLIB_FOUNDATION_LIBRARY=1 -DFD_WITH_GSMAKE=1 -DGNUSTEP=1 OpenGroupware.org/ThirdParty/libFoundation/Foundation/libFoundation.make.in:GNUSTEP_DEFINE = -DGNUSTEP=1 -DWITH_GSTEP_MAKE=1 >>> In other words: patches should use GNUSTEP_BASE_LIBRARY for denoting >>> base-library specific sections Doing that now for new changes. What about makefiles? Anything specific to use / check for there, if needed? Regards, Filip -- "The only stupid question is the unasked one." -- Martin Schulze From gnustep-port@opengroupware.org Fri Jul 18 22:19:49 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Fri, 18 Jul 2003 23:19:49 +0200 Subject: [OGo-GNUstep-Port] gcc 3 warnings Message-ID: <20030718211937.GD29813@debian> Hi, Gcc 3 is a bit more picky about some things, and some of the complaints it has go like this: SoHTTPAuthenticator.m: In function `-[SoHTTPAuthenticator authRealm]': SoHTTPAuthenticator.m:45: warning: multiple declarations for method `name' /usr/lib/gcc-lib/i386-linux/3.3.1/include/objc/Object.h:59: warning: using `-(const char *)name' /usr/lib/GNUstep/System/Headers/NGMime/NGMimeHeaderFields.h:58: warning: also found `-(NSString *)name' /usr/lib/GNUstep/System/Headers/NGExtensions/EOGrouping.h:82: warning: also found `-(NSString *)name' /usr/lib/GNUstep/System/Headers/Foundation/NSTimeZone.h:66: warning: also found `-(NSString *)name' /usr/lib/GNUstep/System/Headers/Foundation/NSHost.h:68: warning: also found `-(NSString *)name' /usr/lib/GNUstep/System/Headers/Foundation/NSNotification.h:52: warning: also found `-(NSString *)name' ../NGObjWeb/WOApplication.h:64: warning: also found `-(NSString *)name' /usr/lib/GNUstep/System/Headers/Foundation/NSException.h:61: warning: also found `-(NSString *)name' SoHTTPAuthenticator.m:45: warning: return from incompatible pointer type Now there are depending on the situation two or one solutions to get rid of these, AFAICT. The first is, where messages are sent which are defined in OGo specific classes, not to use too generic names for these methods so that they don't clash with others. The second is typecasting the recievers to the class from which the desired method is. For new methods, IMHO it's a good idea to use the first solution as it has the added benefit of (usually) making it easier to go find out where a specific method comes from when reading some code. However, it's a lot of work to change that through out an entire source tree, and it's error prone. So, would it be ok to typecast receivers as per the second solution to fix these warnings? Any objections? Regards, Filip -- "From a security perspective, Bluetooth is a disaster waiting to happen." -- Martin Reynolds From gnustep-port@opengroupware.org Sat Jul 19 00:27:23 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Sat, 19 Jul 2003 01:27:23 +0200 Subject: [OGo-GNUstep-Port] gcc 3 warnings In-Reply-To: <20030718211937.GD29813@debian> References: <20030718211937.GD29813@debian> Message-ID: <6255B2E4-B977-11D7-BC19-000393C29C2A@opengroupware.org> On Freitag, 18. Juli 2003, at 23:19 Uhr, Filip Van Raemdonck wrote: > Gcc 3 is a bit more picky about some things, and some of the > complaints it > has go like this: I know, we already fixed a lot of that stuff, but not everything :-( Actually it is not picky, but rather follows the spec (AFAIK Nicola has fixed the compiler which previously did not consider ObjC typing at all). > SoHTTPAuthenticator.m: In function `-[SoHTTPAuthenticator authRealm]': > SoHTTPAuthenticator.m:45: warning: multiple declarations for method > `name' ... > Now there are depending on the situation two or one solutions to get > rid > of these, AFAICT. > > The first is, where messages are sent which are defined in OGo specific > classes, not to use too generic names for these methods so that they > don't > clash with others. Well: a) this would be completely against the Smalltalk idea of ObjC, names should be the same if they do similiar things (like -name) b) it would be an unacceptable change to source code potentially breaking a lot of things > The second is typecasting the recievers to the class from which the > desired method is. This is the way to go, even being ugly, I admit :-( > For new methods, IMHO it's a good idea to use the first solution as it > has > the added benefit of (usually) making it easier to go find out where a > specific method comes from when reading some code. No, it's absolutely no good idea and is against all OO programming principles. Either you disable those warnings (because they are just warnings!) or you cast if you want to use the type system of C. We'll prefer the latter. > However, it's a lot of work to change that through out an entire source > tree, and it's error prone. Exactly. Not an option. > So, would it be ok to typecast receivers as per the second solution to > fix these warnings? Any objections? Yes, this is the way to go. It also makes the actual type of the receiver explicit which is not necessarily a bad thing. Thanks for your work! Helge -- OpenGroupware.org - http://www.opengroupware.org/ From gnustep-port@opengroupware.org Sun Jul 20 12:45:58 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Sun, 20 Jul 2003 13:45:58 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: <20030718203738.GC29813@debian> References: <20030718203738.GC29813@debian> Message-ID: On Freitag, 18. Juli 2003, at 22:37 Uhr, Filip Van Raemdonck wrote: >>> In that case, please remove any GNUSTEP define in your code to avoid >>> conflicts with the other usage. >> Is it really used somewhere? > > It is defined in some files, but not actually used anywhere it seems: I'll remove it tomorrow. It was probably used in a "historic" OSX port. >>>> In other words: patches should use GNUSTEP_BASE_LIBRARY for denoting >>>> base-library specific sections > Doing that now for new changes. Excellent :-) > What about makefiles? Anything specific to use / check for there, if > needed? Just the usual check: --- ifeq ($(FOUNDATION_LIB),gnu) --- Thanks a lot, Helge -- OpenGroupware.org - http://www.opengroupware.org/ From gnustep-port@opengroupware.org Mon Jul 21 18:58:30 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Mon, 21 Jul 2003 19:58:30 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: <20030718203738.GC29813@debian> References: <20030718203738.GC29813@debian> Message-ID: [GNUSTEP define] On Freitag, 18. Juli 2003, at 22:37 Uhr, Filip Van Raemdonck wrote: > It is defined in some files, but not actually used anywhere it seems: > > mechanix@yggdrasil:opengroupware.org$ grep -r [^_-]GNUSTEP[^_-] > OpenGroupware.org/ | grep -v ChangeLog | grep -v '/\*' It is used in some places, eg NGBundleManager, so we have to be careful not to break anything! I've replace some with !COCOA_Foundation_LIBRARY, but I'm actually not sure whether that is the way to go. What I really need is a compile time flag which tells me, whether the produced executable shall use the GNUstep environment for resource discovery. This is actually a bit complicated by the fact that we want to use GNUstep-make for compilation on OSX. But I still agree, that we need to remove that GNUSTEP define altogether. regards, Helge -- OpenGroupware.org - http://www.opengroupware.org/ From gnustep-port@opengroupware.org Mon Jul 21 19:11:50 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Mon, 21 Jul 2003 20:11:50 +0200 Subject: [OGo-GNUstep-Port] Re: NSString extensions In-Reply-To: <20030718182818.GB29813@debian> References: <20030718182818.GB29813@debian> Message-ID: On Freitag, 18. Juli 2003, at 20:28 Uhr, Filip Van Raemdonck wrote: > Some string extensions used in OGo are not in gnustep-base anymore; > attached is a patch which fixes that by changing the conditions whether > they should be built internally or not. Sigh. This once again shows the problem with using gstep-base as a default Foundation, it's absolutely unstable from an API point of view :-( If something is 1.x.x it is not allowed to remove API, if it does, you need to bump the major version! It isn't that long ago when I added the methods to be compatible with gstep-base. I'll take a look at the patch later this evening. Thanks, Helge -- OpenGroupware.org - http://www.opengroupware.org/ From gnustep-port@opengroupware.org Tue Jul 22 08:53:35 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Tue, 22 Jul 2003 09:53:35 +0200 Subject: [OGo-GNUstep-Port] gcc 3 warnings In-Reply-To: <6255B2E4-B977-11D7-BC19-000393C29C2A@opengroupware.org> References: <20030718211937.GD29813@debian> <6255B2E4-B977-11D7-BC19-000393C29C2A@opengroupware.org> Message-ID: <20030722075335.GA22071@debian> On Sat, Jul 19, 2003 at 01:27:23AM +0200, Helge Hess wrote: > On Freitag, 18. Juli 2003, at 23:19 Uhr, Filip Van Raemdonck wrote: > > > >The first is, where messages are sent which are defined in OGo specific > >classes, not to use too generic names for these methods so that they > >don't clash with others. > > this would be completely against the Smalltalk idea of ObjC, names > should be the same if they do similiar things (like -name) Agreed, though one could say that in that case they should have identical return types, to make it clear that they really are to do the same thing when observed from the outside (nomatter how different the internal implementation may be). > >The second is typecasting the recievers to the class from which the > >desired method is. > > This is the way to go, even being ugly, I admit :-( Yes and no. It makes it clear to the compiler what message to use. Actually, rereading the Objective-C book section on messages and selectors, this _is_ how it's supposed to be: "... except for messages sent to statically typed receivers, dynamic binding requires all implementations of identically named methods to have the same return type and the same argument types. (Statically typed receivers are an exception to this rule, since the compiler can learn about the method implementation from the class type.)" There is actually also a third solution which might not work in all cases - reduce the set of included header files to a minimum. Doing that *may* cause conflicting method signatures disappear from the compilers view. Then again, maybe not... (and I'm not sure whether that would even work, given the above, since all message which have identical names would at runtime still share the same selector) Regards, Filip -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin From gnustep-port@opengroupware.org Wed Jul 23 11:25:15 2003 From: gnustep-port@opengroupware.org (Nicola Pero) Date: Wed, 23 Jul 2003 11:25:15 +0100 (BST) Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: Message-ID: > [...] What I really need is a compile > time flag which tells me, whether the produced executable shall use the > GNUstep environment for resource discovery. What about using intelligently NSSearchPathForDirectoriesInDomains() to locate resources to load. From gnustep-port@opengroupware.org Wed Jul 23 11:26:59 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Wed, 23 Jul 2003 12:26:59 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: References: Message-ID: <30F7BF6D-BCF8-11D7-B838-000393C29C2A@opengroupware.org> On Mittwoch, 23. Juli 2003, at 12:25 Uhr, Nicola Pero wrote: >> [...] What I really need is a compile >> time flag which tells me, whether the produced executable shall use >> the >> GNUstep environment for resource discovery. > > What about using intelligently > NSSearchPathForDirectoriesInDomains() > to locate resources to load. libFoundation doesn't have that yet. But I think it isn't sufficient anyway. Eg config files are usually stored in GNUSTEP_USER_ROOT if available, instead of ~home to be able to host two completely separate OGo trees (required for ASP installations). IMHO this information should be made available. Eg it's also useful for C-tools, which do not use Foundation, but still run in the GNUstep environment. regards, Helge -- OpenGroupware.org - http://www.opengroupware.org/ From gnustep-port@opengroupware.org Wed Jul 23 12:03:15 2003 From: gnustep-port@opengroupware.org (Nicola Pero) Date: Wed, 23 Jul 2003 12:03:15 +0100 (BST) Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: <30F7BF6D-BCF8-11D7-B838-000393C29C2A@opengroupware.org> Message-ID: > >> [...] What I really need is a compile > >> time flag which tells me, whether the produced executable shall use > >> the > >> GNUstep environment for resource discovery. > > > > What about using intelligently > > NSSearchPathForDirectoriesInDomains() > > to locate resources to load. > > libFoundation doesn't have that yet. But I think it isn't sufficient > anyway. Eg config files are usually stored in GNUSTEP_USER_ROOT if > available, instead of ~home to be able to host two completely separate > OGo trees (required for ASP installations). NSSearchPathForDirectoriesInDomains() supports NSUserRootDomain. The environment variable GNUSTEP_USER_ROOT is not really a good way of finding the NSUserRootDomain; the cross-platform API is a better way of doing it. At least if you know that gnustep-base is being used, I recommend using NSSearchPathForDirectoriesInDomains() to locate resources. From gnustep-port@opengroupware.org Wed Jul 23 12:22:15 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Wed, 23 Jul 2003 13:22:15 +0200 Subject: [OGo-GNUstep-Port] Re: Patches In-Reply-To: References: Message-ID: On Mittwoch, 23. Juli 2003, at 13:03 Uhr, Nicola Pero wrote: > NSSearchPathForDirectoriesInDomains() supports NSUserRootDomain. The > environment variable GNUSTEP_USER_ROOT is not really a good way of > finding > the NSUserRootDomain; the cross-platform API is a better way of doing > it. > At least if you know that gnustep-base is being used, I recommend using > NSSearchPathForDirectoriesInDomains() to locate resources. Let us put it that way: anyone working on the GNUstep port can do as he likes as long as he doesn't break working stuff ;-) And as long as nobody cleaned things up, we need a flag which tells the code. I think in some places NSSearchPathForDirectoriesInDomains() is already used for Cocoa, but I still think that this is insufficient, though I have no prove at hand. Of course I have also nothing against someone providing a patch for libFoundation which adds a working NSSearchPathForDirectoriesInDomains (needs to be libFoundation-license, so please copy no code from gstep-base ;-). regards, Helge -- OpenGroupware.org - http://www.opengroupware.org/ From gnustep-port@opengroupware.org Fri Jul 25 11:44:34 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Fri, 25 Jul 2003 12:44:34 +0200 Subject: [OGo-GNUstep-Port] skyrix-sope rangeOfString changes Message-ID: <20030725104433.GA30879@lucretia> --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Attached is a patch which converts all indexOfString calls in skyrix-sope to rangeOfString, as well as minimal other fixes (mostly typecasts, and a few ifdef GNUSTEP_BASE_LIBRARY things) in files touched by these rangeOfString changes. Fairly straightforward I'd say; please apply. Regards, Filip -- > Too bad that John Romero probably doesn't want to leave Texas. Be careful what you wish for. When I lived there, I said that about a certain State Governor. See what happened? =) -- some blog comment --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff-skyrix-sope-range diff -ru skyrix-sope-old/NGObjDOM/common.h skyrix-sope-new/NGObjDOM/common.h --- skyrix-sope-old/NGObjDOM/common.h 2003-07-17 18:41:40.000000000 +0200 +++ skyrix-sope-new/NGObjDOM/common.h 2003-07-25 11:18:51.000000000 +0200 @@ -26,8 +26,10 @@ #import #if !LIB_FOUNDATION_LIBRARY +# ifndef GNUSTEP_BASE_LIBRARY # include # include +# endif #endif #include @@ -189,7 +191,7 @@ inFramework:nil languages:languages request:[_ctx request]]; - if ([uri indexOfString:@"/missingresource?"] != NSNotFound) + if ([uri rangeOfString:@"/missingresource?"].length > 0) uri = nil; return uri; diff -ru skyrix-sope-old/NGObjWeb/NGHttp/NGHttpHeaderFields.m skyrix-sope-new/NGObjWeb/NGHttp/NGHttpHeaderFields.m --- skyrix-sope-old/NGObjWeb/NGHttp/NGHttpHeaderFields.m 2003-07-17 18:41:44.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/NGHttp/NGHttpHeaderFields.m 2003-07-25 12:17:46.000000000 +0200 @@ -20,8 +20,8 @@ */ // $Id: NGHttpHeaderFields.m,v 1.2 2003/07/11 17:12:51 jan Exp $ -#import "common.h" -#import "NGHttpHeaderFields.h" +#include "common.h" +#include "NGHttpHeaderFields.h" @implementation NGHttpHostHeaderField @@ -375,20 +375,20 @@ NSString *s; s = [_value lowercaseString]; - - if ([s indexOfString:@"keep-alive"] != NSNotFound) { + + if ([s rangeOfString:@"keep-alive"].length > 0) { if ((self = [super init])) { self->keepAlive = YES; } return self; } - else if ([s indexOfString:@"close"] != NSNotFound) { + else if ([s rangeOfString:@"close"].length > 0) { if ((self = [super init])) { self->close = YES; } return self; } - else if ([s indexOfString:@"te"] != NSNotFound) { + else if ([s rangeOfString:@"te"].length > 0) { if ((self = [super init])) { self->isTE = YES; } @@ -453,17 +453,18 @@ @implementation NGHttpCredentials + (id)credentialsWithString:(NSString *)_cred { - unsigned int idx; + NSRange rng; NSString *lscheme; NSData *cred; if ([_cred length] == 0) return nil; - if ((idx = [_cred indexOfString:@" "]) == NSNotFound) + rng = [_cred rangeOfString:@" "]; + if (rng.length <= 0) return nil; - - lscheme = [_cred substringToIndex:idx]; - cred = [[_cred substringFromIndex:(idx + 1)] + + lscheme = [_cred substringToIndex:rng.location]; + cred = [[_cred substringFromIndex:(rng.location + 1)] dataUsingEncoding:NSISOLatin1StringEncoding]; return [self credentialsWithScheme:lscheme credentials:cred]; diff -ru skyrix-sope-old/NGObjWeb/NGXmlRpc/WODirectAction+XmlRpc.m skyrix-sope-new/NGObjWeb/NGXmlRpc/WODirectAction+XmlRpc.m --- skyrix-sope-old/NGObjWeb/NGXmlRpc/WODirectAction+XmlRpc.m 2003-07-17 18:41:44.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/NGXmlRpc/WODirectAction+XmlRpc.m 2003-07-25 11:53:26.000000000 +0200 @@ -101,14 +101,15 @@ while ((sel = [sels nextObject])) { unsigned idx, len; NSString *actionName; + NSRange rng; + + rng = [sel rangeOfString:@"Action"]; + if (rng.length <= 0) continue; - idx = [sel indexOfString:@"Action"]; - if (idx == NSNotFound) continue; - actionName = sel; /* ensure that only dots are following the 'Action' */ - for (idx = (idx + 6), len = [sel length]; idx < len; idx++) { + for (idx = (rng.location + 6), len = [sel length]; idx < len; idx++) { unichar c = [sel characterAtIndex:idx]; if (c != ':') { actionName = nil; diff -ru skyrix-sope-old/NGObjWeb/NGXmlRpc/WODirectAction+XmlRpcIntrospection.m skyrix-sope-new/NGObjWeb/NGXmlRpc/WODirectAction+XmlRpcIntrospection.m --- skyrix-sope-old/NGObjWeb/NGXmlRpc/WODirectAction+XmlRpcIntrospection.m 2003-07-17 18:41:45.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/NGXmlRpc/WODirectAction+XmlRpcIntrospection.m 2003-07-25 11:55:20.000000000 +0200 @@ -128,19 +128,19 @@ while ((sel = [sels nextObject])) { unsigned idx, len; NSString *actionName; + NSRange rng; if ([blacklist containsObject:sel]) continue; - - idx = [sel indexOfString:@"Action"]; - - if (idx == NSNotFound) continue; - + + rng = [sel rangeOfString:@"Action"]; + if (rng.length <= 0) continue; + /* strip Action */ - actionName = [sel substringToIndex:idx]; - + actionName = [sel substringToIndex:rng.location]; + /* ensure that only dots are following the 'Action' */ - for (idx = (idx + 6), len = [sel length]; idx < len; idx++) { + for (idx = (rng.location + 6), len = [sel length]; idx < len; idx++) { unichar c = [sel characterAtIndex:idx]; if (c != ':') { actionName = nil; diff -ru skyrix-sope-old/NGObjWeb/SoObjects/SoHTTPAuthenticator.m skyrix-sope-new/NGObjWeb/SoObjects/SoHTTPAuthenticator.m --- skyrix-sope-old/NGObjWeb/SoObjects/SoHTTPAuthenticator.m 2003-07-17 18:41:45.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/SoObjects/SoHTTPAuthenticator.m 2003-07-25 11:59:15.000000000 +0200 @@ -30,6 +30,8 @@ #include #include "common.h" +#include + @implementation SoHTTPAuthenticator + (int)version { @@ -39,7 +41,7 @@ /* HTTP basic authentication */ - (NSString *)authRealm { - return [[WOApplication application] name]; + return [(WOApplication *)[WOApplication application] name]; } /* check for roles */ @@ -50,7 +52,7 @@ } - (NSArray *)parseCredentials:(NSString *)_creds { - unsigned idx; + NSRange rng; NSString *login, *pwd; NSString *k; @@ -65,12 +67,13 @@ k = [k stringByDecodingBase64]; if (k == nil) return nil; - if ((idx = [k indexOfString:@":"]) == NSNotFound) { + rng = [k rangeOfString:@":"]; + if (rng.length <= 0) { [self logWithFormat:@"got malformed basic credentials !"]; return nil; } - login = [k substringToIndex:idx]; - pwd = [k substringFromIndex:(idx + 1)]; + login = [k substringToIndex:rng.location]; + pwd = [k substringFromIndex:(rng.location + 1)]; return [NSArray arrayWithObjects:login, pwd, nil]; } @@ -143,8 +146,8 @@ NSString *auth; NSString *k; NSString *user, *pwd; - unsigned idx; - + NSRange rng; + if ((auth = [[_ctx request] headerForKey:@"authorization"]) == nil) { /* no authentication provided */ static NSArray *anon = nil; @@ -172,17 +175,18 @@ [r appendContentString:@"could not decode base64 credentials"]; return r; } - - if ((idx = [k indexOfString:@":"]) == NSNotFound) { + + rng = [k rangeOfString:@":"]; + if (rng.length <= 0) { [self logWithFormat:@"got malformed basic credentials !"]; [r setStatus:400 /* bad request */]; [r appendContentString:@"did not find colon separator in credentials"]; return r; } - - user = [k substringToIndex:idx]; - pwd = [k substringFromIndex:(idx + 1)]; - + + user = [k substringToIndex:rng.location]; + pwd = [k substringFromIndex:(rng.location + 1)]; + if ([user length] == 0) { [self logWithFormat:@"got malformed basic credentials !"]; [r setStatus:400 /* bad request */]; diff -ru skyrix-sope-old/NGObjWeb/SoObjects/WORequest+So.m skyrix-sope-new/NGObjWeb/SoObjects/WORequest+So.m --- skyrix-sope-old/NGObjWeb/SoObjects/WORequest+So.m 2003-07-17 18:41:46.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/SoObjects/WORequest+So.m 2003-07-25 12:03:49.000000000 +0200 @@ -116,24 +116,24 @@ x */ NSString *s; - unsigned cidx, nidx; - + NSRange crng, nrng; + s = [self contentAsString]; if ([s length] < 51) return NO; - - if ((cidx = [s indexOfString:@""]) == NSNotFound) - return NO; - if ((nidx = [s indexOfString:@""]) == NSNotFound) - return NO; - if (nidx < cidx) return NO; - - if ((cidx = [s indexOfString:@""]) == NSNotFound) - return NO; - if ((nidx = [s indexOfString:@""]) == NSNotFound) - return NO; - if (nidx > cidx) return NO; - + + crng = [s rangeOfString:@""]; + nrng = [s rangeOfString:@""]; + if (crng.length <= 0) return NO; + if (nrng.length <= 0) return NO; + if (nrng.location < crng.location) return NO; + + crng = [s rangeOfString:@""]; + nrng = [s rangeOfString:@""]; + if (crng.length <= 0) return NO; + if (nrng.length <= 0) return NO; + if (nrng.location > crng.location) return NO; + [self debugWithFormat: @"classified as XML-RPC because of POST and the contents " @"looks like XML-RPC "]; diff -ru skyrix-sope-old/NGObjWeb/WODirectAction.m skyrix-sope-new/NGObjWeb/WODirectAction.m --- skyrix-sope-old/NGObjWeb/WODirectAction.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WODirectAction.m 2003-07-25 12:19:20.000000000 +0200 @@ -84,12 +84,13 @@ - (id)performActionNamed:(NSString *)_actionName { SEL actionSel; - unsigned idx; + NSRange rng; /* discard everything after a point in the URL */ - if ((idx = [_actionName indexOfString:@"."]) != NSNotFound) - _actionName = [_actionName substringToIndex:idx]; - + rng = [_actionName rangeOfString:@"."]; + if (rng.length > 0) + _actionName = [_actionName substringToIndex:rng.location]; + _actionName = [_actionName stringByAppendingString:@"Action"]; actionSel = NSSelectorFromString(_actionName); diff -ru skyrix-sope-old/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m skyrix-sope-new/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m --- skyrix-sope-old/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m 2003-07-17 18:41:47.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m 2003-07-25 12:19:41.000000000 +0200 @@ -304,8 +304,8 @@ [mr setStatus:500]; accept = [woRequest headerForKey:@"accept"]; - - if ([accept indexOfString:@"text/html"] != NSNotFound) { + + if ([accept rangeOfString:@"text/html"].length > 0) { const unsigned char *txt = "could not perform request !
"; [mr setHeader:@"text/html" forKey:@"content-type"]; [mr setContent:[NSData dataWithBytes:txt length:strlen(txt)]]; diff -ru skyrix-sope-old/NGObjWeb/WOPageRequestHandler.m skyrix-sope-new/NGObjWeb/WOPageRequestHandler.m --- skyrix-sope-old/NGObjWeb/WOPageRequestHandler.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOPageRequestHandler.m 2003-07-25 12:20:18.000000000 +0200 @@ -196,12 +196,13 @@ - (id)performActionNamed:(NSString *)_actionName { SEL actionSel; - unsigned idx; - + NSRange rng; + /* discard everything after a point in the URL */ - if ((idx = [_actionName indexOfString:@"."]) != NSNotFound) - _actionName = [_actionName substringToIndex:idx]; - + rng = [_actionName rangeOfString:@"."]; + if (rng.length > 0) + _actionName = [_actionName substringToIndex:rng.location]; + _actionName = [_actionName stringByAppendingString:@"Action"]; if ((actionSel = NSSelectorFromString(_actionName)) == NULL) { diff -ru skyrix-sope-old/NGObjWeb/WORequest.m skyrix-sope-new/NGObjWeb/WORequest.m --- skyrix-sope-old/NGObjWeb/WORequest.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WORequest.m 2003-07-25 12:20:54.000000000 +0200 @@ -30,6 +30,7 @@ #include #include "common.h" #include "NGHttp+WO.h" +#include NGObjWeb_DECLARE NSString *WORequestValueData = @"wodata"; NGObjWeb_DECLARE NSString *WORequestValueInstance = @"woinst"; @@ -552,17 +553,20 @@ } if ((ua = [self headerForKey:@"user-agent"])) { - unsigned idx; + NSRange rng; + /* user-agent sometimes stores the browser-language, eg: Opera/5.0 (Linux 2.2.18 i686; U) [en] */ - if ((idx = [ua indexOfString:@"["]) != NSNotFound) { + rng = [ua rangeOfString:@"["]; + if (rng.length > 0) { NSString *tmp; - - tmp = [ua substringFromIndex:(idx + 1)]; - if ((idx = [tmp indexOfString:@"]"]) != NSNotFound) { - tmp = [tmp substringToIndex:idx]; + + tmp = [ua substringFromIndex:(rng.location + 1)]; + rng = [tmp rangeOfString:@"]"]; + if (rng.length > 0) { + tmp = [tmp substringToIndex:rng.location]; } if ((tmp = [self languageForBrowserLanguageCode:tmp])) diff -ru skyrix-sope-old/NGObjWeb/WORequestHandler.m skyrix-sope-new/NGObjWeb/WORequestHandler.m --- skyrix-sope-old/NGObjWeb/WORequestHandler.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WORequestHandler.m 2003-07-25 12:21:16.000000000 +0200 @@ -360,11 +360,11 @@ if ((ua = [self headerForKey:@"user-agent"]) == nil) return NO; - - if ([ua indexOfString:@"Konqueror"] != NSNotFound) + + if ([ua rangeOfString:@"Konqueror"].length > 0) return YES; - else if ([ua indexOfString:@"MSIE"] != NSNotFound) - return [ua indexOfString:@"Mac"] != NSNotFound ? YES : NO; + else if ([ua rangeOfString:@"MSIE"].length > 0) + return [ua rangeOfString:@"Mac"].length > 0 ? YES : NO; else return NO; } diff -ru skyrix-sope-old/NGObjWeb/WOSession.m skyrix-sope-new/NGObjWeb/WOSession.m --- skyrix-sope-old/NGObjWeb/WOSession.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOSession.m 2003-07-25 12:21:42.000000000 +0200 @@ -419,7 +419,7 @@ diff = [[NSDateClass date] timeIntervalSince1970] - st; printf("prof[%s %s]: %0.3fs\n", - [[page name] cString], sel_get_name(_cmd), diff); + [[(WOComponent *)page name] cString], sel_get_name(_cmd), diff); } WOContext_leaveComponent(_ctx, page); @@ -466,7 +466,8 @@ diff = [[NSDateClass date] timeIntervalSince1970] - st; printf("prof[%s %s]: %0.3fs\n", - [[page name] cString], sel_get_name(_cmd), diff); + [[(WOComponent *)page name] cString], sel_get_name(_cmd), diff); + //[page name], sel_get_name(_cmd), diff); } WOContext_leaveComponent(_ctx, page); @@ -486,8 +487,8 @@ NSString *ctype; ctype = [_response headerForKey:@"content-type"]; - - if ([ctype indexOfString:@"html"] != NSNotFound) + + if ([ctype rangeOfString:@"html"].length > 0) // profiling OSX: 3.1% of append... [_response disableClientCaching]; } diff -ru skyrix-sope-old/NGObjWeb/WOStats.m skyrix-sope-new/NGObjWeb/WOStats.m --- skyrix-sope-old/NGObjWeb/WOStats.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOStats.m 2003-07-25 12:22:13.000000000 +0200 @@ -56,13 +56,14 @@ lines = [[s componentsSeparatedByString:@"\n"] objectEnumerator]; while ((s = [lines nextObject])) { NSString *key; - int idx; - - if ((idx = [s indexOfString:@":"]) == NSNotFound) + NSRange rng; + + rng = [s rangeOfString:@":"]; + if (rng.length <= 0) continue; - key = [s substringToIndex:idx]; - + key = [s substringToIndex:rng.location]; + if ([key hasPrefix:@"Vm"]) { const char *cstr; id value; diff -ru skyrix-sope-old/SxComponents/sxc_call.m skyrix-sope-new/SxComponents/sxc_call.m --- skyrix-sope-old/SxComponents/sxc_call.m 2003-07-17 18:41:48.000000000 +0200 +++ skyrix-sope-new/SxComponents/sxc_call.m 2003-07-25 12:22:44.000000000 +0200 @@ -223,8 +223,8 @@ } /* process this syntax: "a=2,b=3,c=9" */ - - if ([_arg indexOfString:@"="] != NSNotFound) { + + if ([_arg rangeOfString:@"="].length > 0) { NSEnumerator *pairs; NSMutableDictionary *md; NSString *s; @@ -700,8 +700,8 @@ } /* lookup component */ - - if ((component = [reg getComponent:[args objectAtIndex:1]]) == nil) { + + if ((component = (SxComponent *)[reg getComponent:[args objectAtIndex:1]]) == nil) { NSLog(@"did not find component named '%@'.", [args objectAtIndex:1]); [self exit:EXIT_MISSING_COMPONENT]; diff -ru skyrix-sope-old/WEExtensions/WECalendarField.m skyrix-sope-new/WEExtensions/WECalendarField.m --- skyrix-sope-old/WEExtensions/WECalendarField.m 2003-07-17 18:41:49.000000000 +0200 +++ skyrix-sope-new/WEExtensions/WECalendarField.m 2003-07-25 11:26:33.000000000 +0200 @@ -1062,10 +1062,10 @@ else { NSString *fmt = [self->format stringValueInComponent:_comp]; - return ([fmt indexOfString:@"S"] == NSNotFound) ? NO : YES; + return ([fmt rangeOfString:@"S"].length > 0) ? YES : NO; } - } - return (self->second != nil); + } + return (self->second != nil); } - (BOOL)hasMinuteInComponent:(WOComponent *)_comp { @@ -1075,9 +1075,9 @@ else { NSString *fmt = [self->format stringValueInComponent:_comp]; - return ([fmt indexOfString:@"M"] == NSNotFound) ? NO : YES; + return ([fmt rangeOfString:@"M"].length > 0) ? YES : NO; } - } + } return (self->minute != nil); } @@ -1088,9 +1088,9 @@ else { NSString *fmt = [self->format stringValueInComponent:_comp]; - return ([fmt indexOfString:@"H"] == NSNotFound) ? NO : YES; + return ([fmt rangeOfString:@"H"].length > 0) ? YES : NO; } - } + } return (self->hour != nil); } @@ -1101,10 +1101,10 @@ else { NSString *fmt = [self->format stringValueInComponent:_comp]; - return ([fmt indexOfString:@"d"] == NSNotFound) ? NO : YES; + return ([fmt rangeOfString:@"d"].length > 0) ? YES : NO; } - } - return (self->day != nil); + } + return (self->day != nil); } - (BOOL)hasMonthInComponent:(WOComponent *)_comp { @@ -1114,10 +1114,10 @@ else { NSString *fmt = [self->format stringValueInComponent:_comp]; - return ([fmt indexOfString:@"m"] == NSNotFound) ? NO : YES; + return ([fmt rangeOfString:@"m"].length > 0) ? YES : NO; } } - return (self->month != nil); + return (self->month != nil); } - (BOOL)hasYearInComponent:(WOComponent *)_comp { @@ -1127,10 +1127,10 @@ else { NSString *fmt = [self->format stringValueInComponent:_comp]; - return ([fmt indexOfString:@"Y"] == NSNotFound) ? NO : YES; + return ([fmt rangeOfString:@"Y"].length > 0) ? YES : NO; } } - return (self->year != nil); + return (self->year != nil); } @end diff -ru skyrix-sope-old/WEExtensions/WEMonthOverview.m skyrix-sope-new/WEExtensions/WEMonthOverview.m --- skyrix-sope-old/WEExtensions/WEMonthOverview.m 2003-07-17 18:41:49.000000000 +0200 +++ skyrix-sope-new/WEExtensions/WEMonthOverview.m 2003-07-25 12:08:20.000000000 +0200 @@ -20,9 +20,12 @@ */ // $Id: # -#import +#include #include -#import "WEContextConditional.h" +#include "WEContextConditional.h" + +/* Needed for ceil()/floor() */ +#include static NSString *WEMonthOverview_InfoMode = @"WEMonthOverview_InfoMode"; static NSString *WEMonthOverview_ContentMode = @"WEMonthOverview_ContentMode"; @@ -902,7 +905,7 @@ BOOL isEdge; orient = [self->orientation valueInComponent:[_ctx component]]; - isEdge = [orient indexOfString:@"/"] != NSNotFound; + isEdge = ([orient rangeOfString:@"/"].length > 0); op = [_ctx valueForKey:@"WEMonthOverview"]; if ((tmp = [op objectForKey:orient])) { @@ -925,7 +928,7 @@ id result; orient = [self->orientation valueInComponent:[_ctx component]]; - isEdge = [orient indexOfString:@"/"] != NSNotFound; + isEdge = ([orient rangeOfString:@"/"].length > 0); op = [_ctx valueForKey:@"WEMonthOverview"]; if ((tmp = [op objectForKey:orient])) { @@ -969,7 +972,7 @@ int cols = -1; orient = [self->orientation valueInComponent:[_ctx component]]; - isEdge = [orient indexOfString:@"/"] != NSNotFound; + isEdge = ([orient rangeOfString:@"/"].length > 0); if (orient == nil) return; diff -ru skyrix-sope-old/WEExtensions/common.h skyrix-sope-new/WEExtensions/common.h --- skyrix-sope-old/WEExtensions/common.h 2003-07-17 18:41:49.000000000 +0200 +++ skyrix-sope-new/WEExtensions/common.h 2003-07-25 11:18:51.000000000 +0200 @@ -63,7 +63,7 @@ inFramework:nil languages:languages request:[_ctx request]]; - if ([uri indexOfString:@"/missingresource?"] != NSNotFound) + if ([uri rangeOfString:@"/missingresource?"].length > 0) uri = nil; return uri; diff -ru skyrix-sope-old/WOExtensions/WODictionaryRepetition.m skyrix-sope-new/WOExtensions/WODictionaryRepetition.m --- skyrix-sope-old/WOExtensions/WODictionaryRepetition.m 2003-07-17 18:41:50.000000000 +0200 +++ skyrix-sope-new/WOExtensions/WODictionaryRepetition.m 2003-07-25 11:18:51.000000000 +0200 @@ -66,7 +66,7 @@ return _key; } - (NSString *)escapeKey:(NSString *)_key { - if ([_key indexOfString:@"."] != NSNotFound) { + if ([_key rangeOfString:@"."].length > 0) { NSLog(@"WARNING(%s): key '%@' can't be processed by " @"WODictionaryRepetition !!", __PRETTY_FUNCTION__, _key); diff -ru skyrix-sope-old/WOExtensions/common.h skyrix-sope-new/WOExtensions/common.h --- skyrix-sope-old/WOExtensions/common.h 2003-07-17 18:41:50.000000000 +0200 +++ skyrix-sope-new/WOExtensions/common.h 2003-07-25 11:18:51.000000000 +0200 @@ -59,7 +59,7 @@ inFramework:nil languages:languages request:[_ctx request]]; - if ([uri indexOfString:@"/missingresource?"] != NSNotFound) + if ([uri rangeOfString:@"/missingresource?"].length > 0) uri = nil; return uri; --VbJkn9YxBvnuCH5J-- From gnustep-port@opengroupware.org Fri Jul 25 12:50:32 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Fri, 25 Jul 2003 13:50:32 +0200 Subject: [OGo-GNUstep-Port] skyrix-sope fixes Message-ID: <20030725115032.GA31092@lucretia> --eJnRUKwClWJh1Khz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, Attached is a patch which fixes assorted compilation problems in skyrix-sope using gnustep-base. It's similar to the skyrix-xml and skyrix-core patches I sent last week, specifically: - #if GNUSTEP_BASE_LIBRARY changes - typecasts - extra included files - small interface/implementation definition fixes - whatever I forgot to mention Please comment / apply. Regards, Filip -- Hardware, n.: The parts of a computer system that can be kicked. --eJnRUKwClWJh1Khz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff-skyrix-sope-misc diff -ru skyrix-sope-old/NGJavaScript/NGJavaScriptArray.m skyrix-sope-new/NGJavaScript/NGJavaScriptArray.m --- skyrix-sope-old/NGJavaScript/NGJavaScriptArray.m 2003-07-17 18:41:38.000000000 +0200 +++ skyrix-sope-new/NGJavaScript/NGJavaScriptArray.m 2003-07-25 13:10:54.000000000 +0200 @@ -37,7 +37,7 @@ static BOOL isInitialized = NO; if (!isInitialized) { isInitialized = YES; -#if NeXT_RUNTIME || APPLE_RUNTIME +#if NeXT_RUNTIME || APPLE_RUNTIME || GNUSTEP_BASE_LIBRARY # warning not supported on Apple yet (still required ?)... #else class_add_behavior(self, [NSMutableArray class]); diff -ru skyrix-sope-old/NGJavaScript/common.h skyrix-sope-new/NGJavaScript/common.h --- skyrix-sope-old/NGJavaScript/common.h 2003-07-17 18:41:39.000000000 +0200 +++ skyrix-sope-new/NGJavaScript/common.h 2003-07-25 13:10:54.000000000 +0200 @@ -29,17 +29,19 @@ #undef id #import -#import +#include #if NeXT_Foundation_LIBRARY || APPLE_Foundation_LIBRARY # include # include # include #else +# ifndef GNUSTEP_BASE_LIBRARY # include +# endif #endif // TODO: this is true for any gcc 3 ? -#if COCOA_Foundation_LIBRARY || NeXT_Foundation_LIBRARY +#if COCOA_Foundation_LIBRARY || NeXT_Foundation_LIBRARY || GNUSTEP_BASE_LIBRARY # define NG_VARARGS_AS_REFERENCE 1 #endif diff -ru skyrix-sope-old/NGObjDOM/Dynamic.subproj/ODR_bind_form.m skyrix-sope-new/NGObjDOM/Dynamic.subproj/ODR_bind_form.m --- skyrix-sope-old/NGObjDOM/Dynamic.subproj/ODR_bind_form.m 2003-07-17 18:41:40.000000000 +0200 +++ skyrix-sope-new/NGObjDOM/Dynamic.subproj/ODR_bind_form.m 2003-07-25 13:10:54.000000000 +0200 @@ -21,6 +21,7 @@ // $Id: ODR_bind_form.m,v 1.2 2003/07/11 17:12:51 jan Exp $ #include +#include /* attributes: @@ -54,7 +55,7 @@ #include #include #include -#import +#include @interface _ODRBindFormTemplateWrapper : WODynamicElement @end diff -ru skyrix-sope-old/NGObjDOM/Dynamic.subproj/ODR_bind_groupings.m skyrix-sope-new/NGObjDOM/Dynamic.subproj/ODR_bind_groupings.m --- skyrix-sope-old/NGObjDOM/Dynamic.subproj/ODR_bind_groupings.m 2003-07-17 18:41:40.000000000 +0200 +++ skyrix-sope-new/NGObjDOM/Dynamic.subproj/ODR_bind_groupings.m 2003-07-25 13:10:54.000000000 +0200 @@ -22,11 +22,11 @@ #include "ODR_bind_groupings.h" -#import +#include #include #include #include "common.h" - +#include "NGJavaScript/Core+JS.subproj/EOJavaScriptGrouping.h" @implementation ODR_bind_groupings - (void)appendNode:(id)_node diff -ru skyrix-sope-old/NGObjDOM/GNUmakefile.preamble skyrix-sope-new/NGObjDOM/GNUmakefile.preamble --- skyrix-sope-old/NGObjDOM/GNUmakefile.preamble 2003-07-10 00:57:26.000000000 +0200 +++ skyrix-sope-new/NGObjDOM/GNUmakefile.preamble 2003-07-25 13:10:54.000000000 +0200 @@ -11,5 +11,7 @@ -lNGExtensions \ ifneq ($(FOUNDATION_LIB),fd) +ifneq ($(FOUNDATION_LIB),gnu) libNGObjDOM_LIBRARIES_DEPEND_UPON += -lFoundationExt endif +endif diff -ru skyrix-sope-old/NGObjDOM/ODNodeRenderer+attributes.m skyrix-sope-new/NGObjDOM/ODNodeRenderer+attributes.m --- skyrix-sope-old/NGObjDOM/ODNodeRenderer+attributes.m 2003-07-17 18:41:39.000000000 +0200 +++ skyrix-sope-new/NGObjDOM/ODNodeRenderer+attributes.m 2003-07-25 13:10:54.000000000 +0200 @@ -354,8 +354,8 @@ languages:[[_ctx session] languages] request:[_ctx request]]; } - - if ([[_attrNode name] hasPrefix:@"on"]) + + if ([(NSString *)[_attrNode name] hasPrefix:@"on"]) return [[_ctx elementID] stringValue]; } return [[self valueForAttributeNode:_attrNode inContext:_ctx] stringValue]; diff -ru skyrix-sope-old/NGObjDOM/ODNodeRenderer.m skyrix-sope-new/NGObjDOM/ODNodeRenderer.m --- skyrix-sope-old/NGObjDOM/ODNodeRenderer.m 2003-07-17 18:41:39.000000000 +0200 +++ skyrix-sope-new/NGObjDOM/ODNodeRenderer.m 2003-07-25 13:25:33.000000000 +0200 @@ -471,8 +471,8 @@ [uid appendString:@"."]; /* determine index of _node */ - - children = [parent childNodes]; + + children = (NSArray *)[parent childNodes]; for (i = 0, count = [children count]; i < count; i++) { if ([children objectAtIndex:i] == node) break; diff -ru skyrix-sope-old/NGObjDOM/XHTML.subproj/ODRDynamicXHTMLTag.m skyrix-sope-new/NGObjDOM/XHTML.subproj/ODRDynamicXHTMLTag.m --- skyrix-sope-old/NGObjDOM/XHTML.subproj/ODRDynamicXHTMLTag.m 2003-07-17 18:41:40.000000000 +0200 +++ skyrix-sope-new/NGObjDOM/XHTML.subproj/ODRDynamicXHTMLTag.m 2003-07-25 13:10:54.000000000 +0200 @@ -22,6 +22,7 @@ #include "ODRDynamicXHTMLTag.h" #include "common.h" +#include #include #include diff -ru skyrix-sope-old/NGObjWeb/Associations/WOKeyPathAssociation.m skyrix-sope-new/NGObjWeb/Associations/WOKeyPathAssociation.m --- skyrix-sope-old/NGObjWeb/Associations/WOKeyPathAssociation.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/Associations/WOKeyPathAssociation.m 2003-07-25 13:10:54.000000000 +0200 @@ -28,7 +28,9 @@ #if NeXT_Foundation_LIBRARY || APPLE_Foundation_LIBRARY # include #else +# ifndef GNUSTEP_BASE_LIBRARY # include +# endif #endif #if NeXT_RUNTIME diff -ru skyrix-sope-old/NGObjWeb/DynamicElements/WOHyperlink.m skyrix-sope-new/NGObjWeb/DynamicElements/WOHyperlink.m --- skyrix-sope-old/NGObjWeb/DynamicElements/WOHyperlink.m 2003-07-17 18:41:43.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/DynamicElements/WOHyperlink.m 2003-07-25 13:10:54.000000000 +0200 @@ -27,6 +27,7 @@ #include #include #include "common.h" +#include #define PROFILE_CLUSTERS 0 diff -ru skyrix-sope-old/NGObjWeb/NGHttp/common.h skyrix-sope-new/NGObjWeb/NGHttp/common.h --- skyrix-sope-old/NGObjWeb/NGHttp/common.h 2003-07-17 18:41:44.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/NGHttp/common.h 2003-07-25 13:10:54.000000000 +0200 @@ -43,11 +43,13 @@ # import # import #else -# import -# if NeXT_FOUNDATION_LIBRARY || NeXT_Foundation_LIBRARY -# import -# else -# import +# ifndef GNUSTEP_BASE_LIBRARY +# import +# if NeXT_FOUNDATION_LIBRARY || NeXT_Foundation_LIBRARY +# import +# else +# import +# endif # endif #endif diff -ru skyrix-sope-old/NGObjWeb/NGHttp+WO.m skyrix-sope-new/NGObjWeb/NGHttp+WO.m --- skyrix-sope-old/NGObjWeb/NGHttp+WO.m 2003-07-17 18:41:41.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/NGHttp+WO.m 2003-07-25 13:25:55.000000000 +0200 @@ -333,8 +333,8 @@ [[DispClass alloc] initWithString:[disposition stringValue]]; [disposition autorelease]; } - - name = [disposition name]; + + name = [(NGMimeContentDispositionHeaderField *)disposition name]; partBody = [bodyPart body]; if (partBody) { diff -ru skyrix-sope-old/NGObjWeb/OWViewRequestHandler.m skyrix-sope-new/NGObjWeb/OWViewRequestHandler.m --- skyrix-sope-old/NGObjWeb/OWViewRequestHandler.m 2003-07-17 18:41:41.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/OWViewRequestHandler.m 2003-07-25 13:26:22.000000000 +0200 @@ -107,11 +107,11 @@ /* no request page (probably the first request) */ result = [app pageWithName:nil inContext:_ctx]; [(id)result _awakeWithContext:_ctx]; - [_ctx setPage:result]; + [_ctx setPage:(WOComponent *)result]; } } - - response = [self generateResponseForComponent:result + + response = [self generateResponseForComponent:(WOComponent *)result inContext:_ctx application:app]; diff -ru skyrix-sope-old/NGObjWeb/SNSConnection.m skyrix-sope-new/NGObjWeb/SNSConnection.m --- skyrix-sope-old/NGObjWeb/SNSConnection.m 2003-07-17 18:41:41.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/SNSConnection.m 2003-07-25 13:10:54.000000000 +0200 @@ -26,6 +26,10 @@ #include #include "common.h" +#ifdef GNUSTEP_BASE_LIBRARY +#include +#endif + // TODO: NEED TO FIX FOR Exception-less IO !!! (safeWrite...) typedef enum { diff -ru skyrix-sope-old/NGObjWeb/SoOFS/OFSHttpPasswd.m skyrix-sope-new/NGObjWeb/SoOFS/OFSHttpPasswd.m --- skyrix-sope-old/NGObjWeb/SoOFS/OFSHttpPasswd.m 2003-07-17 18:41:45.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/SoOFS/OFSHttpPasswd.m 2003-07-25 13:10:54.000000000 +0200 @@ -155,7 +155,7 @@ } - (NSString *)authRealm { - return [[WOApplication application] name]; + return [(WOApplication *)[WOApplication application] name]; } - (BOOL)isRootLogin:(NSString *)_login { diff -ru skyrix-sope-old/NGObjWeb/SoOFS/common.h skyrix-sope-new/NGObjWeb/SoOFS/common.h --- skyrix-sope-old/NGObjWeb/SoOFS/common.h 2003-07-17 18:41:45.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/SoOFS/common.h 2003-07-25 13:10:54.000000000 +0200 @@ -23,11 +23,13 @@ #if LIB_FOUNDATION_LIBRARY # import #else +#ifndef GNUSTEP_BASE_LIBRARY # import # import # import # import #endif +#endif #import #include diff -ru skyrix-sope-old/NGObjWeb/SoObjects/SoObjCClass.m skyrix-sope-new/NGObjWeb/SoObjects/SoObjCClass.m --- skyrix-sope-old/NGObjWeb/SoObjects/SoObjCClass.m 2003-07-17 18:41:45.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/SoObjects/SoObjCClass.m 2003-07-25 13:10:54.000000000 +0200 @@ -25,6 +25,8 @@ #include #include "common.h" +#include + @implementation SoObjCClass - (id)initWithSoSuperClass:(SoClass *)_soClass class:(Class)_clazz { diff -ru skyrix-sope-old/NGObjWeb/WOComponent.m skyrix-sope-new/NGObjWeb/WOComponent.m --- skyrix-sope-old/NGObjWeb/WOComponent.m 2003-07-17 18:41:41.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOComponent.m 2003-07-25 13:10:54.000000000 +0200 @@ -33,6 +33,7 @@ #include "common.h" #include #import +#include @interface WOContext(ComponentStackCount) - (unsigned)componentStackCount; @@ -46,7 +47,6 @@ static BOOL debugOn = NO; static BOOL debugComponentAwake = NO; static BOOL debugTemplates = NO; -static BOOL abortOnMissingCtx = NO; static BOOL abortOnAwakeComponentInCtxDealloc = NO; + (int)version { diff -ru skyrix-sope-old/NGObjWeb/WOContext.m skyrix-sope-new/NGObjWeb/WOContext.m --- skyrix-sope-old/NGObjWeb/WOContext.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOContext.m 2003-07-25 13:10:54.000000000 +0200 @@ -291,7 +291,7 @@ } - (id)cursor { - return [[self component] cursor]; + return [(id )[self component] cursor]; } /* components */ diff -ru skyrix-sope-old/NGObjWeb/WOCoreApplication.m skyrix-sope-new/NGObjWeb/WOCoreApplication.m --- skyrix-sope-old/NGObjWeb/WOCoreApplication.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOCoreApplication.m 2003-07-25 13:10:54.000000000 +0200 @@ -32,6 +32,8 @@ #if LIB_FOUNDATION_LIBRARY # import +#else +# include "UnixSignalHandler.h" #endif NGObjWeb_DECLARE NSString *WOApplicationDidFinishLaunchingNotification = diff -ru skyrix-sope-old/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m skyrix-sope-new/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m --- skyrix-sope-old/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m 2003-07-17 18:41:47.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m 2003-07-25 13:10:54.000000000 +0200 @@ -33,7 +33,11 @@ #if LIB_FOUNDATION_LIBRARY # import #else +# if GNUSTEP_BASE_LIBRARY +# include "UnixSignalHandler.h" +# else # import +# endif #endif //#define USE_POOLS 1 diff -ru skyrix-sope-old/NGObjWeb/WOStatisticsStore.m skyrix-sope-new/NGObjWeb/WOStatisticsStore.m --- skyrix-sope-old/NGObjWeb/WOStatisticsStore.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOStatisticsStore.m 2003-07-25 13:10:54.000000000 +0200 @@ -333,7 +333,7 @@ if ([page respondsToSelector:@selector(descriptionForResponse:inContext:)]) result = [page descriptionForResponse:_response inContext:_context]; else - result = [page name]; + result = [(WOComponent *)page name]; } else { return [NSString stringWithFormat:@"", diff -ru skyrix-sope-old/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m skyrix-sope-new/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m --- skyrix-sope-old/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m 2003-07-17 18:41:48.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m 2003-07-25 13:10:54.000000000 +0200 @@ -38,6 +38,7 @@ #include #include #include "common.h" +#include @interface WORequest(HackURI) - (void)_hackSetURI:(NSString *)_vuri; diff -ru skyrix-sope-old/NGObjWeb/WebDAV/SoWebDAVRenderer.m skyrix-sope-new/NGObjWeb/WebDAV/SoWebDAVRenderer.m --- skyrix-sope-old/NGObjWeb/WebDAV/SoWebDAVRenderer.m 2003-07-17 18:41:48.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WebDAV/SoWebDAVRenderer.m 2003-07-25 13:10:54.000000000 +0200 @@ -31,6 +31,7 @@ #include #include #include "common.h" +#include /* What HotMail uses for responses: diff -ru skyrix-sope-old/NGObjWeb/common.h skyrix-sope-new/NGObjWeb/common.h --- skyrix-sope-old/NGObjWeb/common.h 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/common.h 2003-07-25 13:10:54.000000000 +0200 @@ -35,7 +35,7 @@ #if LIB_FOUNDATION_LIBRARY # import #elif GNUSTEP_BASE_LIBRARY -# import +//# import #else # import # import @@ -88,4 +88,9 @@ # define PROFILE_CHECKPOINT(__key__) #endif +@interface NSException (setUserInfo) +- (id) setReason: (NSString*) _reason; +- (id) setUserInfo: (NSDictionary*) _userInfo; +@end + #endif /* __NGObjWeb_common_H__ */ diff -ru skyrix-sope-old/NGObjWeb/xmlrpc_call.m skyrix-sope-new/NGObjWeb/xmlrpc_call.m --- skyrix-sope-old/NGObjWeb/xmlrpc_call.m 2003-07-17 18:41:42.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/xmlrpc_call.m 2003-07-25 13:10:54.000000000 +0200 @@ -23,6 +23,12 @@ #include #include "common.h" +#include + +#ifdef GNUSTEP_BASE_LIBRARY +#include "UnixSignalHandler.h" +#endif + @class WOResponse; @interface NGXmlRpcClient(CallFailed) diff -ru skyrix-sope-old/NGScripting/common.h skyrix-sope-new/NGScripting/common.h --- skyrix-sope-old/NGScripting/common.h 2003-07-17 18:41:48.000000000 +0200 +++ skyrix-sope-new/NGScripting/common.h 2003-07-25 13:10:54.000000000 +0200 @@ -20,13 +20,20 @@ */ // $Id: common.h,v 1.2 2003/07/11 17:12:51 jan Exp $ -#import -#import +#ifndef __NGScripting_common_H__ +#define __NGScripting_common_H__ + +#include +#include #if !LIB_FOUNDATION_LIBRARY && !GNUSTEP_BASE_LIBRARY # include # include # include #else +# ifndef GNUSTEP_BASE_LIBRARY # include +# endif +#endif + #endif diff -ru skyrix-sope-old/SxComponents/SxComponentInvocation.m skyrix-sope-new/SxComponents/SxComponentInvocation.m --- skyrix-sope-old/SxComponents/SxComponentInvocation.m 2003-07-17 18:41:48.000000000 +0200 +++ skyrix-sope-new/SxComponents/SxComponentInvocation.m 2003-07-25 13:10:54.000000000 +0200 @@ -25,6 +25,8 @@ #include "SxComponent.h" #include "common.h" +#include + @implementation SxComponentInvocation static NSNull *null = nil; diff -ru skyrix-sope-old/SxComponents/SxXmlRpcComponent.m skyrix-sope-new/SxComponents/SxXmlRpcComponent.m --- skyrix-sope-old/SxComponents/SxXmlRpcComponent.m 2003-07-17 18:41:48.000000000 +0200 +++ skyrix-sope-new/SxComponents/SxXmlRpcComponent.m 2003-07-25 13:10:54.000000000 +0200 @@ -264,7 +264,7 @@ compRegistry = [self componentRegistry]; [compRegistry _removeComponentFromLookupCache:[self componentName]]; - tmpComp = [compRegistry getComponent:[self componentName]]; + tmpComp = (SxXmlRpcComponent *)[compRegistry getComponent:[self componentName]]; if (tmpComp != nil) { NSURL *tmpUrl; diff -ru skyrix-sope-old/SxComponents/common.h skyrix-sope-new/SxComponents/common.h --- skyrix-sope-old/SxComponents/common.h 2003-07-17 18:41:48.000000000 +0200 +++ skyrix-sope-new/SxComponents/common.h 2003-07-25 13:10:54.000000000 +0200 @@ -22,7 +22,7 @@ #import -#if !LIB_FOUNDATION_LIBRARY +#if !LIB_FOUNDATION_LIBRARY && !GNUSTEP_BASE_LIBRARY # include # include # include diff -ru skyrix-sope-old/SxComponents/sxc_ls.m skyrix-sope-new/SxComponents/sxc_ls.m --- skyrix-sope-old/SxComponents/sxc_ls.m 2003-07-17 18:41:48.000000000 +0200 +++ skyrix-sope-new/SxComponents/sxc_ls.m 2003-07-25 13:10:54.000000000 +0200 @@ -24,6 +24,7 @@ #include @interface SxcLsTool : NSObject +- (int) runWithArguments: (NSArray*) _args; @end @implementation SxcLsTool diff -ru skyrix-sope-old/WEExtensions/WEWeekColumnView.m skyrix-sope-new/WEExtensions/WEWeekColumnView.m --- skyrix-sope-old/WEExtensions/WEWeekColumnView.m 2003-07-17 18:41:49.000000000 +0200 +++ skyrix-sope-new/WEExtensions/WEWeekColumnView.m 2003-07-25 13:10:54.000000000 +0200 @@ -20,9 +20,12 @@ */ // $Id: # -#import "WEContextConditional.h" +#include "WEContextConditional.h" #include +/* Needed for ceil()/floor() */ +#include + /* draws this: @@ -82,7 +85,7 @@ } @end -#import "common.h" +#include "common.h" @implementation WEWeekColumnView diff -ru skyrix-sope-old/WEExtensions/WEWeekOverview.m skyrix-sope-new/WEExtensions/WEWeekOverview.m --- skyrix-sope-old/WEExtensions/WEWeekOverview.m 2003-07-17 18:41:49.000000000 +0200 +++ skyrix-sope-new/WEExtensions/WEWeekOverview.m 2003-07-25 13:10:54.000000000 +0200 @@ -20,9 +20,12 @@ */ // $Id: WEWeekOverview.m,v 1.2 2003/07/11 17:12:51 jan Exp $ -#import "WEContextConditional.h" +#include "WEContextConditional.h" #include +/* Needed for ceil()/floor() */ +#include + /* renders this: @@ -118,7 +121,7 @@ } @end -#import "common.h" +#include "common.h" @implementation WEWeekOverview --eJnRUKwClWJh1Khz-- From gnustep-port@opengroupware.org Fri Jul 25 13:12:15 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Fri, 25 Jul 2003 14:12:15 +0200 Subject: [OGo-GNUstep-Port] skyrix-sope installation paths Message-ID: <20030725121214.GA31513@lucretia> --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Small patch this time, needed for make install-ing into a different root - so that building packages won't clutter anything pre-existing - by setting GNUSTEP_INSTALLATION_DIR (in a similar way to DESTDIR for autotools built software). Regards, Filip -- "Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debugging Monday's code." -- Dan Salomon --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff-skyrix-sope-install diff -ru skyrix-sope-old/NGObjWeb/GNUmakefile skyrix-sope-new/NGObjWeb/GNUmakefile --- skyrix-sope-old/NGObjWeb/GNUmakefile 2003-07-10 00:57:26.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/GNUmakefile 2003-07-25 13:10:54.000000000 +0200 @@ -6,7 +6,7 @@ GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_LOCAL_ROOT) LIBRARY_NAME = libNGObjWeb -RESOURCES_DIR = $(GNUSTEP_LOCAL_ROOT)/Libraries/Resources/NGObjWeb +RESOURCES_DIR = $(GNUSTEP_RESOURCES)/NGObjWeb libNGObjWeb_CPPFLAGS += \ -pipe -DCOMPILING_NGOBJWEB=1 -DRESOURCES_DIR="$(RESOURCES_DIR)" diff -ru skyrix-sope-old/NGObjWeb/GNUmakefile.postamble skyrix-sope-new/NGObjWeb/GNUmakefile.postamble --- skyrix-sope-old/NGObjWeb/GNUmakefile.postamble 2003-07-10 00:57:26.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/GNUmakefile.postamble 2003-07-25 13:10:54.000000000 +0200 @@ -15,8 +15,8 @@ # $(INSTALL_DATA) woapp.make wobundle.make $(GNUSTEP_MAKEFILES) after-install :: - $(MKDIRS) $(GNUSTEP_MAKEFILES)/Additional/ - $(INSTALL_DATA) ngobjweb.make $(GNUSTEP_MAKEFILES)/Additional/ngobjweb.make + $(MKDIRS) $(GNUSTEP_INSTALLATION_DIR)/Library/Makefiles/Additional/ + $(INSTALL_DATA) ngobjweb.make $(GNUSTEP_INSTALLATION_DIR)/Library/Makefiles/Additional/ngobjweb.make ifeq ($(GNUSTEP_MAKE_VERSION),1.3.3) after-install :: --ReaqsoxgOBHFXBhH-- From gnustep-port@opengroupware.org Fri Jul 25 13:19:49 2003 From: gnustep-port@opengroupware.org (Filip Van Raemdonck) Date: Fri, 25 Jul 2003 14:19:49 +0200 Subject: [OGo-GNUstep-Port] script API change Message-ID: <20030725121949.GA31547@lucretia> --jq0ap7NbKX2Kqbes Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, This one I'm not sure about whether it's correct. Apparently the scripting interface slightly changed in the past, adding an argument to one message and removing one to another, but NGObjWeb/WOScriptedComponent.m was not updated to reflect this change. I've changed it into what I think is correct, but as I don't know the SOPE API (and it's internals) all that well yet, I can't tell for sure. Comments from someone in the knowing would be very welcome. Regards, Filip -- "If we knew what it was we were doing, we wouldn't call it research." -- Albert Einstein --jq0ap7NbKX2Kqbes Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff-skyrix-sope-scripting diff -ru skyrix-sope-old/NGObjWeb/WOScriptedComponent.m skyrix-sope-new/NGObjWeb/WOScriptedComponent.m --- skyrix-sope-old/NGObjWeb/WOScriptedComponent.m 2003-07-23 10:52:10.000000000 +0200 +++ skyrix-sope-new/NGObjWeb/WOScriptedComponent.m 2003-07-25 13:10:54.000000000 +0200 @@ -127,7 +127,8 @@ - (id)evaluateScript:(NSString *)_script language:(NSString *)_lang source:(NSString *)_src line:(unsigned)_line { - return [self->shadow evaluateScript:_script source:_src line:_line]; + /* FIXME: is onObject: the right one? */ + return [self->shadow evaluateScript:_script onObject:shadow source:_src line:_line]; } /* notification mapping */ @@ -196,8 +197,9 @@ [self logWithFormat:@"KVC: for key %@ call %@(%@)", _key, funcName, _value]; } - - result = [self->shadow callScriptFunction:funcName withObject:_value]; + + /* FIXME: no more withObject? */ + result = [self->shadow callScriptFunction:funcName]; } else { [self logWithFormat: --jq0ap7NbKX2Kqbes-- From gnustep-port@opengroupware.org Mon Jul 28 16:44:33 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Mon, 28 Jul 2003 17:44:33 +0200 Subject: [OGo-GNUstep-Port] Re: skyrix-sope fixes In-Reply-To: <20030725115032.GA31092@lucretia> References: <20030725115032.GA31092@lucretia> Message-ID: <3F2544E1.7000908@opengroupware.org> Filip Van Raemdonck wrote: > Attached is a patch which fixes assorted compilation problems in skyrix-sope > using gnustep-base. It's similar to the skyrix-xml and skyrix-core patches I > sent last week, specifically: > > - #if GNUSTEP_BASE_LIBRARY changes > - typecasts > - extra included files > - small interface/implementation definition fixes > - whatever I forgot to mention > > Please comment / apply. Modified and added to CVS. The fixes are not very clean and sometimes weird (eg including js/jsmath.h for floor() instead of math.h ...) Can you try whether everything is OK? regards, Helge -- http://www.opengroupware.org/ From gnustep-port@opengroupware.org Mon Jul 28 17:59:21 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Mon, 28 Jul 2003 18:59:21 +0200 Subject: [OGo-GNUstep-Port] Re: skyrix-sope rangeOfString changes In-Reply-To: <20030725104433.GA30879@lucretia> References: <20030725104433.GA30879@lucretia> Message-ID: <3F255669.2000009@opengroupware.org> Filip Van Raemdonck wrote: > Attached is a patch which converts all indexOfString calls in skyrix-sope to > rangeOfString, as well as minimal other fixes (mostly typecasts, and a few > ifdef GNUSTEP_BASE_LIBRARY things) in files touched by these rangeOfString > changes. > > Fairly straightforward I'd say; please apply. Cleaned up and applied that. Note: if you use rangeOfString, I consider this good style: r = [x rangeOfString:@"Action"]; trailer = [x substringFromIndex:(r.location + r.length)]; instead of: trailer = [x substringFromIndex:(r.location + 6)]; much more secure regarding changes ;-) regards, Helge -- http://www.opengroupware.org/ From gnustep-port@opengroupware.org Mon Jul 28 20:38:53 2003 From: gnustep-port@opengroupware.org (Helge Hess) Date: Mon, 28 Jul 2003 21:38:53 +0200 Subject: [OGo-GNUstep-Port] Re: gstep-make upgrade In-Reply-To: <20030728153142.GB8946@gambit.enfusion-group.com> References: <20030728153142.GB8946@gambit.enfusion-group.com> Message-ID: <1E8D42F6-C133-11D7-AD45-000393C29C2A@opengroupware.org> Hi, I took gnustep-port into CC, hope you two don't mind! On Montag, 28. Juli 2003, at 17:31 Uhr, Tony Clayton wrote: > I've discussed the GNUstep-reset.sh script (one of the patches I just > submitted to patches@) with Nicola, and he suggested that it would be > better to stay up-to-date with the latest gstep-make package (he > believes that script is already fixed in the latest). > > This sounds like a good plan. The latest gstep-make is 1.7.2, which > is marked as "unstable", but what better wa