Author: sebor
Date: Fri Oct 14 12:05:17 2005
New Revision: 321184
URL: http://svn.apache.org/viewcvs?rev=321184&view=rev
Log:
2005-10-14 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-46
* cstdlib (div): Guarded definitions of the div(long,long) overload
with the _RWSTD_NO_DIV_LONG config macro to prevent errors due to
multiple definitions of the function when it's also defined in
the system <stdlib.h> header.
Modified:
incubator/stdcxx/trunk/include/ansi/cstdlib
Modified: incubator/stdcxx/trunk/include/ansi/cstdlib
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/ansi/cstdlib?rev=321184&r1=321183&r2=321184&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/ansi/cstdlib (original)
+++ incubator/stdcxx/trunk/include/ansi/cstdlib Fri Oct 14 12:05:17 2005
@@ -3,7 +3,7 @@
*
* cstdlib - C++ Standard library interface to the ANSI C header stdlib.h
*
- * $Id: //stdlib/dev/include/ansi/cstdlib#21 $
+ * $Id$
*
***************************************************************************
*
@@ -51,14 +51,16 @@
#endif // _RWSTD_NO_ABS_LONG
-#ifndef _RWSTD_NO_LDIV
+#ifdef _RWSTD_NO_DIV_LONG
+# ifndef _RWSTD_NO_LDIV
inline ldiv_t div (long __x, long __y)
{
return ldiv (__x, __y);
}
-#endif // _RWSTD_NO_LDIV
+# endif // _RWSTD_NO_LDIV
+#endif // _RWSTD_NO_DIV_LONG
#endif // _RWSTD_CSTDLIB_INCLUDED
@@ -133,14 +135,16 @@
# endif // _RWSTD_NO_ABS_ULLONG
#endif // _RWSTD_LONG_LONG
-#ifndef _RWSTD_NO_LDIV
+#ifdef _RWSTD_NO_DIV_LONG
+# ifndef _RWSTD_NO_LDIV
inline ldiv_t div (long __x, long __y)
{
return ldiv (__x, __y);
}
-#endif // _RWSTD_NO_LDIV
+# endif // _RWSTD_NO_LDIV
+#endif // _RWSTD_NO_DIV_LONG
#ifndef _RWSTD_NO_EXTERN_C_COMPATIBILITY
# ifndef _RWSTD_NO_EXTERN_C_OVERLOAD