Bug 1835185 - Remove build_config.h from ipc code. r=ipc-reviewers,mccr8

It is, in fact, pulled instead of security/sandbox/chromium's when
building the sandbox, because the ipc code is used virtually everywhere.
We're better off with one less copy of the file, especially in such
ubiquitous code.

Incidentally, the sandbox code also needed ipc's for its use of
EnvironmentMap.h, which now doesn't require it.

Differential Revision: https://phabricator.services.mozilla.com/D180055
This commit is contained in:
Mike Hommey 2023-06-06 21:05:36 +00:00
Родитель 75e6a18851
Коммит 3a281b3787
20 изменённых файлов: 0 добавлений и 170 удалений

Просмотреть файл

@ -19,8 +19,6 @@
#ifndef BASE_COMMAND_LINE_H_
#define BASE_COMMAND_LINE_H_
#include "build/build_config.h"
#include <map>
#include <string>
#include <vector>

Просмотреть файл

@ -7,8 +7,6 @@
#ifndef BASE_COMPILER_SPECIFIC_H_
#define BASE_COMPILER_SPECIFIC_H_
#include "build/build_config.h"
#if defined(_MSC_VER)
// Macros for suppressing and disabling warnings on MSVC.

Просмотреть файл

@ -69,7 +69,6 @@
#include "base/basictypes.h"
#include "base/lock.h"
#include "build/build_config.h"
#if defined(XP_UNIX)
# include <pthread.h>

Просмотреть файл

