Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ Path: not-for-mail From: Andrew DeFaria Newsgroups: gmane.os.cygwin Subject: Re: imapd on cygwin Date: Tue, 02 Apr 2002 23:37:58 -0800 Lines: 66 Message-ID: <3CAAB156.2090707@DeFaria.com> References: <3CAAAB89 DOT 9020403 AT DeFaria DOT com> NNTP-Posting-Host: dsl-64-195-250-225.telocity.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1017819396 22461 64.195.250.225 (3 Apr 2002 07:36:36 GMT) X-Complaints-To: usenet AT main DOT gmane DOT org NNTP-Posting-Date: Wed, 3 Apr 2002 07:36:36 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2 X-Accept-Language: en,ru Andrew DeFaria wrote: > I used to have this working but it broke somewhere. > > I installed imapd for cygwin. Now whenever I run it it simply coredumps: > > $ /usr/local/sbin/imapd > Segmentation fault (core dumped) > $ > > I have followed everything in the readme WRT to setting this up and as > I said before I did have this working. The one part that didn't work > was accessing Inbox but that was because I wasn't using a mail server > that made mbox style inboxes. Now I have exim and have even configured > mutt to work. But I want imap to work for me. > > Before I dive into debugging this I was wondering if anybody had any > ideas? Well I build a debugable version of imapd and did a little debugging with gdb and this is odd. I'm dying at gettimeofday in the function rfc822_timezone which gdb shows me as: void rfc822_timezone (char *s,void *t) { struct timezone d; struct tm *tm; int hr; gettimeofday(NULL, &d); hr = d.tz_minuteswest / 60; tm = (struct tm *)t; if (tm->tm_isdst) { hr++; } sprintf(s + strlen(s), " (%+04d)", (hr * 100)); } I can find no man page for gettimeofday in Cygwin! And I can't seem to even call it properly: #include #include int main (void) { struct timezone d; printf ("Calling gettimeofday\n"); gettimeofday (NULL, &d); printf ("Returned from gettimeofday\n"); } $ gcc foo.c foo.c: In function `main': foo.c:4: storage size of `d' isn't known So how the hell did it get compiled into imapd this way?!? And how does on call gettimeofday in Cygwin? Finally I tried: $ grep gettimeofday /usr/include/* /usr/include/_syslist.h:#define _gettimeofday gettimeofday /usr/include/reent.h:extern int _gettimeofday_r _PARAMS ((struct _reent *, struct timeval *tp, struct timezone *tzp)); Any ideas? -- 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/