Subject: Pan 0.13 or PTL 2.1.8 problem w/ Alpha -current
To: None <tech-pkg@netbsd.org>
From: David Hopper <dhop@nwlink.com>
List: tech-pkg
Date: 10/01/2002 18:31:43
Apologies for the formatting.

Pan 0.13.0 doesn't compile on any 64-bit platform as is, but the following
easy one fixes that, thanks to Jens Petersen over at:

http://mail.freesoftware.fsf.org/pipermail/pan-users/2002-August/001876.html

diff -u pan-0.13.0/gmime/gmime-message-part.c.orig
pan-0.13.0/gmime/gmime-message-part.c
--- pan-0.13.0/gmime/gmime-message-part.c~ 2002-08-29 19:20:16 +0900
+++ pan-0.13.0/gmime/gmime-message-part.c 2002-08-29 19:20:16 +0900
@@ -42,7 +42,7 @@
static void message_part_remove_header (GMimeObject *object, const char 
*header);
static void message_part_set_content_type (GMimeObject *object,
GMimeContentType *content_type);
static char *message_part_get_headers (GMimeObject *object);
-static int message_part_write_to_stream (GMimeObject *object, GMimeStream
*stream);
+static ssize_t message_part_write_to_stream (GMimeObject *object,
GMimeStream *stream);


static GMimeObjectClass *parent_class = NULL;

===============================================

A simple 'int' to 'ssize_t' change.  Now, it compiles, but I get the 
following when I try to run it:

scarab: {17} pan

(Pan:15650): Gdk-WARNING **: locale not supported by Xlib

(Pan:15650): Gdk-WARNING **: can not set locale modifiers
[Thread 1(INITIAL)]Segmentation fault (Stack bottom 0x0)
Abort (core dumped)

scarab: {18} gdb /usr/pkg/bin/pan pan.core
GNU gdb 5.0nb1
[...]
Code was generated by `pan'.
Program terminated with signal 6, Abort trap.
[...]
#0 0x160b733dc in kill () from /lib/libc.so.12
(gdb) bt full
#0  0x160b733dc in kill () from /lib/libc.so.12
No symbol table info available.
#1  0x160a70ec4 in _pthread_sigsegv_handler (sig=15650, code=6, scp=0x0,
     fault_addr=0x0)
     at /steel/pkgsrc/devel/ptl2/work.alpha/PTL-2.1.8/src/stack.c:983
No locals.
#2  0x160a5e5e0 in debug_write (fd=2,
     message=0x100000000000 <Address 0x100000000000 out of bounds>,
     size=1612072252)
     at /steel/pkgsrc/devel/ptl2/work.alpha/PTL-2.1.8/src/debug.c:70
	omask = {__bits = {37, 0, 0, 0}}
	ptr = 0x160a5bba4 "\004"
	nwritten = 0

All packages and kernel are current to 9/30.