I've made two little patches to allow dovecot to be compiled on GNU/Hurd. Could you review them? Kind regards, Marco Nenciarini -- --------------------------------------------------------------------- | Marco Nenciarini | Debian/GNU Linux Developer - Plug Member | | mnencia at prato.linux.it | http://www.prato.linux.it/~mnencia | --------------------------------------------------------------------- Key fingerprint = FED9 69C7 9E67 21F5 7D95 5270 6864 730D F095 E5E4 -------------- next part -------------- A non-text attachment was scrubbed... Name: 01_hurd-build-fix.patch Type: text/x-patch Size: 737 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20091216/784d8167/attachment-0006.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: 02_hurd-build-fix.patch Type: text/x-patch Size: 2566 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20091216/784d8167/attachment-0007.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20091216/784d8167/attachment-0008.bin>
On Wed, 2009-12-16 at 18:46 +0100, Marco Nenciarini wrote:> +#ifndef PATH_MAX > +# define PATH_MAX 1024 > +#endifI changed v2.0 code not to rely on PATH_MAX anywhere anymore. For v1.2 I added a similar check to make PATH_MAX to 4096.> diff --git a/src/lib/ioloop-notify-dn.c b/src/lib/ioloop-notify-dn.c > --- a/src/lib/ioloop-notify-dn.c > +++ b/src/lib/ioloop-notify-dn.c > @@ -191,9 +191,15 @@ > /* SIGIO is sent if queue gets full. we'll just ignore > it. */ > signal(SIGIO, SIG_IGN); > > +#ifdef SA_SIGINFO > act.sa_sigaction = sigrt_handler; > sigemptyset(&act.sa_mask); > act.sa_flags = SA_SIGINFO | SA_RESTART | SA_NODEFER; > +#else > + act.sa_handler = sigrt_handler; > + sigemptyset(&act.sa_mask); > + act.sa_flags = SA_RESTART | SA_NODEFER; > +#endifDoes Hurd really support dnotify? Other than that, I did a couple of changes to your lib-signals patch and committed to v1.2 and v2.0. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20091216/38552480/attachment-0002.bin>
On Wed, 2009-12-16 at 18:46 +0100, Marco Nenciarini wrote:> http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html */BTW. That does getcwd() in a way too difficult way, at least for POSIX. This is what I used: int t_get_current_dir(const char **dir_r) { /* @UNSAFE */ char *dir; size_t size = 128; dir = t_buffer_get(size); while (getcwd(dir, size) == NULL) { if (errno != ERANGE) return -1; size = nearest_power(size+1); dir = t_buffer_get(size); } t_buffer_alloc(strlen(dir) + 1); *dir_r = dir; return 0; } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20091216/6af722d2/attachment-0002.bin>