> more info.  It seems to not like the following from
> src/include/buffer/bufpage.h (line 305):
> #define PageSetLSN(page, lsn) \
>         (((PageHeader) (page))->pd_lsn = (XLogRecPtr) (lsn))
> 
> I'm not sure what it's trying to do... 

Just assign values to 8 bytes structure in pageheader.
Did you make distclean?

Vadim

Mon, 20 Nov 2000 09:46:39 -0800
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM>
RE: err, XLOG/UW711/cc/Doesn't compile.
* Mikheev, Vadim <vmikheev@SECTORBASE.COM> [001120 12:00]:
> > more info.  It seems to not like the following from
> > src/include/buffer/bufpage.h (line 305):
> > #define PageSetLSN(page, lsn) \
> >         (((PageHeader) (page))->pd_lsn = (XLogRecPtr) (lsn))
> > 
> > I'm not sure what it's trying to do... 
> 
> Just assign values to 8 bytes structure in pageheader.
> Did you make distclean?
yes, gmake maintainer-clean.
> 
> Vadim
-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Mon, 20 Nov 2000 12:01:10 -0600
"'Larry Rosenman'" <ler@lerctr.org>
Re: err, XLOG/UW711/cc/Doesn't compile.
Mikheev, Vadim writes:

> > more info.  It seems to not like the following from
> > src/include/buffer/bufpage.h (line 305):
> > #define PageSetLSN(page, lsn) \
> >         (((PageHeader) (page))->pd_lsn = (XLogRecPtr) (lsn))
> > 
> > I'm not sure what it's trying to do... 
> 
> Just assign values to 8 bytes structure in pageheader.

It's because XLogRecPtr is a struct.  You can't assign structs with
'='.  Gotta use memcpy, etc.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Mon, 20 Nov 2000 19:46:07 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
RE: err, XLOG/UW711/cc/Doesn't compile.
Peter Eisentraut <peter_e@gmx.net> writes:
> It's because XLogRecPtr is a struct.  You can't assign structs with
> '='.  Gotta use memcpy, etc.

Struct assignment is a required feature since ANSI C, and I'm pretty
sure we use it in other places already.  I doubt that's the explanation
for Larry's problem.

			regards, tom lane

Mon, 20 Nov 2000 13:58:10 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: err, XLOG/UW711/cc/Doesn't compile. 
I wrote:

> Mikheev, Vadim writes:
> 
> > > more info.  It seems to not like the following from
> > > src/include/buffer/bufpage.h (line 305):
> > > #define PageSetLSN(page, lsn) \
> > >         (((PageHeader) (page))->pd_lsn = (XLogRecPtr) (lsn))
> > > 
> > > I'm not sure what it's trying to do... 
> > 
> > Just assign values to 8 bytes structure in pageheader.
> 
> It's because XLogRecPtr is a struct.  You can't assign structs with
> '='.  Gotta use memcpy, etc.

Correction:  It's because the compiler won't let you cast to a
struct.  Assigning seems to compile okay.

This code fails to compile:

| typedef struct foo { int a; int b; } foo;
| 
| main() {
|   foo x;
|   (foo) x;
| }

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Mon, 20 Nov 2000 19:58:27 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
RE: err, XLOG/UW711/cc/Doesn't compile.