Skip site navigation (1) Skip section navigation (2)

Re: gmake check fails on Solaris 8 with Sun cc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Nicolai <snicolai(at)mac(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: gmake check fails on Solaris 8 with Sun cc
Date: 2001-03-25 00:17:05
Message-ID: 6405.985479425@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Steve Nicolai <snicolai(at)mac(dot)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

In response to

pgsql-hackers by date

Next:From: Nathan MyersDate: 2001-03-25 00:46:32
Subject: Re: RELEASE STOPPER? nonportable int64 constant s in pg_crc.c
Previous:From: Tom LaneDate: 2001-03-25 00:07:43
Subject: Re: pgindent run?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group