aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-08-23 15:39:36 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-08-23 15:40:37 +0200
commitbd67b7e01031b688f2f19f657ece4aa2322dbcc8 (patch)
tree58a45f9cb537b0700c782ad1c845fb9c14043f66
parentc9818798147a4eec00bba61a05fa9bc88398ec3b (diff)
downloadpostgresql-bd67b7e01031b688f2f19f657ece4aa2322dbcc8.tar.gz
postgresql-bd67b7e01031b688f2f19f657ece4aa2322dbcc8.zip
Remove offsetof definition
This was only needed to deal with some ancient and no longer supported systems. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/9a5223a2-3e25-d4fb-f092-01ec17428584%40enterprisedb.com
-rw-r--r--src/include/c.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/include/c.h b/src/include/c.h
index dfc366b026f..a381f9a6c40 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -30,7 +30,7 @@
* 2) bool, true, false
* 3) standard system types
* 4) IsValid macros for system types
- * 5) offsetof, lengthof, alignment
+ * 5) lengthof, alignment
* 6) assertions
* 7) widely useful macros
* 8) random stuff
@@ -703,21 +703,10 @@ typedef NameData *Name;
/* ----------------------------------------------------------------
- * Section 5: offsetof, lengthof, alignment
+ * Section 5: lengthof, alignment
* ----------------------------------------------------------------
*/
/*
- * offsetof
- * Offset of a structure/union field within that structure/union.
- *
- * XXX This is supposed to be part of stddef.h, but isn't on
- * some systems (like SunOS 4).
- */
-#ifndef offsetof
-#define offsetof(type, field) ((long) &((type *)0)->field)
-#endif /* offsetof */
-
-/*
* lengthof
* Number of elements in an array.
*/