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@prato.linux.it | http://www.prato.linux.it/~mnencia |
Key fingerprint = FED9 69C7 9E67 21F5 7D95 5270 6864 730D F095 E5E4
On Wed, 2009-12-16 at 18:46 +0100, Marco Nenciarini wrote:
+#ifndef PATH_MAX +# define PATH_MAX 1024 +#endif
I 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; +#endif
Does 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.
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;
}
participants (2)
-
Marco Nenciarini
-
Timo Sirainen