Subject: Re: Compiling Pine Was: Etc...
To: Jason W. Fogt, WWC RCA <jwfogt@midway.uchicago.edu>
From: Scott Jann <smj@risk.cs.umn.edu>
List: port-mac68k
Date: 02/03/1996 03:48:31
On Thu, 1 Feb 1996, Jason W. Fogt, WWC RCA wrote:
> > Pine and pico are created using the same make. Don't make BSD, make NBD
> > I think or something that's obviously netbsd. It does build with no
> > problem.
> >
> I tried compiling Pine and its related programs (the three letter code
> build needs was neb), but Pine doesn't appear to be working happily on my
> system. It refuses to recognize any of the 3 configuration files, and
> when I try to compose a message, it goes into "attach file" and then when
> I try to exit that, it crashes shortly after.
>
> Someone mentioned that there was perhaps some patch that needed to be
> made to the source. Does anyone know of where I could find this, or even
> any version of Pine that would work on my system ?
yes.. there is a patch.. that fixes the config file problem..
Scott Jann "Zoinks!" -Shaggy
jann0004@tc.umn.edu | http://acm.cs.umn.edu/~smj | irc: MrBill
---------------------
this file replaces pine3.91/pine/osdep/readfile
---------------------
/*----------------------------------------------------------------------
Read whole file into memory
Args: filename -- path name of file to read
Result: Returns pointer to malloced memory with the contents of the file
or NULL
This won't work very well if the file has NULLs in it and is mostly
intended for fairly small text files.
----*/
char *
read_file(filename)
char *filename;
{
int fd;
struct stat statbuf;
char *buf;
#ifdef __NetBSD__
long *size_p;
#endif
fd = open(filename, O_RDONLY);
if(fd < 0)
return((char *)NULL);
fstat(fd, &statbuf);
#ifdef __NetBSD__
size_p = &statbuf.st_size;
#if BYTE_ORDER == BIG_ENDIAN
size_p++;
#endif
buf = fs_get(*size_p+1);
#else
buf = fs_get(statbuf.st_size + 1);
#endif
/*
* On some systems might have to loop here, if one read isn't guaranteed
* to get the whole thing.
*/
#ifdef __NetBSD__
if(read(fd, buf, *size_p+1) != *size_p) {
#else
if(read(fd, buf, statbuf.st_size) != statbuf.st_size) {
#endif
close(fd);
return((char *)NULL);
}
close(fd);
/* buf[statbuf.st_size]= '\0'; /* PRG */
buf[*size_p]= '\0'; /* PRG */
return(buf);
}