+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)
===================================================================
--- 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 <string.h>
+
#include "NGMimeHeaderFieldParser.h"
#include "common.h"
-#include <string.h>
++#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;
}
/*
-@@ -147,162 +89,110 @@
+@@ -147,162 +104,110 @@
}
}
/* 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);
}
// 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';
[self logWithFormat:
@"WARNING: failed to parse RFC822 timezone: '%s' (value='%@')",
bytes, _data];
-@@ -444,9 +334,9 @@
+@@ -444,9 +349,9 @@
/* construct and return */
finished:
}
- (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)
}
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)