summaryrefslogtreecommitdiff
path: root/databases/postgresql91/patches
diff options
context:
space:
mode:
authormarino <marino>2012-10-07 22:15:26 +0000
committermarino <marino>2012-10-07 22:15:26 +0000
commit5b8b2e04ee695416eadfdf88b9b0364c29cc7e89 (patch)
tree184a94444c566cc7854d9cbed911a1593015a1c5 /databases/postgresql91/patches
parent7d91a3b42ddb822cabf843f938b2c9af8957369f (diff)
downloadpkgsrc-5b8b2e04ee695416eadfdf88b9b0364c29cc7e89.tar.gz
databases/postgresql(-client): Revert most of last commit
After discussing gcc47 build problems with postgresql developers, it became apparent that the error was unique to DragonFly. It turns out that DragonFly was using an older offsetof macro instead of the builtin version provided by GCC. Fixing the offsetof macro on DragonFly allowed the pre-patched psgsql 91 to build without issue. While the previous patches certainly don't hurt anything, they are being removed to ease future maintenance. The warning suppression fix is still valid, so the change to the pgsql client makefile is being left in place.
Diffstat (limited to 'databases/postgresql91/patches')
-rw-r--r--databases/postgresql91/patches/patch-src_backend_access_gist_gistutil.c22
-rw-r--r--databases/postgresql91/patches/patch-src_include_access_htup.h53
-rw-r--r--databases/postgresql91/patches/patch-src_include_access_itup.h26
3 files changed, 0 insertions, 101 deletions
diff --git a/databases/postgresql91/patches/patch-src_backend_access_gist_gistutil.c b/databases/postgresql91/patches/patch-src_backend_access_gist_gistutil.c
deleted file mode 100644
index b42c72146a7..00000000000
--- a/databases/postgresql91/patches/patch-src_backend_access_gist_gistutil.c
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-src_backend_access_gist_gistutil.c,v 1.1 2012/10/07 10:24:54 marino Exp $
-
-GCC 4.6 and GCC 4.7 do not consider the storage array has having a constant
-size due to the macro definition of GEVHDRSZ found in gist.h
-"gistutil.c:248:14: error: storage size of `storage` isn't constant"
-Using an enumeration satisfies these compilers.
-
---- src/backend/access/gist/gistutil.c.orig 2012-09-19 21:50:31.000000000 +0000
-+++ src/backend/access/gist/gistutil.c
-@@ -244,8 +244,11 @@ gistMakeUnionKey(GISTSTATE *giststate, i
- {
-
- int dstsize;
-+ enum {
-+ GEV_STORAGE_SIZE = 2 * sizeof(GISTENTRY) + GEVHDRSZ
-+ };
-
-- static char storage[2 * sizeof(GISTENTRY) + GEVHDRSZ];
-+ static char storage[GEV_STORAGE_SIZE];
- GistEntryVector *evec = (GistEntryVector *) storage;
-
- evec->n = 2;
diff --git a/databases/postgresql91/patches/patch-src_include_access_htup.h b/databases/postgresql91/patches/patch-src_include_access_htup.h
deleted file mode 100644
index 99520a69f0a..00000000000
--- a/databases/postgresql91/patches/patch-src_include_access_htup.h
+++ /dev/null
@@ -1,53 +0,0 @@
-$NetBSD: patch-src_include_access_htup.h,v 1.1 2012/10/07 10:24:54 marino Exp $
-
-Fixes GCC 4.7 warning and error
-Also see comments about similar problems in patch-src_include_access_ihup.h
-htup.h:464:2: warning: variably modified 'mt_padding' at file scope
- [enabled by default]
-relscan.h:51:15: error: variably modified 'rs_vistuples' at file scope
-
-The relscan.h error is caused by the MaxHeapTuplesPerPage definition found
-in htup.h. Use enum method to satisfy gcc.
-
---- src/include/access/htup.h.orig 2012-09-19 21:50:31.000000000 +0000
-+++ src/include/access/htup.h
-@@ -16,6 +16,7 @@
-
- #include "access/tupdesc.h"
- #include "access/tupmacs.h"
-+#include "storage/bufpage.h"
- #include "storage/itemptr.h"
- #include "storage/relfilenode.h"
-
-@@ -405,9 +406,10 @@ do { \
- * pointers to this anyway, to avoid excessive line-pointer bloat and not
- * require increases in the size of work arrays.
- */
--#define MaxHeapTuplesPerPage \
-- ((int) ((BLCKSZ - SizeOfPageHeaderData) / \
-- (MAXALIGN(offsetof(HeapTupleHeaderData, t_bits)) + sizeof(ItemIdData))))
-+#define MaxHeapTuplesPerPageInt \
-+ (BLCKSZ - SizeOfPageHeaderData) / \
-+ (MAXALIGN(offsetof(HeapTupleHeaderData, t_bits)) + \
-+ sizeof(ItemIdData))
-
- /*
- * MaxAttrSize is a somewhat arbitrary upper limit on the declared size of
-@@ -452,11 +454,16 @@ do { \
- */
- #define MINIMAL_TUPLE_OFFSET \
- ((offsetof(HeapTupleHeaderData, t_infomask2) - sizeof(uint32)) / MAXIMUM_ALIGNOF * MAXIMUM_ALIGNOF)
--#define MINIMAL_TUPLE_PADDING \
-+#define MINIMAL_TUPLE_PADDING_MACRO \
- ((offsetof(HeapTupleHeaderData, t_infomask2) - sizeof(uint32)) % MAXIMUM_ALIGNOF)
- #define MINIMAL_TUPLE_DATA_OFFSET \
- offsetof(MinimalTupleData, t_infomask2)
-
-+enum {
-+ MINIMAL_TUPLE_PADDING = MINIMAL_TUPLE_PADDING_MACRO,
-+ MaxHeapTuplesPerPage = MaxHeapTuplesPerPageInt
-+};
-+
- typedef struct MinimalTupleData
- {
- uint32 t_len; /* actual length of minimal tuple */
diff --git a/databases/postgresql91/patches/patch-src_include_access_itup.h b/databases/postgresql91/patches/patch-src_include_access_itup.h
deleted file mode 100644
index 9707d06e3cc..00000000000
--- a/databases/postgresql91/patches/patch-src_include_access_itup.h
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-src_include_access_itup.h,v 1.1 2012/10/07 10:24:54 marino Exp $
-
-GCC 4.7 fails on nbtree.h:509:16 with this message:
-error: variably modified 'items' at file scope
-It does like defining records with "variable" array lengths
-Use the enum trick to convertMaxIndexTuplesPerPage into a constant
-
---- src/include/access/itup.h.orig 2012-09-19 21:50:31.000000000 +0000
-+++ src/include/access/itup.h
-@@ -133,10 +133,13 @@ typedef IndexAttributeBitMapData *IndexA
- * IndexTupleData struct. We arrive at the divisor because each tuple
- * must be maxaligned, and it must have an associated item pointer.
- */
--#define MaxIndexTuplesPerPage \
-- ((int) ((BLCKSZ - SizeOfPageHeaderData) / \
-- (MAXALIGN(sizeof(IndexTupleData) + 1) + sizeof(ItemIdData))))
-+#define MaxIndexTuplesPerPageInt \
-+ (BLCKSZ - SizeOfPageHeaderData) / \
-+ (MAXALIGN(sizeof(IndexTupleData) + 1) + sizeof(ItemIdData))
-
-+enum {
-+ MaxIndexTuplesPerPage = MaxIndexTuplesPerPageInt
-+};
-
- /* routines in indextuple.c */
- extern IndexTuple index_form_tuple(TupleDesc tupleDescriptor,