Martin Buchholz writes:
I don't understand how this could happen. All ANSI C platforms have
ptrdiff_t, and it's supposed to live in stddef.h. It's hard to
believe only gcc + sunos5.5.1 would have this problem.
Perhaps I wasn't clear. The stddef.h file is present, and contains
the declaration of ptrdiff_t. The problem is that alloc.c doesn't
#include <stddef.h>
My upcoming mega-patch will add
#include <stddef.h>
for bytecode.c, elhash.c, and opaque.c, for offsetof() and ptrdiff_t.
sirius:~/XEmacs/xemacs-21.0-b57/src> grep -l ptrdiff *c
alloc.c
gmalloc.c
malloc.c
sheap.c
unexec.c
vm-limit.c
sirius:~/XEmacs/xemacs-21.0-b57/src> grep stddef `!!`
grep stddef `grep -l ptrdiff *c`
gmalloc.c:#include <stddef.h>
gmalloc.c:#include <stddef.h>
sheap.c:#include <stddef.h>
vm-limit.c:#include <stddef.h>
According to the above greppage, don't alloc.c, malloc.c and unexec.c
need sttdef.h too, for ptrdiff_t?
It's the compiler's responsibility, not the operating system's, to
provide the stddef.h header.
As I said, the stddef.h header is provided, it just doesn't seem to be
getting #included everywhere it needs to.
There's a good chance your gcc was not built on exactly the same
level
of the OS as you're running it. gcc is quite sensitive to mixing OS
levels, more so than any other GNU program.
I "inherited" this Sparc4, and indeed, it was not me but a former
colleague who set it up. I will check out the gcc installation and
make sure it's the right version, etc.