jwoolley 01/11/05 18:17:56
Modified: . CHANGES
include apr_ring.h
Log:
Apparently not all systems have offsetof(), and APR already provides a
wrapper macro to account for that, so we might as well use it.
Revision Changes Path
1.35 +3 -0 apr-util/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr-util/CHANGES,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -u -r1.34 -r1.35
--- CHANGES 2001/10/16 06:31:54 1.34
+++ CHANGES 2001/11/06 02:17:56 1.35
@@ -1,5 +1,8 @@
Changes with APR-util b1
+ *) Use APR_XtOffsetOf instead of offsetof() in the ring macros for
+ portability. [Cliff Woolley]
+
*) We now create exports.c and export_vars.h, which in turn create
exports.c. From this we generate two more files with different
purposes: aprutil.exp - list of exported symbols; and exports.lo
1.12 +2 -2 apr-util/include/apr_ring.h
Index: apr_ring.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_ring.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -u -r1.11 -r1.12
--- apr_ring.h 2001/09/16 21:46:11 1.11
+++ apr_ring.h 2001/11/06 02:17:56 1.12
@@ -71,7 +71,7 @@
/*
* for offsetof()
*/
-#include <stddef.h>
+#include "apr_general.h"
/**
* @defgroup APR_Util_Rings Rings
@@ -145,7 +145,7 @@
* @param link The name of the APR_RING_ENTRY in the element struct
*/
#define APR_RING_SENTINEL(hp, elem, link) \
- (struct elem *)((char *)(hp) - offsetof(struct elem, link))
+ (struct elem *)((char *)(hp) - APR_XtOffsetOf(struct elem, link))
/**
* The first element of the ring