mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Changes to turn on nsCOMPtr leak logging on autoconf based platforms. r=waterson@netscape.com
This commit is contained in:
parent
0cdd9b7edc
commit
87a5d6a6d7
24
configure.in
24
configure.in
@ -2559,6 +2559,30 @@ if test "$ac_cv_cpp_reinterpret_cast" = yes ; then
|
||||
AC_DEFINE(HAVE_CPP_NEW_CASTS)
|
||||
fi
|
||||
|
||||
dnl See if a dynamic_cast to void* gives the most derived object.
|
||||
AC_CACHE_CHECK(for C++ dynamic_cast to void*,
|
||||
ac_cv_cpp_dynamic_cast_void_ptr,
|
||||
[AC_TRY_RUN([class X { int i; public: virtual ~X() { } };
|
||||
class Y { int j; public: virtual ~Y() { } };
|
||||
class Z : public X, public Y { int k; };
|
||||
|
||||
int main() {
|
||||
Z mdo;
|
||||
X *subx = (X*)&mdo;
|
||||
Y *suby = (Y*)&mdo;
|
||||
return !((((void*)&mdo != (void*)subx) &&
|
||||
((void*)&mdo == dynamic_cast<void*>(subx))) ||
|
||||
(((void*)&mdo != (void*)suby) &&
|
||||
((void*)&mdo == dynamic_cast<void*>(suby))));
|
||||
}],
|
||||
ac_cv_cpp_dynamic_cast_void_ptr=yes,
|
||||
ac_cv_cpp_dynamic_cast_void_ptr=no,
|
||||
ac_cv_cpp_dynamic_cast_void_ptr=no)])
|
||||
if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then
|
||||
AC_DEFINE(HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR)
|
||||
fi
|
||||
|
||||
|
||||
dnl note that this one is reversed - if the test fails, then
|
||||
dnl we require implementations of unused virtual methods. Which
|
||||
dnl really blows because it means we'll have useless vtable
|
||||
|
Loading…
Reference in New Issue
Block a user