Steve Nicolai <snicolai@mac.com> writes:
> Continuing on my quest to get 7.1 to build on Solaris 8 with
> Sun's cc 5.0, I found an alignment problem in
> backend/access/heap/tuptoaster.c
Good catch. I fixed a couple similar problems (assuming that a local
"char buffer[N]" object would be aligned on better-than-char boundaries)
in xlog.c not long ago. I wonder if any others are lurking?
> - char chunk_data[VARHDRSZ + TOAST_MAX_CHUNK_SIZE];
> + union {
> + varattrib a;
> + char d[VARHDRSZ + TOAST_MAX_CHUNK_SIZE];
> + } chunk_data;
This is pretty ugly, it'd be better to use a struct of a struct-varlena
header followed by a char[TOAST_MAX_CHUNK_SIZE] data area. Will fix.
regards, tom lane