Re: Cyrus IMAP 3.0.0 and Oracle Solaris/Compiler

Stefan Rapp <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Organization TU Dortmund, ITMC
Message-ID <[email protected]>
Am 05.04.2017 um 18:14 schrieb Jean-Christophe Delaye:
> On 05/04/17 15:38, Stefan Rapp wrote:

> What is your native compiler version ?
> (solarisstudio12.4 or developerstudio12.5)

I tried both compiler versions (12.4 and 12.5) and they showed the same
problems.

>> I still have 16 errors in the CUnit sieve checks, but this is identical
>> to 2.5.10. As the sieve scripts (seem to) work in our setup this could
>> be a problem of the checks ???

It was a problem of the check (cunit/sieve.testc). Solaris doesn't
support fmemopen and the replacement code fails (the assumptions about
the behavior of setbuffer are wrong on Solaris). In this special case
you can write into a temporary file and open it for reading afterwards:

/* works only for mode="r" */
#ifndef HAVE_FMEMOPEN
static FILE *fmemopen(const void *buf, size_t len, const char *mode)
{
    FILE *fp;
    char *fname = xstrdup("/tmp/cyrus-cunit-fmemopenXXXXXX");
    int fd = mkstemp(fname);
    retry_write(fd, buf, len);
    close(fd);
    fp = fopen(fname, mode);
    unlink(fname);
    free(fname);
    return fp;
}
#endif

And then no more errors on the sieve checks :-)


Stefan

-- 
Stefan Rapp
TU Dortmund
IT & Medien Centrum
D-44221 Dortmund

Mail: [email protected]
Phone: +49 231 755 4668
Fax: +49 231 755 2731
Web: http://www.itmc.tu-dortmund.de/

----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
smime.p7s (application/pkcs7-signature, 5.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.