Clean up buildfarm failures arising from the seemingly straightforward page
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 14 Jul 2008 03:22:32 +0000 (03:22 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 14 Jul 2008 03:22:32 +0000 (03:22 +0000)
macros patch :-(.  Results from both baiji and mastodon imply that MSVC
fails to perceive offsetof(PageHeaderData, pd_linp[0]) as a constant
expression in some contexts where offsetof(PageHeaderData, pd_linp) works
fine.  Sloth, thy name is Micro.

src/include/storage/bufpage.h

index 5a7fd1bdd16996f21de9a153d891827a02032650..e60ffca76c88fe9f3b6fdd65b76eed291b0b1c96 100644 (file)
@@ -179,9 +179,9 @@ typedef PageHeaderData *PageHeader;
 #define PageIsValid(page) PointerIsValid(page)
 
 /*
- * line pointer does not count as part of header
+ * line pointer(s) do not count as part of header
  */
-#define SizeOfPageHeaderData (offsetof(PageHeaderData, pd_linp[0]))
+#define SizeOfPageHeaderData (offsetof(PageHeaderData, pd_linp))
 
 /*
  * PageIsEmpty