From: wolfgang Date: Thu, 3 Jan 2008 19:52:24 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1316 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78375466a1a1da2f8f46f343c006527819e56244;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1316 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOPE/sope-patchset-r1557.diff b/SOPE/sope-patchset-r1557.diff index 126d44d3..413caf2e 100644 --- a/SOPE/sope-patchset-r1557.diff +++ b/SOPE/sope-patchset-r1557.diff @@ -1,3 +1,47 @@ +Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m +=================================================================== +--- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (révision 1557) ++++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (copie de travail) +@@ -713,6 +713,39 @@ + return ms; + } + ++/* GCSEOAdaptorChannel protocol */ ++static NSString *sqlFolderFormat = (@"CREATE TABLE %@ (\n" \ ++ @" c_name VARCHAR (256) NOT NULL,\n" ++ @" c_content VARCHAR (100000) NOT NULL,\n" ++ @" c_creationdate INT4 NOT NULL,\n" ++ @" c_lastmodified INT4 NOT NULL,\n" ++ @" c_version INT4 NOT NULL,\n" ++ @" c_deleted INT4 NULL\n" ++ @")"); ++static NSString *sqlFolderACLFormat = (@"CREATE TABLE %@ (\n" \ ++ @" c_uid VARCHAR (256) NOT NULL,\n" ++ @" c_object VARCHAR (256) NOT NULL,\n" ++ @" c_role VARCHAR (80) NOT NULL\n" ++ @")"); ++ ++- (NSException *) createGCSFolderTableWithName: (NSString *) tableName ++{ ++ NSString *sql; ++ ++ sql = [NSString stringWithFormat: sqlFolderFormat, tableName]; ++ ++ return [self evaluateExpressionX: sql]; ++} ++ ++- (NSException *) createGCSFolderACLTableWithName: (NSString *) tableName ++{ ++ NSString *sql; ++ ++ sql = [NSString stringWithFormat: sqlFolderACLFormat, tableName]; ++ ++ return [self evaluateExpressionX: sql]; ++} ++ + @end /* PostgreSQL72Channel */ + + @implementation PostgreSQL72Channel(PrimaryKeyGeneration) Index: sope-mime/NGImap4/NGImap4Connection.m =================================================================== --- sope-mime/NGImap4/NGImap4Connection.m (révision 1557) @@ -470,11 +514,14 @@ Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m =================================================================== --- sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (révision 1557) +++ sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (copie de travail) -@@ -19,88 +19,30 @@ +@@ -19,88 +19,45 @@ 02111-1307, USA. */ ++#ifdef HAVE_STRNDUP +#define _GNU_SOURCE 1 ++#endif ++ +#include + #include "NGMimeHeaderFieldParser.h" @@ -483,6 +530,18 @@ Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m #include "common.h" -#include ++#ifndef HAVE_STRNDUP ++char *strndup(const char *str, size_t len) ++{ ++ char *dup = (char *)malloc(len+1); ++ if (dup) { ++ strncpy(dup,str,len); ++ dup[len]= '\0'; ++ } ++ return dup; ++} ++#endif ++ @implementation NGMimeRFC822DateHeaderFieldParser -static Class CalDateClass = Nil; @@ -567,7 +626,7 @@ Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m } /* -@@ -147,162 +89,110 @@ +@@ -147,162 +104,110 @@ } } @@ -815,7 +874,7 @@ Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m /* remove leading chars (skip to first digit, the day of the month) */ while (length > 0 && (!isdigit(*bytes))) { bytes++; -@@ -312,7 +202,7 @@ +@@ -312,7 +217,7 @@ if (length == 0) { NSLog(@"WARNING(%s): empty value for header field %@ ..", __PRETTY_FUNCTION__, _field); @@ -824,7 +883,7 @@ Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m } // TODO: should be a category on NSCalendarDate -@@ -435,7 +325,7 @@ +@@ -435,7 +340,7 @@ for (pe = bytes; isalnum(*pe) || *pe == '-' || *pe == '+'; pe++) ; *pe = '\0'; @@ -833,7 +892,7 @@ Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m [self logWithFormat: @"WARNING: failed to parse RFC822 timezone: '%s' (value='%@')", bytes, _data]; -@@ -444,9 +334,9 @@ +@@ -444,9 +349,9 @@ /* construct and return */ finished: @@ -897,6 +956,22 @@ Index: sope-mime/NGMime/NGMimeBodyPart.m } - (NSString *)contentId { +Index: sope-mime/NGMime/GNUmakefile.preamble +=================================================================== +--- sope-mime/NGMime/GNUmakefile.preamble (révision 1557) ++++ sope-mime/NGMime/GNUmakefile.preamble (copie de travail) +@@ -5,6 +5,11 @@ + -DLIBRARY_MINOR_VERSION=${MINOR_VERSION} \ + -DLIBRARY_SUBMINOR_VERSION=${SUBMINOR_VERSION} \ + ++ifeq ($(patsubstr GNU/%,glibc,$(shell uname -o)),glibc) ++ADDITIONAL_CPPFLAGS += \ ++ -DHAVE_STRNDUP ++endif ++ + NGMime_INCLUDE_DIRS += \ + -I.. -I../.. \ + -I../../sope-core/NGStreams/ \ Index: sope-mime/NGMime/NGMimeBodyParser.m =================================================================== --- sope-mime/NGMime/NGMimeBodyParser.m (révision 1557) @@ -1127,50 +1202,6 @@ Index: sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m } return data; } -Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m -=================================================================== ---- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (révision 1557) -+++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (copie de travail) -@@ -713,6 +713,39 @@ - return ms; - } - -+/* GCSEOAdaptorChannel protocol */ -+static NSString *sqlFolderFormat = (@"CREATE TABLE %@ (\n" \ -+ @" c_name VARCHAR (256) NOT NULL,\n" -+ @" c_content VARCHAR (100000) NOT NULL,\n" -+ @" c_creationdate INT4 NOT NULL,\n" -+ @" c_lastmodified INT4 NOT NULL,\n" -+ @" c_version INT4 NOT NULL,\n" -+ @" c_deleted INT4 NULL\n" -+ @")"); -+static NSString *sqlFolderACLFormat = (@"CREATE TABLE %@ (\n" \ -+ @" c_uid VARCHAR (256) NOT NULL,\n" -+ @" c_object VARCHAR (256) NOT NULL,\n" -+ @" c_role VARCHAR (80) NOT NULL\n" -+ @")"); -+ -+- (NSException *) createGCSFolderTableWithName: (NSString *) tableName -+{ -+ NSString *sql; -+ -+ sql = [NSString stringWithFormat: sqlFolderFormat, tableName]; -+ -+ return [self evaluateExpressionX: sql]; -+} -+ -+- (NSException *) createGCSFolderACLTableWithName: (NSString *) tableName -+{ -+ NSString *sql; -+ -+ sql = [NSString stringWithFormat: sqlFolderACLFormat, tableName]; -+ -+ return [self evaluateExpressionX: sql]; -+} -+ - @end /* PostgreSQL72Channel */ - - @implementation PostgreSQL72Channel(PrimaryKeyGeneration) Index: sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m =================================================================== --- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (révision 1557)