rooneg@tigris.org wrote:
>Author: rooneg
>Date: Thu Aug 18 00:50:14 2005
>New Revision: 15799
>
>Modified:
> trunk/subversion/include/svn_types.h
>
>Log:
>Avoid hundreds of warnings about redefining macros now that APR has a
>version of the APR_ARRAY macros.
>
>* subversion/include/svn_types.h
> (APR_ARRAY_IDX, APR_ARRAY_PUSH): undef these before defining our own
> version if they were already defined by someone else.
>
>Modified: trunk/subversion/include/svn_types.h
>Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/include/svn_types.h?rev=15799&p1=trunk/subversion/include/svn_types.h&p2=trunk/subversion/include/svn_types.h&r1=15798&r2=15799
>==============================================================================
>--- trunk/subversion/include/svn_types.h (original)
>+++ trunk/subversion/include/svn_types.h Thu Aug 18 00:50:14 2005
>@@ -66,6 +66,16 @@
>
>
>+/* this is now defined in APR, so undef it to avoid warnings here */
>+#ifdef APR_ARRAY_IDX
>+#undef APR_ARRAY_IDX
>+#endif
>+
>+/* ditto. */
>+#ifdef APR_ARRAY_PUSH
>+#undef APR_ARRAY_PUSH
>+#endif
>+
>
>
Um. No. -1
Seconf of all, you don't have to check with #ifdef before doing an
#undef. You can blindly #under an undefined symbol, and the compiler is
required not to yell.
But first of all, the correct way to go about this is to use the APR
macros if they're available: therefore,
#ifndef APR_ARRAY_IDX
#define APR_ARRAY_IDX ...
Etc.
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 18 08:39:06 2005