This patch removes the following unused typedefs from c.h:
bool8, bool16, bool32, word8, word16, word32, Offset
In order to remove "Offset" I had to update some code in
page/bufpage.c, but that shouldn't have been using Offset to begin
with, AFAICS.
Unless anyone complains, I'll apply this in 24 hours or so.
-Neil
Index: src/backend/storage/page/bufpage.c
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql-server/src/backend/storage/page/bufpage.c,v
retrieving revision 1.57
diff -c -r1.57 bufpage.c
*** src/backend/storage/page/bufpage.c 29 Nov 2003 19:51:57 -0000 1.57
--- src/backend/storage/page/bufpage.c 26 Dec 2003 01:21:18 -0000
***************
*** 306,322 ****
int
PageRepairFragmentation(Page page, OffsetNumber *unused)
{
! Offset pd_lower = ((PageHeader) page)->pd_lower;
! Offset pd_upper = ((PageHeader) page)->pd_upper;
! Offset pd_special = ((PageHeader) page)->pd_special;
struct itemIdSortData *itemidbase,
*itemidptr;
! ItemId lp;
int nline,
nused;
int i;
Size totallen;
! Offset upper;
/*
* It's worth the trouble to be more paranoid here than in most
--- 306,322 ----
int
PageRepairFragmentation(Page page, OffsetNumber *unused)
{
! LocationIndex pd_lower = ((PageHeader) page)->pd_lower;
! LocationIndex pd_upper = ((PageHeader) page)->pd_upper;
! LocationIndex pd_special = ((PageHeader) page)->pd_special;
struct itemIdSortData *itemidbase,
*itemidptr;
! ItemId lp;
int nline,
nused;
int i;
Size totallen;
! LocationIndex upper;
/*
* It's worth the trouble to be more paranoid here than in most
Index: src/include/c.h
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql-server/src/include/c.h,v
retrieving revision 1.158
diff -c -r1.158 c.h
*** src/include/c.h 20 Dec 2003 17:31:21 -0000 1.158
--- src/include/c.h 26 Dec 2003 01:08:52 -0000
***************
*** 235,248 ****
#endif /* not HAVE_UINT8 */
/*
- * boolN
- * Boolean value, AT LEAST N BITS IN SIZE.
- */
- typedef uint8 bool8; /* >= 8 bits */
- typedef uint16 bool16; /* >= 16 bits */
- typedef uint32 bool32; /* >= 32 bits */
-
- /*
* bitsN
* Unit of bitwise operation, AT LEAST N BITS IN SIZE.
*/
--- 235,240 ----
***************
*** 251,265 ****
typedef uint32 bits32; /* >= 32 bits */
/*
- * wordN
- * Unit of storage, AT LEAST N BITS IN SIZE,
- * used to fetch/store data.
- */
- typedef uint8 word8; /* >= 8 bits */
- typedef uint16 word16; /* >= 16 bits */
- typedef uint32 word32; /* >= 32 bits */
-
- /*
* floatN
* Floating point number, AT LEAST N BITS IN SIZE,
* used for numerical computations.
--- 243,248 ----
***************
*** 298,305 ****
typedef unsigned long long int uint64;
#endif
! #else /* not HAVE_LONG_INT_64 and not
! * HAVE_LONG_LONG_INT_64 */
/* Won't actually work, but fall back to long int so that code compiles */
#ifndef HAVE_INT64
--- 281,287 ----
typedef unsigned long long int uint64;
#endif
! #else /* not HAVE_LONG_INT_64 and not HAVE_LONG_LONG_INT_64 */
/* Won't actually work, but fall back to long int so that code compiles */
#ifndef HAVE_INT64
***************
*** 310,317 ****
#endif
#define INT64_IS_BUSTED
! #endif /* not HAVE_LONG_INT_64 and not
! * HAVE_LONG_LONG_INT_64 */
/* Decide if we need to decorate 64-bit constants */
#ifdef HAVE_LL_CONSTANTS
--- 292,298 ----
#endif
#define INT64_IS_BUSTED
! #endif /* not HAVE_LONG_INT_64 and not HAVE_LONG_LONG_INT_64 */
/* Decide if we need to decorate 64-bit constants */
#ifdef HAVE_LL_CONSTANTS
***************
*** 355,370 ****
* Indices are non negative.
*/
typedef unsigned int Index;
-
- /*
- * Offset
- * Offset into any memory resident array.
- *
- * Note:
- * This differs from an Index in that an Index is always
- * non negative, whereas Offset may be negative.
- */
- typedef signed int Offset;
/*
* Common Postgres datatype names (as used in the catalogs)
--- 336,341 ----
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]