From f8241b41d560c776a38fd8ff94815f5d84dc2b8f Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 19 Aug 2015 17:45:17 -0700 Subject: [PATCH] Remove Windows AndroidConfig.h. The only things left that we're using are the Windows target version and _FILE_OFFSET_BITS=64, and they can go in the combo .mk. Also fix the unused Windows 64 .mk. Change-Id: I5f2458d67c0a8201196a339573f861bbf18b7eb8 --- core/combo/HOST_windows-x86.mk | 6 ++- core/combo/HOST_windows-x86_64.mk | 3 +- .../include/arch/windows/AndroidConfig.h | 51 ------------------- 3 files changed, 6 insertions(+), 54 deletions(-) delete mode 100644 core/combo/include/arch/windows/AndroidConfig.h diff --git a/core/combo/HOST_windows-x86.mk b/core/combo/HOST_windows-x86.mk index eb1c49c13..30c1c755d 100644 --- a/core/combo/HOST_windows-x86.mk +++ b/core/combo/HOST_windows-x86.mk @@ -33,13 +33,15 @@ $(combo_2nd_arch_prefix)HOST_GLOBAL_LD_DIRS += -Lprebuilts/gcc/linux-x86/host/x8 $(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS # Use C99-compliant printf functions (%zd). $(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 +# Admit to using >= Win2K. +$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D_WIN32_WINNT=0x0500 +# Get 64-bit off_t and related functions. +$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D_FILE_OFFSET_BITS=64 $(combo_2nd_arch_prefix)HOST_CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX) $(combo_2nd_arch_prefix)HOST_CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX) $(combo_2nd_arch_prefix)HOST_AR := $(TOOLS_PREFIX)ar$(TOOLS_EXE_SUFFIX) -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += \ - -include $(call select-android-config-h,windows) $(combo_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS += \ --enable-stdcall-fixup diff --git a/core/combo/HOST_windows-x86_64.mk b/core/combo/HOST_windows-x86_64.mk index b38c74c51..49b74e259 100644 --- a/core/combo/HOST_windows-x86_64.mk +++ b/core/combo/HOST_windows-x86_64.mk @@ -31,12 +31,13 @@ HOST_GLOBAL_LD_DIRS += -L/usr/amd64-mingw32msvc/lib HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS # Use C99-compliant printf functions (%zd). HOST_GLOBAL_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 +# Admit to using >= Win2K. +HOST_GLOBAL_CFLAGS += -D_WIN32_WINNT=0x0500 HOST_CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX) HOST_CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX) HOST_AR := $(TOOLS_PREFIX)ar$(TOOLS_EXE_SUFFIX) -HOST_GLOBAL_CFLAGS += -include $(call select-android-config-h,windows) HOST_GLOBAL_LDFLAGS += --enable-stdcall-fixup ifneq ($(strip $(BUILD_HOST_static)),) # Statically-linked binaries are desirable for sandboxed environment diff --git a/core/combo/include/arch/windows/AndroidConfig.h b/core/combo/include/arch/windows/AndroidConfig.h deleted file mode 100644 index 9ed61e945..000000000 --- a/core/combo/include/arch/windows/AndroidConfig.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2005 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _ANDROID_CONFIG_H -#define _ANDROID_CONFIG_H - -/* - * =========================================================================== - * !!! IMPORTANT !!! - * =========================================================================== - * - * This file is included by ALL C/C++ source files. Don't put anything in - * here unless you are absolutely certain it can't go anywhere else. - * - * Any C++ stuff must be wrapped with "#ifdef __cplusplus". Do not use "//" - * comments. - */ - -#ifdef __CYGWIN__ -#error "CYGWIN is unsupported for platform builds" -#endif - -/* - * We need to choose between 32-bit and 64-bit off_t. All of our code should - * agree on the same size. For desktop systems, use 64-bit values, - * because some of our libraries (e.g. wxWidgets) expect to be built that way. - */ -#define _FILE_OFFSET_BITS 64 -#define _LARGEFILE_SOURCE 1 - -/* - * Add any extra platform-specific defines here. - */ -#define WIN32 1 /* stock Cygwin doesn't define these */ -#define _WIN32 1 -#define _WIN32_WINNT 0x0500 /* admit to using >= Win2K */ - -#endif /*_ANDROID_CONFIG_H*/