Christophe Rhodes <csr21@...> writes:
> Thanks -- can you say whether this change affects the ability to compile
> on earlier versions of FreeBSD?
It shouldn't. FreeBSD 4's sys/signal.h includes sys/ucontext.h, so
the patch is a no-op for FreeBSD 4.
> > - when sys headers are needed, they should always be included before
> > non-sys headers (except for osreldate.h which may be needed to
> > determine which headers to include)
> By sys headers, do you mean "header files included with the system" or
> "header files in <sys/*.h>"?
> I'm perfectly willing to believe that the
> runtime's C coding style isn't wonderful -- can you explain the
> motivation behind this rule, though?
While some non-sys headers depend on sys headers, the reverse is never
true. Also, the dependencies between sys headers are intricate and
great care should be taken with regard to their relative ordering.
> As part of the general bletcherousness of the runtime's source, there
> are a number of 32/64 bit issues; this one might be one of them. In
> particular, applying this bit of the patch without testing on the Alpha
> (and in general without having a certain amount of confidence that
> I understood all the nuances of casting to and from u32s) would worry
> me. (on the Alpha, wp->next is u32, not struct weak_pointer *)
native_pointer() expects a lispobj, so casting its argument to lispobj
shouldn't change anything - at best, it silences a warning and makes
the cast explicit to the reader, and at worst, it breaks already
Regarding 32/64-bit issues and the use of u32: if lispobj were defined
to intptr_t instead of uXX, portability might be improved.
I have an Alpha running FreeBSD 5 and will test my port on it before
committing it to the FreeBSD ports tree.
>> --- sbcl.h.orig Tue Nov 26 23:06:27 2002
>> +++ sbcl.h Tue Nov 26 23:08:21 2002
>> @@ -134,7 +134,7 @@
>> #define CONTROL_STACK_END LISPOBJ(1140846592) /* 0x43FFF000 */
>> #define ALTERNATE_SIGNAL_STACK_START LISPOBJ(1140850688) /* 0x44000000 */
>> #define DYNAMIC_SPACE_START LISPOBJ(1207959552) /* 0x48000000 */
>> -#define DYNAMIC_SPACE_END LISPOBJ(2281701376) /* 0x88000000 */
>> +#define DYNAMIC_SPACE_END LISPOBJ(2281701376U) /* 0x88000000 */
>> #define END_CORE_ENTRY_TYPE_CODE 3840 /* 0xF00 */
>> #define VERSION_CORE_ENTRY_TYPE_CODE 3860 /* 0xF14 */
> I should warn you that sbcl.h is a generated file (by the invocation of
> SB!VM::GENESIS at the end of the first stage of compilation -- see
> make-host-1.sh in the top-level directory). So if this is necessary,
> the change needs to take place elsewhere.
OK. This is beyond me though, as I never looked at SBCL or CMUCL
source code before yesterday.
> Thanks for the patch, at least some of which will probably be merged
> post-0.7.10-release :-)
IWBNI the <sys/ucontext.h> patch were merged *before* the next release.
When's it due, BTW?
Dag-Erling Smorgrav - des@...