CVS commit: src/usr.bin/mail

"Robert Elz" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	kre
Date:		Thu Jun 25 22:27:53 UTC 2026

Modified Files:
	src/usr.bin/mail: def.h fio.c thread.c thread.h

Log Message:
PR bin/59635 - src/usr.bin/mail: fix post realloc() cleanup

This is a rather hackish solution, much better would be to abandon the
pointers altogether, and simply use message offsets (ints) into the array
to provide the relationships between messages.

Or abandon the message array (and the need for realloc() along with it)
and replace it with a list.

Both methods would achieve the aim of getting rid of the need to go and
massage the data to keep things correct when a realloc moves things around.

Either would require more changes in more places that this crude change,
and to get this done before -11 gets released, the few changes the better.

Another possibility would be to just revert to the adjustment method used
in -10 (which looks like it should work to me - but I don't know why it
was changed).

This can all be redone in a post -11 world, should anyone have the
inclination.

XXX pullup -11   (not needed in -10 which uses a different strategy)


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/mail/def.h
cvs rdiff -u -r1.45 -r1.46 src/usr.bin/mail/fio.c
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/mail/thread.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/mail/thread.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.