@ -13,7 +13,6 @@
#include "base/lock.h"
#include "base/logging.h"
#include "base/time.h"
#include "build/build_config.h"
ConditionVariable::ConditionVariable(Lock* user_lock)
: user_mutex_(user_lock->lock_.native_handle()) {

Просмотреть файл

@ -8,8 +8,6 @@
#define BASE_DIR_READER_POSIX_H_
#pragma once
#include "build/build_config.h"
// This header provides a class, DirReaderPosix, which allows one to open and
// read from directories without allocating memory. For the interface, see
// the generic fallback in dir_reader_fallback.h.

Просмотреть файл

@ -16,8 +16,6 @@
#ifndef BASE_EINTR_WRAPPER_H_
#define BASE_EINTR_WRAPPER_H_
#include "build/build_config.h"
#if defined(XP_UNIX)
# include <errno.h>

Просмотреть файл

@ -10,7 +10,6 @@
#include "base/basictypes.h"
#include "base/lock_impl.h"
#include "base/platform_thread.h"
#include "build/build_config.h"
// A convenient wrapper for an OS specific critical section.
class Lock {

Просмотреть файл

@ -8,7 +8,6 @@
#define BASE_LOCK_IMPL_H_
#include "base/basictypes.h"
#include "build/build_config.h"
#if defined(XP_WIN)
# include <windows.h>

Просмотреть файл

@ -7,7 +7,6 @@
#ifndef BASE_PLATFORM_FILE_H_
#define BASE_PLATFORM_FILE_H_
#include "build/build_config.h"
#if defined(XP_WIN)
# include <windows.h>
#endif

Просмотреть файл

@ -8,7 +8,6 @@
#define BASE_PORT_H_
#include <stdarg.h>
#include "build/build_config.h"
#ifdef _MSC_VER
# define GG_LONGLONG(x) x##I64

Просмотреть файл

@ -7,8 +7,6 @@
#ifndef BASE_SHARED_MEMORY_H_
#define BASE_SHARED_MEMORY_H_
#include "build/build_config.h"
#if defined(XP_UNIX)
# include <sys/types.h>
# include <semaphore.h>

Просмотреть файл

@ -6,8 +6,6 @@
#include "base/string_util.h"
#include "build/build_config.h"
#include <ctype.h>
#include <errno.h>
#include <math.h>

Просмотреть файл

@ -1,143 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file adds defines about the platform we're currently building on.
// Operating System:
// OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX)
// Compiler:
// COMPILER_MSVC / COMPILER_GCC
// Processor:
// ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64)
// ARCH_CPU_32_BITS / ARCH_CPU_64_BITS
#ifndef BUILD_BUILD_CONFIG_H_
#define BUILD_BUILD_CONFIG_H_
// A set of macros to use for platform detection.
#if defined(ANDROID)
# define OS_ANDROID 1
# define OS_LINUX 1
#elif defined(__APPLE__)
# if defined(XP_IOS)
# define OS_IOS 1
# else
# define OS_MACOSX 1
# endif
#elif defined(__linux__)
# define OS_LINUX 1
#elif defined(__DragonFly__)
# define OS_DRAGONFLY 1
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# define OS_FREEBSD 1
#elif defined(__NetBSD__)
# define OS_NETBSD 1
#elif defined(__OpenBSD__)
# define OS_OPENBSD 1
#elif defined(__sun__)
# define OS_SOLARIS 1
#elif defined(_WIN32)
# define OS_WIN 1
#else
# error Please add support for your platform in build/build_config.h
#endif
// For access to standard BSD features, use OS_BSD instead of a
// more specific macro.
#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) || defined(OS_NETBSD) || \
defined(OS_OPENBSD)
# define OS_BSD 1
#endif
// For access to standard POSIX features, use OS_POSIX instead of a more
// specific macro.
#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
defined(OS_SOLARIS)
# define OS_POSIX 1
#endif
// Compiler detection.
#if defined(__GNUC__)
# define COMPILER_GCC 1
#elif defined(_MSC_VER)
# define COMPILER_MSVC 1
#else
# error Please add support for your compiler in build/build_config.h
#endif
// Processor architecture detection. For more info on what's defined, see:
// http://msdn.microsoft.com/en-us/library/b0084kay.aspx
// http://www.agner.org/optimize/calling_conventions.pdf
// or with gcc, run: "echo | gcc -E -dM -"
#if defined(_M_X64) || defined(__x86_64__)
# define ARCH_CPU_X86_FAMILY 1
# define ARCH_CPU_X86_64 1
# define ARCH_CPU_64_BITS 1
#elif defined(_M_IX86) || defined(__i386__)
# define ARCH_CPU_X86_FAMILY 1
# define ARCH_CPU_X86 1
# define ARCH_CPU_32_BITS 1
#elif defined(__ARMEL__)
# define ARCH_CPU_ARM_FAMILY 1
# define ARCH_CPU_ARMEL 1
# define ARCH_CPU_32_BITS 1
# define WCHAR_T_IS_UNSIGNED 1
#elif defined(__powerpc64__)
# define ARCH_CPU_PPC64 1
# define ARCH_CPU_64_BITS 1
# define ARCH_CPU_PPC_FAMILY 1
#elif defined(__ppc__) || defined(__powerpc__)
# define ARCH_CPU_PPC 1
# define ARCH_CPU_32_BITS 1
# define ARCH_CPU_PPC_FAMILY 1
#elif defined(__sparc__) && defined(__arch64__)
# define ARCH_CPU_SPARC 1
# define ARCH_CPU_64_BITS 1
#elif defined(__sparc__)
# define ARCH_CPU_SPARC 1
# define ARCH_CPU_32_BITS 1
#elif defined(__mips64) && defined(__LP64__)
# define ARCH_CPU_MIPS 1
# define ARCH_CPU_64_BITS 1
#elif defined(__mips__)
# define ARCH_CPU_MIPS 1
# define ARCH_CPU_32_BITS 1
#elif defined(__hppa__)
# define ARCH_CPU_HPPA 1
# define ARCH_CPU_32_BITS 1
#elif defined(__ia64__)
# define ARCH_CPU_IA64 1
# define ARCH_CPU_64_BITS 1
#elif defined(__s390x__)
# define ARCH_CPU_S390X 1
# define ARCH_CPU_64_BITS 1
#elif defined(__s390__)
# define ARCH_CPU_S390 1
# define ARCH_CPU_32_BITS 1
#elif defined(__sh__)
# define ARCH_CPU_SH 1
# define ARCH_CPU_32_BITS 1
#elif defined(__alpha__)
# define ARCH_CPU_ALPHA 1
# define ARCH_CPU_64_BITS 1
#elif defined(__aarch64__) || defined(_M_ARM64)
# define ARCH_CPU_ARM_FAMILY 1
# define ARCH_CPU_ARM64 1
# define ARCH_CPU_64_BITS 1
#elif defined(__riscv) && __riscv_xlen == 64
# define ARCH_CPU_RISCV64 1
# define ARCH_CPU_64_BITS 1
#else
# error Please add support for your architecture in build/build_config.h
#endif
// Type detection for wchar_t.
#if defined(OS_WIN)
# define WCHAR_T_IS_UTF16
#else
# define WCHAR_T_IS_UTF32
#endif
#endif // BUILD_BUILD_CONFIG_H_

Просмотреть файл

@ -7,8 +7,6 @@
#ifndef CHROME_COMMON_CHILD_PROCESS_HOST_H_
#define CHROME_COMMON_CHILD_PROCESS_HOST_H_
#include "build/build_config.h"
#include <list>
#include "base/basictypes.h"

Просмотреть файл

@ -11,7 +11,6 @@
#include <queue>
#include "base/basictypes.h"
#include "base/process.h"
#include "build/build_config.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/UniquePtrExtensions.h"
#include "mozilla/WeakPtr.h"

Просмотреть файл

@ -7,7 +7,6 @@
#include "chrome/common/ipc_message.h"
#include "base/logging.h"
#include "build/build_config.h"
#include "mojo/core/ports/event.h"
#include <utility>

Просмотреть файл

@ -21,7 +21,6 @@
#include "base/logging.h"
#include "base/pickle.h"
#include "base/string_util.h"
#include "build/build_config.h"
#include "chrome/common/ipc_message.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/IntegerRange.h"

Просмотреть файл

@ -10,7 +10,6 @@
#include <cstdint>
#include <string>
#include <type_traits>
#include "build/build_config.h"
#include "chrome/common/ipc_message.h"
#include "chrome/common/ipc_message_utils.h"
#include "mozilla/ipc/IPCCore.h"

Просмотреть файл

@ -15,8 +15,6 @@
#include "base/string_piece.h"
#include "base/string_util.h"
#include "build/build_config.h"
// FIXME/cjones: these really only pertain to the linux sys string
// converters.
#ifdef XP_WIN

Просмотреть файл

@ -10,7 +10,6 @@
#include <stdint.h>
#include <windows.h>
#include "build/build_config.h"
#include "mozilla/ipc/EnvironmentMap.h"
#include "nsCOMPtr.h"
#include "nsXULAppAPI.h"