apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject [PATCH] revised: Does anyone want this committed?
Date Thu, 02 Aug 2001 23:38:04 GMT
First off - this patch names apr_pool_t allocations (nothing to do with pipes,
sorry for my earlier misnomer.)


From: "Branko ─îibej" <brane@xbc.nu>
Sent: Thursday, August 02, 2001 5:51 PM


> William A. Rowe, Jr. wrote:
>
> >2. I can't figure out how to stringize __LINE__, which sort of sucks.
> >
> The Well Known Hack is
>
>     #define STRINGIFY(S) REALLY_STRINGIFY(S)
>     #define REALLY_STRINGIFY(S) #S
>
>     char this_line_number[] = STRINGIFY(__LINE__);

Thanks, the revised patch is attached :)


One other bit of coolness for win32 developers that I like...

--- srclib/apr/include/arch/win32/apr_private.h 2001/06/06 00:07:46 1.24
+++ srclib/apr/include/arch/win32/apr_private.h 2001/08/02 23:13:00
@@ -191,5 +191,8 @@
         ptr = (type *)apr_sms_calloc(struct->mem_sys, sizeof(type)); \
     }

+#define abort() DebugBreak();
+#define assert(x) if (!(x)) DebugBreak;
+
 #endif  /*APR_PRIVATE_H*/
 #endif  /*WIN32*/


This works nicely around WIN32's bogus crtlib interceptions of abort(), which
make backtracing somewhat difficult (espessially with the BoundsChecker intercepts.)



Mime
View raw message