Subject: Error compiling pine 4.33 on Linux

From: Andreas Fehr <[email-masked]>
Date: Thu, 5 Apr 2001 08:57:14 +0200 (W. Europe Daylight Time)

Hi

I did browse the pine-info archive but did not find anything similar to
that. So this might be a problem with my compiler.

I tried to compile pine4.33 with 'build sl5' (I tried all alternatives
for Linux, always the same result). I get the following error:

<snip>

`cat CCTYPE` -c `cat CFLAGS` smanager.c
`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
In file included from /usr/local/ssl/include/openssl/asn1.h:62,
                 from /usr/local/ssl/include/openssl/objects.h:960,
                 from /usr/local/ssl/include/openssl/evp.h:138,
                 from /usr/local/ssl/include/openssl/x509.h:67,
                 from auth_ssl.c:22,
                 from auths.c:2,
                 from env_unix.c:116,
                 from osdep.c:42:
/usr/include/time.h:166: warning: type mismatch with previous implicit
declaration
auth_md5.c:132: warning: previous implicit declaration of `time'
/usr/include/time.h:166: warning: `time' was previously implicitly
declared to return `int'
`cat CCTYPE` -c `cat CFLAGS` utf8.c
`cat CCTYPE` -c `cat CFLAGS` siglocal.c
`cat CCTYPE` -c `cat CFLAGS` dummy.c
`cat CCTYPE` -c `cat CFLAGS` pseudo.c
`cat CCTYPE` -c `cat CFLAGS` netmsg.c
`cat CCTYPE` -c `cat CFLAGS` flstring.c
`cat CCTYPE` -c `cat CFLAGS` fdstring.c
`cat CCTYPE` -c `cat CFLAGS` rfc822.c
`cat CCTYPE` -c `cat CFLAGS` nntp.c
`cat CCTYPE` -c `cat CFLAGS` smtp.c
`cat CCTYPE` -c `cat CFLAGS` imap4r1.c
`cat CCTYPE` -c `cat CFLAGS` pop3.c
`cat CCTYPE` -c `cat CFLAGS` unix.c
`cat CCTYPE` -c `cat CFLAGS` mbox.c
`cat CCTYPE` -c `cat CFLAGS` mbx.c
`cat CCTYPE` -c `cat CFLAGS` mmdf.c
`cat CCTYPE` -c `cat CFLAGS` tenex.c
`cat CCTYPE` -c `cat CFLAGS` mtx.c
`cat CCTYPE` -c `cat CFLAGS` news.c
news.c: In function `news_open':
news.c:330: warning: passing arg 3 of `scandir' from incompatible
pointer type
news.c: In function `news_header':
news.c:472: warning: assignment makes pointer from integer without a
cast
news.c:473: dereferencing pointer to incomplete type
news.c:473: dereferencing pointer to incomplete type
news.c:474: dereferencing pointer to incomplete type
news.c:475: dereferencing pointer to incomplete type
news.c:475: dereferencing pointer to incomplete type
news.c:476: dereferencing pointer to incomplete type
make[3]: *** [news.o] Error 1
make[3]: Leaving directory
`/home/andreas/tmp/else/pine4.33/imap/c-client'
make[2]: *** [sl5] Error 2
make[2]: Leaving directory
`/home/andreas/tmp/else/pine4.33/imap/c-client'
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/home/andreas/tmp/else/pine4.33/imap'
make: *** [sl5] Error 2

I'm not familiar with the includes of pine, but it looks as either pine
does not include time.h or more likely, my include path is somehow
wrong.

I have all the output of 'build' if needed.

Any ideas??
Thanks,
-- 
Andreas Fehr
[email-masked]

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: "Mike A. Harris" <[email-masked]>
Date: Thu, 5 Apr 2001 04:18:07 -0400 (EDT)

>that. So this might be a problem with my compiler.

No, it is just a change in headers.  <sys/time.h> no longer
automatically includes <time.h>.

Presumeably for standards compliance, but I'm not sure.

>/usr/include/time.h:166: warning: `time' was previously implicitly

Use the attached patch, which is taken from our Red Hat Linux
pine-4.33-6 package.  It should fix the problem for you.

-- 
Mike A. Harris                  Shipping/mailing address:
OS Systems Engineer             190 Pittsburgh Ave., Sault Ste. Marie,
Red Hat Inc.                    Ontario, Canada, P6C 5B3
http://www.redhat.com           Phone: (705)949-2136

--- pine4.33/imap/src/osdep/unix/os_lnx.c.time	Wed Feb 14 12:25:06 2001
+++ pine4.33/imap/src/osdep/unix/os_lnx.c	Wed Feb 14 12:25:16 2001
@@ -23,6 +23,7 @@
 #include "osdep.h"
 #include <stdio.h>
 #include <sys/time.h>
+#include <time.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
--- pine4.33/imap/src/osdep/unix/news.c.time	Thu Jan 18 21:28:33 2001
+++ pine4.33/imap/src/osdep/unix/news.c	Wed Feb 14 12:24:34 2001
@@ -21,7 +21,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
-extern int errno;		/* just in case */
+#include <time.h>
 #include "mail.h"
 #include "osdep.h"
 #include <sys/stat.h>
--- pine4.33/imap/src/osdep/unix/phile.c.time	Thu Jan 18 21:31:20 2001
+++ pine4.33/imap/src/osdep/unix/phile.c	Wed Feb 14 12:24:34 2001
@@ -21,8 +21,8 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
-extern int errno;		/* just in case */
 #include <signal.h>
+#include <time.h>
 #include "mail.h"
 #include "osdep.h"
 #include <pwd.h>
--- pine4.33/imap/src/osdep/unix/mh.c.time	Thu Jan 18 21:27:37 2001
+++ pine4.33/imap/src/osdep/unix/mh.c	Wed Feb 14 12:24:34 2001
@@ -21,7 +21,8 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
-extern int errno;		/* just in case */
+#include <time.h>
+
 #include "mail.h"
 #include "osdep.h"
 #include <pwd.h>
--- pine4.33/imap/src/osdep/unix/mx.c.time	Thu Jan 18 21:28:09 2001
+++ pine4.33/imap/src/osdep/unix/mx.c	Wed Feb 14 12:24:34 2001
@@ -21,7 +21,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
-extern int errno;		/* just in case */
+#include <time.h>
 #include "mail.h"
 #include "osdep.h"
 #include <pwd.h>

---

From: Andreas Fehr <[email-masked]>
Date: Thu, 5 Apr 2001 13:57:44 +0200 (W. Europe Daylight Time)

On 2001-04-05, 04:18, Mike A. Harris wrote:

MAH> On Thu, 5 Apr 2001, Andreas Fehr wrote:
MAH>
MAH> >I did browse the pine-info archive but did not find anything similar to
MAH> >that. So this might be a problem with my compiler.
MAH>
MAH> No, it is just a change in headers.  <sys/time.h> no longer
MAH> automatically includes <time.h>.

OK, I see.

<snip>

MAH> >/usr/include/time.h:166: warning: type mismatch with previous implicit
MAH> >declaration
MAH> >auth_md5.c:132: warning: previous implicit declaration of `time'
MAH> >/usr/include/time.h:166: warning: `time' was previously implicitly
MAH> >declared to return `int'
MAH>
MAH> Use the attached patch, which is taken from our Red Hat Linux
MAH> pine-4.33-6 package.  It should fix the problem for you.
MAH>

This did fix it.

Thanks!
-- 
Andreas Fehr
[email-masked]