Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd67b7e

Browse files
committed
Remove offsetof definition
This was only needed to deal with some ancient and no longer supported systems. Reviewed-by: Tom Lane <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/9a5223a2-3e25-d4fb-f092-01ec17428584%40enterprisedb.com
1 parent c981879 commit bd67b7e

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/include/c.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* 2) bool, true, false
3131
* 3) standard system types
3232
* 4) IsValid macros for system types
33-
* 5) offsetof, lengthof, alignment
33+
* 5) lengthof, alignment
3434
* 6) assertions
3535
* 7) widely useful macros
3636
* 8) random stuff
@@ -703,20 +703,9 @@ typedef NameData *Name;
703703

704704

705705
/* ----------------------------------------------------------------
706-
* Section 5: offsetof, lengthof, alignment
706+
* Section 5: lengthof, alignment
707707
* ----------------------------------------------------------------
708708
*/
709-
/*
710-
* offsetof
711-
* Offset of a structure/union field within that structure/union.
712-
*
713-
* XXX This is supposed to be part of stddef.h, but isn't on
714-
* some systems (like SunOS 4).
715-
*/
716-
#ifndef offsetof
717-
#define offsetof(type, field) ((long) &((type *)0)->field)
718-
#endif /* offsetof */
719-
720709
/*
721710
* lengthof
722711
* Number of elements in an array.

0 commit comments

Comments
 (0)