Subject: Pine 3.89 for solaris 2.3?

From: Kari Sutela <[email-masked]>
Date: Tue, 5 Apr 1994 10:09:32 +0300

Has anybody managed to build pine for solaris 2.3?  Pico builds nicely
(and works!) with "build sol", but I can't even get the addrbook.c module
of pine to compile.  What I get is error messages like this: 

Making Pine.
cc -DSV4   -g -DDEBUG  -c  addrbook.c
"/usr/include/unistd.h", line 171: identifier redeclared: rename
"addrbook.c", line 200: warning: semantics of ">" change in ANSI C; use 
explicit cast
"addrbook.c", line 204: warning: semantics of ">" change in ANSI C; use 
explicit cast
"addrbook.c", line 1349: cannot recover from previous errors
cc: acomp failed for addrbook.c
*** Error code 1
make: Fatal error: Command failed for target `addrbook.o'

By editing the pine include files (I seem to recall that I removed an
"#include <unistd.h>" somewhere) I managed to get a successful compile,
but the resulting binary just coredumps while reading or writing the 
.pinerc file.  Unfortunately, I don't have the time to reseach this 
properly, so I'm asking for help.

BTW, this is with the SparcWorks C compiler.

/KS

---

From: Jason Lee <[email-masked]>
Date: Tue, 5 Apr 1994 18:01:50 +1000 (EST)

> BTW, this is with the SparcWorks C compiler.

	The problem is both stdio.h and unistd.h declare rename. The way
	around it is as follows:

	In stdio.h do 

	#ifndef _UNISTD_H
	extern int      rename(const char *, const char *);
	#endif

	In unistd.h do
	#ifndef _STDIO_H
	extern int      rename(const char *, const char *);
	#endif

	And you should have no problems after that. Happy pine'ing
	bye

-----
Internet address: [email-masked]
Name : Jason David Lee
Assistant System Programmer
Computer Science Department, Uni of QLD

---

From: Lawrence Absha III <[email-masked]>
Date: Tue, 5 Apr 1994 05:22:24 -0400 (EDT)

Add -Dconst= to the CFLAGS for makefile.sol in the pine subdirectory.
That takes care of the redefinition of rename, and it is easier to do 
than adding #ifdefs and such.

shy

 /----------------------------------+-----------------------------------------\
 | Shyela Aberman, 404-712-2229     | INTERNET: [email-masked]              |
 | P.O. Box 21017, Emory University | BITNET: labsha@emoryu1  DEAD!DEAD!DEAD! |
 | Atlanta, Georgia 30322           | UUCP: {rutgers,gatech}!emoryu1!labsha   |
 \----------------------------------+-----------------------------------------/

---

From: David L Miller <[email-masked]>
Date: Tue, 5 Apr 1994 08:57:55 -0700 (PDT)

Kari,

Start with the original distribution and add "-Dconst=" to the CFLAGS setting
in the pine/makefile.sol.  That seems to take care of the problem. 

Thanks for the report!

--DLM

|\ |  |\/|  David L. Miller    [email-masked]  (206) 685-6240
|/ |_ |  |  Software Engineer, Pine Development Team   (206) 685-4045 (FAX)
University of Washington, Networks & Distributed Computing, JE-20
4545 15th Ave NE, Seattle WA 98105, USA

---

From: Kari Sutela <[email-masked]>
Date: Wed, 6 Apr 1994 12:19:38 +0300

Thanks for all the suggestions.  I finally managed to get pine compiled 
(I decided to add the #ifndef's to unistd.h and stdio.h).  However, I 
noticed something strange: if the global pine.conf file contains either
the last-time-prune-questioned or the last-version-used entry, the 
solaris version of pine receives a SIGSEGV and dumps core.

I know that the global configuration file probably shouldn't contain 
either of these entries, but our SunOS 4.1.3 binaries work perfectly even 
if the entries are there (the same binary runs OK even on Solaris 2.3 in 
binary compability mode).  It's just the "pure" solaris binary that has 
this problem.  Weird...

/KS