Fix -Wmacro-redefined werror issues.

The libc++ defines this (wrapped in ifndef, like this should have
been), so including a libc++ header and then defining this results in
a werror failure. Define this in common.mk so we can be sure it does
get defined, but also that it gets defined early enough that anyone
defining this in source wrapped with ifndef doesn't get broken.

Test: mma # on angler
Bug: http://b/34740564
Change-Id: Id7d70a6ad5e530390eb8b37e5e618312d1d7e6dc
This commit is contained in:
Dan Albert 2017-01-30 17:54:29 -08:00
parent a0de1d3cc3
commit 789f042d3c
24 changed files with 12 additions and 20 deletions

View File

@ -37,6 +37,8 @@ ifeq ($(DISPLAY_DEBUG_SWAPINTERVAL),true)
common_flags += -DDEBUG_SWAPINTERVAL
endif
common_flags += -D__STDC_FORMAT_MACROS
common_deps :=
kernel_includes :=

View File

@ -30,7 +30,6 @@
#include "string.h"
#include "external.h"
#include "overlay.h"
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
namespace qhwc {

View File

@ -28,7 +28,6 @@
*/
#define LOG_NDDEBUG 0
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "profiler.h"

View File

@ -31,7 +31,6 @@
#include <sys/mman.h>
#include <cutils/log.h>
#include <gralloc_priv.h>
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "qdMetaData.h"

View File

@ -41,6 +41,8 @@ ifeq ($(DISPLAY_DEBUG_SWAPINTERVAL),true)
common_flags += -DDEBUG_SWAPINTERVAL
endif
common_flags += -D__STDC_FORMAT_MACROS
common_deps :=
kernel_includes :=

View File

@ -30,7 +30,6 @@
#include "string.h"
#include "external.h"
#include "overlay.h"
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
namespace qhwc {

View File

@ -28,7 +28,6 @@
*/
#define LOG_NDDEBUG 0
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "profiler.h"

View File

@ -32,7 +32,6 @@
#include <sys/mman.h>
#include <cutils/log.h>
#include <gralloc_priv.h>
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "qdMetaData.h"

View File

@ -42,6 +42,8 @@ ifeq ($(DISPLAY_DEBUG_SWAPINTERVAL),true)
common_flags += -DDEBUG_SWAPINTERVAL
endif
common_flags += -D__STDC_FORMAT_MACROS
common_deps :=
kernel_includes :=

View File

@ -31,7 +31,6 @@
#include "qd_utils.h"
#include "string.h"
#include "overlay.h"
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
using namespace qdutils;

View File

@ -28,7 +28,6 @@
*/
#define LOG_NDDEBUG 0
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "profiler.h"

View File

@ -32,7 +32,6 @@
#include <sys/mman.h>
#include <cutils/log.h>
#include <gralloc_priv.h>
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "qdMetaData.h"

View File

@ -32,6 +32,8 @@ ifeq ($(DISPLAY_DEBUG_SWAPINTERVAL),true)
common_flags += -DDEBUG_SWAPINTERVAL
endif
common_flags += -D__STDC_FORMAT_MACROS
common_deps :=
kernel_includes :=

View File

@ -31,7 +31,6 @@
#include "qd_utils.h"
#include "string.h"
#include "overlay.h"
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
using namespace qdutils;

View File

@ -28,7 +28,6 @@
*/
#define LOG_NDDEBUG 0
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "profiler.h"

View File

@ -32,7 +32,6 @@
#include <sys/mman.h>
#include <cutils/log.h>
#include <gralloc_priv.h>
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "qdMetaData.h"

View File

@ -42,6 +42,8 @@ ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
common_flags += -DMASTER_SIDE_CP
endif
common_flags += -D__STDC_FORMAT_MACROS
common_deps :=
kernel_includes :=

View File

@ -28,7 +28,6 @@
*/
#define LOG_NDDEBUG 0
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "profiler.h"

View File

@ -32,7 +32,6 @@
#include <sys/mman.h>
#include <cutils/log.h>
#include <gralloc_priv.h>
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "qdMetaData.h"

View File

@ -27,8 +27,6 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define __STDC_FORMAT_MACROS
#include <stdio.h>
#include <ctype.h>
#include <math.h>

View File

@ -53,6 +53,8 @@ ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)), true)
common_flags += -DMASTER_SIDE_CP
endif
common_flags += -D__STDC_FORMAT_MACROS
common_deps :=
kernel_includes :=

View File

@ -28,7 +28,6 @@
*/
#define LOG_NDDEBUG 0
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "profiler.h"

View File

@ -32,7 +32,6 @@
#include <sys/mman.h>
#include <cutils/log.h>
#include <gralloc_priv.h>
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#include "qdMetaData.h"

View File

@ -27,8 +27,6 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define __STDC_FORMAT_MACROS
#include <stdio.h>
#include <ctype.h>
#include <math.h>