I have two problems with the latest CVS, and two potential fixes. I
don't know much programming so both fixes may be wrong, but here goes:
I'm running the latest CVS version 21.5b6 on Solaris 8, and have run
in to two problems. The first---xemacs crashes on startup in
compare_key_value_pairs. It appears that bsearch doesn't check if the
table has no entries. Fix is to not call bsearch if there are no
entries.
Secondly, I was writing a small function that opens a network stream
to a webserver, downloads a web page and closes the stream. Calling
the function a second time to the same webserver immediately after the
first fails with an error that the operation is already in
progress. Checking for EINPROGRESS and EALREADY fixes it.
*** extents.c.unchanged Fri May 10 21:23:44 2002
--- extents.c Thu May 9 10:15:17 2002
***************
*** 3599,3607 ****
}
for (i = 0; i < orignewlength; i++)
{
! if (!bsearch (Dynarr_atp (newprops, i), Dynarr_atp (oldprops, 0),
! Dynarr_length (oldprops), sizeof (Lisp_Object_pair),
! compare_key_value_pairs))
{
Lisp_Object_pair new;
new.key = Dynarr_at (newprops, i).key;
--- 3599,3609 ----
}
for (i = 0; i < orignewlength; i++)
{
! if (!Dynarr_length (oldprops) || !bsearch (Dynarr_atp (newprops, i),
! Dynarr_atp (oldprops, 0),
! Dynarr_length (oldprops),
! sizeof (Lisp_Object_pair),
! compare_key_value_pairs))
{
Lisp_Object_pair new;
new.key = Dynarr_at (newprops, i).key;
*** process-unix.c.unchanged Fri May 10 21:21:34 2002
--- process-unix.c Sun May 12 09:56:59 2002
***************
*** 1805,1813 ****
if (retval == -1 && errno != EISCONN)
{
xerrno = errno;
! if (errno == EINTR)
goto loop;
if (errno == EADDRINUSE && retry < 20)
{
#ifdef __FreeBSD__
--- 1805,1813 ----
if (retval == -1 && errno != EISCONN)
{
xerrno = errno;
! if (errno == EINTR || errno == EINPROGRESS || errno == EALREADY)
goto loop;
if (errno == EADDRINUSE && retry < 20)
{
#ifdef __FreeBSD__