This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: qmail compilation


Yes, I have _tried_ to compile qmail.
However, it seems to require FIFOs, which are not implemented in cygwin yet.
I have not explored whether this can be worked around.

I did, however, solve the following issues.
1) Non-portable errno declaration.
Open error.h and change the existing extern int errno; declaration to
#include <errno.h>

2) Cygwin lacks setgroups call.
A minimal implementation is in the Cygwin todo list though (see cygwin.com)

3) Cygwin provides neither lockf or flock, but does have fcntl, so you need
to reimplement the locking functions with fcntl:
int lock_ex(fd)
int fd;
{
struct flock lck;
lck.l_type = F_WRLCK;
lck.l_start = 0;
lck.l_whence = 0;
lck.l_len = 0;
return fcntl (fd, F_SETLKW, &lck);
}
int lock_exnb(fd)
int fd;
{
struct flock lck;
lck.l_type = F_WRLCK;
lck.l_start = 0;
lck.l_whence = 0;
lck.l_len = 0;
return fcntl (fd, F_SETLK, &lck);
}
int lock_un(fd)
int fd;
{
struct flock lck;
lck.l_type = F_UNLCK;
lck.l_start = 0;
lck.l_whence = 0;
lck.l_len = 0;
return fcntl (fd, F_SETLKW, &lck);
}

4) qmail requires bind. Off you go and compile that...
Get the bind-src package from BIND 8.
Unpack it, and delete src/port/cygwin/include/sys/un.h
DO NOT attempt to use the make links method to build outside the source tree
Build simply, inside the source tree. It should then build OOTB.

That leaves you with the FIFO problem. Anyone?

BTW, you should be editing the conf-* files in qmail, not compile and load.

Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]