From 00bbc7f69f8b3fc2c37cc0f991a3ce03d801150f Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 10 Nov 2014 22:04:08 -0800 Subject: [PATCH] Bionic: Make DISALLOW_COPY_AND_ASSIGN conditional Make the definition of DISALLOW_COPY_AND_ASSIGN conditional. This is so that the projects that include libnativehelper and bionic macros do not have to be careful in which order those projects are included. Bug: 18334516 Change-Id: Ib12a2c2b7ad2e360edcf3b26cb1be626540fadc1 --- libc/private/bionic_macros.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc/private/bionic_macros.h b/libc/private/bionic_macros.h index 491b3ace0..4f3cf8997 100644 --- a/libc/private/bionic_macros.h +++ b/libc/private/bionic_macros.h @@ -17,11 +17,16 @@ #ifndef _BIONIC_MACROS_H_ #define _BIONIC_MACROS_H_ +// Frameworks OpenGL code currently leaks this header and allows +// collisions with other declarations, e.g., from libnativehelper. +// TODO: Remove once cleaned up. b/18334516 +#if !defined(DISALLOW_COPY_AND_ASSIGN) // DISALLOW_COPY_AND_ASSIGN disallows the copy and operator= functions. // It goes in the private: declarations in a class. #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&) = delete; \ void operator=(const TypeName&) = delete +#endif // !defined(DISALLOW_COPY_AND_ASSIGN) // A macro to disallow all the implicit constructors, namely the // default constructor, copy constructor and operator= functions.