[SVN] r440 -
/branches/idled/debian/patches/23-configurable_idled.dpatch
debian at incase.de
debian at incase.de
Sun May 7 23:10:04 UTC 2006
Author: sven
Date: Mon May 8 01:10:03 2006
New Revision: 440
URL: https://mail.incase.de/viewcvs?rev=440&root=cyrus22&view=rev
Log:
Use inline functions instead of defines. Somehow the defines didn't work as expected
Modified:
branches/idled/debian/patches/23-configurable_idled.dpatch
Modified: branches/idled/debian/patches/23-configurable_idled.dpatch
URL: https://mail.incase.de/viewcvs/branches/idled/debian/patches/23-configurable_idled.dpatch?rev=440&root=cyrus22&r1=439&r2=440&view=diff
==============================================================================
--- branches/idled/debian/patches/23-configurable_idled.dpatch (original)
+++ branches/idled/debian/patches/23-configurable_idled.dpatch Mon May 8 01:10:03 2006
@@ -5,9 +5,9 @@
## DP: Adds imapd.conf option to select IDLE method at runtime
@DPATCH@
-diff -urNad idled/configure.in /tmp/dpep.oxXZ75/idled/configure.in
---- idled/configure.in 2006-05-07 23:08:08.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/configure.in 2006-05-07 23:24:12.577295811 +0200
+diff -urNad idled/configure.in /tmp/dpep.jATkDX/idled/configure.in
+--- idled/configure.in 2006-05-08 00:47:27.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/configure.in 2006-05-08 00:47:36.969500329 +0200
@@ -760,9 +760,6 @@
METHOD is [poll], idled or no],
WITH_IDLE="${withval}",WITH_IDLE="poll")
@@ -18,9 +18,9 @@
dnl
dnl see if we're compiling with NNTP support
-diff -urNad idled/imap/Makefile.in /tmp/dpep.oxXZ75/idled/imap/Makefile.in
---- idled/imap/Makefile.in 2006-05-07 23:08:07.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/imap/Makefile.in 2006-05-07 23:08:20.968639286 +0200
+diff -urNad idled/imap/Makefile.in /tmp/dpep.jATkDX/idled/imap/Makefile.in
+--- idled/imap/Makefile.in 2006-05-08 00:47:26.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/imap/Makefile.in 2006-05-08 00:47:36.969500329 +0200
@@ -47,9 +47,6 @@
# 'local' (legacy flat file).
SEEN=seen_db.o
@@ -50,9 +50,9 @@
fud smmapd reconstruct quota mbpath ipurge \
cyrdump chk_cyrus cvt_cyrusdb deliver ctl_mboxlist \
ctl_deliver ctl_cyrusdb squatter mbexamine cyr_expire arbitron \
-diff -urNad idled/imap/global.c /tmp/dpep.oxXZ75/idled/imap/global.c
---- idled/imap/global.c 2006-05-07 23:08:08.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/imap/global.c 2006-05-07 23:08:20.969639193 +0200
+diff -urNad idled/imap/global.c /tmp/dpep.jATkDX/idled/imap/global.c
+--- idled/imap/global.c 2006-05-08 00:47:27.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/imap/global.c 2006-05-08 00:47:36.970500236 +0200
@@ -94,6 +94,8 @@
/* syslog prefix tag */
static char syslog_prefix[20];
@@ -73,9 +73,9 @@
/* configure libcyrus as needed */
libcyrus_config_setstring(CYRUSOPT_CONFIG_DIR, config_dir);
libcyrus_config_setswitch(CYRUSOPT_AUTH_UNIX_GROUP_ENABLE,
-diff -urNad idled/imap/global.h /tmp/dpep.oxXZ75/idled/imap/global.h
---- idled/imap/global.h 2006-05-06 17:49:52.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/imap/global.h 2006-05-07 23:08:20.969639193 +0200
+diff -urNad idled/imap/global.h /tmp/dpep.jATkDX/idled/imap/global.h
+--- idled/imap/global.h 2006-04-23 22:39:20.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/imap/global.h 2006-05-08 00:47:36.970500236 +0200
@@ -152,4 +152,6 @@
extern struct cyrusdb_backend *config_tlscache_db;
extern struct cyrusdb_backend *config_ptscache_db;
@@ -83,9 +83,9 @@
+extern struct idle_backend *config_idle;
+
#endif /* INCLUDED_GLOBAL_H */
-diff -urNad idled/imap/idle.c /tmp/dpep.oxXZ75/idled/imap/idle.c
+diff -urNad idled/imap/idle.c /tmp/dpep.jATkDX/idled/imap/idle.c
--- idled/imap/idle.c 1970-01-01 01:00:00.000000000 +0100
-+++ /tmp/dpep.oxXZ75/idled/imap/idle.c 2006-05-07 23:08:20.969639193 +0200
++++ /tmp/dpep.jATkDX/idled/imap/idle.c 2006-05-08 00:47:36.971500143 +0200
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
@@ -174,9 +174,9 @@
+
+ return idle;
+}
-diff -urNad idled/imap/idle.h /tmp/dpep.oxXZ75/idled/imap/idle.h
---- idled/imap/idle.h 2006-05-06 17:49:52.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/imap/idle.h 2006-05-07 23:46:43.255515751 +0200
+diff -urNad idled/imap/idle.h /tmp/dpep.jATkDX/idled/imap/idle.h
+--- idled/imap/idle.h 2006-04-23 22:39:20.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/imap/idle.h 2006-05-08 00:55:13.619250121 +0200
@@ -45,8 +45,6 @@
#include "mailbox.h"
@@ -186,7 +186,7 @@
typedef enum {
IDLE_MAILBOX = 0x1,
IDLE_ALERT = 0x2
-@@ -54,20 +52,42 @@
+@@ -54,20 +52,77 @@
typedef void idle_updateproc_t(idle_flags_t flags);
@@ -220,12 +220,47 @@
+ void (*done)(struct mailbox *mailbox);
+};
+
-+/* Defines to simulate old behaviour */
-+/* see struct define above to see what they do */
-+#define idle_enabled() (config_idle?config_idle->enabled():0)
-+#define idle_init(proc) if (config_idle != NULL) config_idle->init(proc)
-+#define idle_start(mbox) if (config_idle != NULL) config_idle->start(mbox)
-+#define ide_done(mbox) if (config_idle != NULL) config_idle->done(mbox)
++/* Inline functions and defines to simulate old behaviour */
++/* see struct definition above to see what they do */
++inline int idle_enabled(void)
++{
++ if (config_idle)
++ {
++ return config_idle->enabled;
++ }
++ return 0;
++}
++inline int idle_init(idle_updateproc_t *proc)
++{
++ if (config_idle)
++ {
++ return config_idle->init(proc);
++ }
++ return 0;
++}
++inline int (*init)(idle_updateproc_t *proc)
++{
++ if (config_idle)
++ {
++ return config_idle->update_init(proc)
++ }
++ return 0;
++}
++inline void idle_start(struct mailbox *mailbox)
++{
++ if (config_idle)
++ {
++ return config_idle->start(mbox)
++ }
++ return 0;
++}
++inline void idle_done(struct mailbox *mailbox)
++{
++ if (config_idle)
++ {
++ config_idle->done(mbox)
++ }
++}
+#define idle_method_desc (config_idle?config_idle->name:NULL)
+
+extern struct idle_backend *idle_backends[];
@@ -240,9 +275,9 @@
+struct idle_backend *idle_fromname(const char *name);
#endif
-diff -urNad idled/imap/idle_idled.c /tmp/dpep.oxXZ75/idled/imap/idle_idled.c
---- idled/imap/idle_idled.c 2006-05-07 23:08:08.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/imap/idle_idled.c 2006-05-07 23:08:20.970639101 +0200
+diff -urNad idled/imap/idle_idled.c /tmp/dpep.jATkDX/idled/imap/idle_idled.c
+--- idled/imap/idle_idled.c 2006-05-08 00:47:27.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/imap/idle_idled.c 2006-05-08 00:47:36.971500143 +0200
@@ -58,8 +58,6 @@
#include "idled.h"
#include "global.h"
@@ -329,9 +364,9 @@
+ &idle_start,
+ &idle_done
+};
-diff -urNad idled/imap/idle_no.c /tmp/dpep.oxXZ75/idled/imap/idle_no.c
---- idled/imap/idle_no.c 2006-05-06 17:49:52.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/imap/idle_no.c 2006-05-07 23:08:20.970639101 +0200
+diff -urNad idled/imap/idle_no.c /tmp/dpep.jATkDX/idled/imap/idle_no.c
+--- idled/imap/idle_no.c 2006-04-23 22:39:20.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/imap/idle_no.c 2006-05-08 00:47:36.972500050 +0200
@@ -42,23 +42,31 @@
#include "idle.h"
@@ -371,9 +406,9 @@
+ &idle_start,
+ &idle_done
+};
-diff -urNad idled/imap/idle_poll.c /tmp/dpep.oxXZ75/idled/imap/idle_poll.c
---- idled/imap/idle_poll.c 2006-05-06 17:49:52.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/imap/idle_poll.c 2006-05-07 23:08:20.971639008 +0200
+diff -urNad idled/imap/idle_poll.c /tmp/dpep.jATkDX/idled/imap/idle_poll.c
+--- idled/imap/idle_poll.c 2006-04-23 22:39:20.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/imap/idle_poll.c 2006-05-08 00:47:36.972500050 +0200
@@ -51,15 +51,13 @@
#include "idle.h"
#include "global.h"
@@ -429,9 +464,9 @@
+ &idle_start,
+ &idle_done
+};
-diff -urNad idled/imap/version.c /tmp/dpep.oxXZ75/idled/imap/version.c
---- idled/imap/version.c 2006-05-06 17:49:52.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/imap/version.c 2006-05-07 23:43:39.767677838 +0200
+diff -urNad idled/imap/version.c /tmp/dpep.jATkDX/idled/imap/version.c
+--- idled/imap/version.c 2006-04-23 22:39:20.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/imap/version.c 2006-05-08 00:47:36.972500050 +0200
@@ -62,6 +62,7 @@
#include "map.h"
#include "lock.h"
@@ -440,9 +475,9 @@
#include "idle.h"
#ifdef USE_SIEVE
-diff -urNad idled/lib/Makefile.in /tmp/dpep.JaaXgg/idled/lib/Makefile.in
---- idled/lib/Makefile.in 2006-05-08 00:09:22.000000000 +0200
-+++ /tmp/dpep.JaaXgg/idled/lib/Makefile.in 2006-05-08 00:09:48.170895595 +0200
+diff -urNad idled/lib/Makefile.in /tmp/dpep.jATkDX/idled/lib/Makefile.in
+--- idled/lib/Makefile.in 2006-05-08 00:47:26.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/lib/Makefile.in 2006-05-08 00:47:36.973499956 +0200
@@ -74,6 +74,8 @@
libdir = @libdir@
@@ -461,9 +496,9 @@
imapopts.h: imapopts.c
-diff -urNad idled/lib/imapoptions /tmp/dpep.oxXZ75/idled/lib/imapoptions
---- idled/lib/imapoptions 2006-05-07 23:08:10.000000000 +0200
-+++ /tmp/dpep.oxXZ75/idled/lib/imapoptions 2006-05-07 23:16:44.683901248 +0200
+diff -urNad idled/lib/imapoptions /tmp/dpep.jATkDX/idled/lib/imapoptions
+--- idled/lib/imapoptions 2006-05-08 00:47:27.000000000 +0200
++++ /tmp/dpep.jATkDX/idled/lib/imapoptions 2006-05-08 00:47:36.973499956 +0200
@@ -248,6 +248,9 @@
/* The password to use for authentication to the backend server hostname
(where hostname is the short hostname of the server) - Cyrus Murder */
More information about the Pkg-Cyrus-imapd-Debian-devel
mailing list