After fixing the libguile/random.h vs. system random.h problem described
in a previous message, I was able to get the build of guile 1.3.4 (and
recent CVS versions) on alpha-dec-osf to proceed further, but I ran into
one additional problem before the build finished.
libguile/iselect.c has a section of code that looks like:
while (i > 0)
{
--i;
if (t->readfds != NULL && ((ulongptr) t->readfds)[i] != 0)
((ulongptr) &greadfds)[i] |= ((ulongptr) t->readfds)[i];
cont_read:
if (t->writefds != NULL && ((ulongptr) t->writefds)[i] != 0)
((ulongptr) &gwritefds)[i] |= ((ulongptr) t->writefds)[i];
cont_write:
if (t->exceptfds != NULL && ((ulongptr) t->exceptfds)[i] != 0)
((ulongptr) &gexceptfds)[i] |= ((ulongptr) t->exceptfds)[i];
cont_except:
}
The problem is the `cont_except:' at the very end of the loop. The Compaq
compiler objects to it:
cc -DHAVE_CONFIG_H -I. -I. -I. -I.. -I./.. -I/local/src/RPM/BUILD/guile-1.3.4/qt
-I../qt -I/local/gnu/include -std1 -O2 -g3 -tune host -arch host -pthread
-readonly_strings -portable -msg_disable inlinestoclsmod -I/local/gnu/include -c
iselect.c -DPIC -o .libs/iselect.lo
cc: Error: iselect.c, line 269: Invalid statement. (badstmt)
}
----^
Based on my reading of K&R2e, I think the compiler is correct in objecting
to the code. Appendix A9.1 indicates that labels must be followed by a
statement, and this one isn't.
I think a correct fix for this problem is to move the label to the very
top of the while, just before the --i;. That causes the label to be followed
by a statement, and I think the overall effect is the same (though if I'm
wrong, please let me know).
The enclosed patch implements the suggested fix.
Tim
--
Tim Mooney [EMAIL PROTECTED]
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
--- guile-1.3.4.orig/libguile/iselect.c Sat Oct 3 08:33:23 1998
+++ guile-1.3.4/libguile/iselect.c Mon Apr 3 14:32:54 2000
@@ -256,6 +256,7 @@
/* nfds is now determined. Just finish updating the common sets. */
while (i > 0)
{
+ cont_except:
--i;
if (t->readfds != NULL && ((ulongptr) t->readfds)[i] != 0)
((ulongptr) &greadfds)[i] |= ((ulongptr) t->readfds)[i];
@@ -265,7 +266,6 @@
cont_write:
if (t->exceptfds != NULL && ((ulongptr) t->exceptfds)[i] != 0)
((ulongptr) &gexceptfds)[i] |= ((ulongptr) t->exceptfds)[i];
- cont_except:
}
}