trawick 01/12/14 04:07:00
Modified: memory/unix apr_pools.c
Log:
AIX system header files define something called ALIGN(),
so prefix our two ALIGN macros with APR_
Revision Changes Path
1.121 +10 -10 apr/memory/unix/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- apr_pools.c 2001/12/14 09:30:26 1.120
+++ apr_pools.c 2001/12/14 12:06:59 1.121
@@ -84,11 +84,11 @@
* Macros and defines
*/
-/* ALIGN() is only to be used to align on a power of 2 boundary */
-#define ALIGN(size, boundary) \
+/* APR_ALIGN() is only to be used to align on a power of 2 boundary */
+#define APR_ALIGN(size, boundary) \
(((size) + ((boundary) - 1)) & ~((boundary) - 1))
-#define ALIGN_DEFAULT(size) ALIGN(size, 8)
+#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
#if APR_HAS_THREADS
#define LOCK(mutex) \
@@ -153,9 +153,9 @@
#endif
};
-#define SIZEOF_NODE_T ALIGN_DEFAULT(sizeof(node_t))
-#define SIZEOF_ALLOCATOR_T ALIGN_DEFAULT(sizeof(allocator_t))
-#define SIZEOF_POOL_T ALIGN_DEFAULT(sizeof(apr_pool_t))
+#define SIZEOF_NODE_T APR_ALIGN_DEFAULT(sizeof(node_t))
+#define SIZEOF_ALLOCATOR_T APR_ALIGN_DEFAULT(sizeof(allocator_t))
+#define SIZEOF_POOL_T APR_ALIGN_DEFAULT(sizeof(apr_pool_t))
/*
* Variables
@@ -182,7 +182,7 @@
/* Round up the block size to the next boundary, but always
* allocate at least a certain size (MIN_ALLOC).
*/
- size = ALIGN(size + SIZEOF_NODE_T, BOUNDARY_SIZE);
+ size = APR_ALIGN(size + SIZEOF_NODE_T, BOUNDARY_SIZE);
if (size < MIN_ALLOC)
size = MIN_ALLOC;
@@ -326,7 +326,7 @@
void *mem;
char *endp;
- size = ALIGN_DEFAULT(size);
+ size = APR_ALIGN_DEFAULT(size);
active = pool->active;
/* If the active node has enough bytes left, use it. */
@@ -364,7 +364,7 @@
void *mem;
char *endp;
- size = ALIGN_DEFAULT(size);
+ size = APR_ALIGN_DEFAULT(size);
active = pool->active;
/* If the active node has enough bytes left, use it. */
@@ -957,7 +957,7 @@
*strp++ = '\0';
size = strp - ps.node->first_avail;
- size = ALIGN_DEFAULT(size);
+ size = APR_ALIGN_DEFAULT(size);
strp = ps.node->first_avail;
ps.node->first_avail += size;