You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2001/08/02 05:17:29 UTC
cvs commit: apr/memory/unix apr_pools.c
wrowe 01/08/01 20:17:29
Modified: memory/unix apr_pools.c
Log:
It just won't work on win32 that way... need an .m4 test for HAVE__END
(is the _end symbol defined?)
Revision Changes Path
1.105 +8 -2 apr/memory/unix/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- apr_pools.c 2001/07/23 22:51:41 1.104
+++ apr_pools.c 2001/08/02 03:17:29 1.105
@@ -985,7 +985,9 @@
/* the unix linker defines this symbol as the last byte + 1 of
* the executable... so it includes TEXT, BSS, and DATA
*/
+#ifdef HAVE__END
extern char _end;
+#endif
/* is ptr in the range [lo,hi) */
#define is_ptr_in_range(ptr, lo, hi) \
@@ -1001,16 +1003,20 @@
union block_hdr **pb;
union block_hdr *b;
+#ifdef HAVE__END
/* short-circuit stuff which is in TEXT, BSS, or DATA */
if (is_ptr_in_range(s, 0, &_end)) {
return NULL;
}
+#endif
/* consider stuff on the stack to also be in the NULL pool...
* XXX: there's cases where we don't want to assume this
*/
if ((stack_direction == -1 && is_ptr_in_range(s, &ts, known_stack_point))
|| (stack_direction == 1 && is_ptr_in_range(s, known_stack_point, &ts))) {
- abort();
+#ifdef HAVE__END
+ abort();
+#endif
return NULL;
}
/* search the global_block_list */
@@ -1073,7 +1079,7 @@
return 1;
}
#ifdef APR_POOL_DEBUG
- while (a->joined) {
+ while (a && a->joined) {
a = a->joined;
}
#endif