[go: nahoru, domu]

Switch to standard integer types in ipc/.

BUG=138542
TBR=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1546533002

Cr-Commit-Position: refs/heads/master@{#366527}
diff --git a/ipc/attachment_broker.h b/ipc/attachment_broker.h
index 06688921..4cf1ab5 100644
--- a/ipc/attachment_broker.h
+++ b/ipc/attachment_broker.h
@@ -10,6 +10,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/process/process_handle.h"
 #include "base/synchronization/lock.h"
+#include "build/build_config.h"
 #include "ipc/brokerable_attachment.h"
 #include "ipc/ipc_export.h"
 #include "ipc/ipc_listener.h"
diff --git a/ipc/attachment_broker_mac_unittest.cc b/ipc/attachment_broker_mac_unittest.cc
index 9e2a995a..be4f3c515 100644
--- a/ipc/attachment_broker_mac_unittest.cc
+++ b/ipc/attachment_broker_mac_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <fcntl.h>
 #include <mach/mach_vm.h>
+#include <stddef.h>
 #include <sys/mman.h>
 
 #include "base/command_line.h"
diff --git a/ipc/attachment_broker_messages.h b/ipc/attachment_broker_messages.h
index a6301c2..d27062ed 100644
--- a/ipc/attachment_broker_messages.h
+++ b/ipc/attachment_broker_messages.h
@@ -6,6 +6,7 @@
 // Multiply-included message file, hence no include guard.
 
 #include "base/process/process_handle.h"
+#include "build/build_config.h"
 #include "ipc/brokerable_attachment.h"
 #include "ipc/ipc_export.h"
 #include "ipc/ipc_message_macros.h"
diff --git a/ipc/attachment_broker_privileged.cc b/ipc/attachment_broker_privileged.cc
index a6de9e6..2b14217 100644
--- a/ipc/attachment_broker_privileged.cc
+++ b/ipc/attachment_broker_privileged.cc
@@ -8,6 +8,7 @@
 
 #include "base/lazy_instance.h"
 #include "base/metrics/histogram_macros.h"
+#include "build/build_config.h"
 #include "ipc/ipc_endpoint.h"
 
 #if defined(OS_WIN)
diff --git a/ipc/attachment_broker_privileged.h b/ipc/attachment_broker_privileged.h
index 023927a..ec600b70 100644
--- a/ipc/attachment_broker_privileged.h
+++ b/ipc/attachment_broker_privileged.h
@@ -7,7 +7,9 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "ipc/attachment_broker.h"
 #include "ipc/ipc_export.h"
 
diff --git a/ipc/attachment_broker_privileged_mac.cc b/ipc/attachment_broker_privileged_mac.cc
index 62e218c..c5bed27c 100644
--- a/ipc/attachment_broker_privileged_mac.cc
+++ b/ipc/attachment_broker_privileged_mac.cc
@@ -4,6 +4,8 @@
 
 #include "ipc/attachment_broker_privileged_mac.h"
 
+#include <stdint.h>
+
 #include "base/mac/scoped_mach_port.h"
 #include "base/memory/shared_memory.h"
 #include "base/process/port_provider_mac.h"
diff --git a/ipc/attachment_broker_privileged_mac.h b/ipc/attachment_broker_privileged_mac.h
index 86bfb6f..c13cba0 100644
--- a/ipc/attachment_broker_privileged_mac.h
+++ b/ipc/attachment_broker_privileged_mac.h
@@ -6,6 +6,7 @@
 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_
 
 #include <mach/mach.h>
+#include <stdint.h>
 
 #include <map>
 
diff --git a/ipc/attachment_broker_privileged_mac_unittest.cc b/ipc/attachment_broker_privileged_mac_unittest.cc
index 3ad2a9d..15aecb6 100644
--- a/ipc/attachment_broker_privileged_mac_unittest.cc
+++ b/ipc/attachment_broker_privileged_mac_unittest.cc
@@ -6,6 +6,8 @@
 
 #include <mach/mach.h>
 #include <mach/mach_vm.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include <map>
 
@@ -13,6 +15,7 @@
 #include "base/mac/mac_util.h"
 #include "base/mac/mach_logging.h"
 #include "base/mac/scoped_mach_port.h"
+#include "base/macros.h"
 #include "base/memory/shared_memory.h"
 #include "base/process/port_provider_mac.h"
 #include "base/process/process_handle.h"
diff --git a/ipc/attachment_broker_privileged_win.h b/ipc/attachment_broker_privileged_win.h
index e12e5059..70a4802 100644
--- a/ipc/attachment_broker_privileged_win.h
+++ b/ipc/attachment_broker_privileged_win.h
@@ -5,6 +5,7 @@
 #ifndef IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_
 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_WIN_H_
 
+#include "base/macros.h"
 #include "ipc/attachment_broker_privileged.h"
 #include "ipc/handle_attachment_win.h"
 #include "ipc/ipc_export.h"
diff --git a/ipc/attachment_broker_unprivileged.cc b/ipc/attachment_broker_unprivileged.cc
index 67f5782..9286a89 100644
--- a/ipc/attachment_broker_unprivileged.cc
+++ b/ipc/attachment_broker_unprivileged.cc
@@ -5,6 +5,7 @@
 #include "ipc/attachment_broker_unprivileged.h"
 
 #include "base/metrics/histogram_macros.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel.h"
 #include "ipc/ipc_endpoint.h"
 
diff --git a/ipc/attachment_broker_unprivileged.h b/ipc/attachment_broker_unprivileged.h
index 178406a..b572ff8 100644
--- a/ipc/attachment_broker_unprivileged.h
+++ b/ipc/attachment_broker_unprivileged.h
@@ -5,6 +5,7 @@
 #ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_
 #define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "ipc/attachment_broker.h"
 #include "ipc/ipc_export.h"
diff --git a/ipc/attachment_broker_unprivileged_mac.h b/ipc/attachment_broker_unprivileged_mac.h
index b47233f..aa058e3 100644
--- a/ipc/attachment_broker_unprivileged_mac.h
+++ b/ipc/attachment_broker_unprivileged_mac.h
@@ -5,6 +5,7 @@
 #ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_MAC_H_
 #define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_MAC_H_
 
+#include "base/macros.h"
 #include "ipc/attachment_broker_unprivileged.h"
 #include "ipc/ipc_export.h"
 #include "ipc/mach_port_attachment_mac.h"
diff --git a/ipc/attachment_broker_unprivileged_win.h b/ipc/attachment_broker_unprivileged_win.h
index 9fa15ee0e..2e37dc1 100644
--- a/ipc/attachment_broker_unprivileged_win.h
+++ b/ipc/attachment_broker_unprivileged_win.h
@@ -5,6 +5,7 @@
 #ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_WIN_H_
 #define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_WIN_H_
 
+#include "base/macros.h"
 #include "ipc/attachment_broker_unprivileged.h"
 #include "ipc/handle_attachment_win.h"
 #include "ipc/ipc_export.h"
diff --git a/ipc/brokerable_attachment.cc b/ipc/brokerable_attachment.cc
index 50bf333..96ce5bb6 100644
--- a/ipc/brokerable_attachment.cc
+++ b/ipc/brokerable_attachment.cc
@@ -4,6 +4,9 @@
 
 #include "ipc/brokerable_attachment.h"
 
+#include <stddef.h>
+
+#include "build/build_config.h"
 #include "ipc/attachment_broker.h"
 
 namespace IPC {
diff --git a/ipc/brokerable_attachment.h b/ipc/brokerable_attachment.h
index 6761f22..50e7fd2 100644
--- a/ipc/brokerable_attachment.h
+++ b/ipc/brokerable_attachment.h
@@ -5,11 +5,13 @@
 #ifndef IPC_BROKERABLE_ATTACHMENT_H_
 #define IPC_BROKERABLE_ATTACHMENT_H_
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include <algorithm>
 
 #include "base/macros.h"
+#include "build/build_config.h"
 #include "ipc/ipc_export.h"
 #include "ipc/ipc_message_attachment.h"
 
diff --git a/ipc/ipc_channel.cc b/ipc/ipc_channel.cc
index 6772e1c..2d51047 100644
--- a/ipc/ipc_channel.cc
+++ b/ipc/ipc_channel.cc
@@ -4,6 +4,7 @@
 
 #include "ipc/ipc_channel.h"
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include <limits>
@@ -11,6 +12,7 @@
 #include "base/atomic_sequence_num.h"
 #include "base/rand_util.h"
 #include "base/strings/stringprintf.h"
+#include "build/build_config.h"
 
 namespace {
 
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index 58fc069..20c61f1 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -5,21 +5,23 @@
 #ifndef IPC_IPC_CHANNEL_H_
 #define IPC_IPC_CHANNEL_H_
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include <string>
 
-#if defined(OS_POSIX)
-#include <sys/types.h>
-#endif
-
 #include "base/compiler_specific.h"
 #include "base/files/scoped_file.h"
 #include "base/process/process.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel_handle.h"
 #include "ipc/ipc_endpoint.h"
 #include "ipc/ipc_message.h"
 
+#if defined(OS_POSIX)
+#include <sys/types.h>
+#endif
+
 namespace IPC {
 
 class Listener;
@@ -73,7 +75,7 @@
   };
 
   // Messages internal to the IPC implementation are defined here.
-  // Uses Maximum value of message type (uint16), to avoid conflicting
+  // Uses Maximum value of message type (uint16_t), to avoid conflicting
   // with normal message types, which are enumeration constants starting from 0.
   enum {
     // The Hello message is sent by the peer when the channel is connected.
diff --git a/ipc/ipc_channel_common.cc b/ipc/ipc_channel_common.cc
index 3fddf9a5..8832ff2 100644
--- a/ipc/ipc_channel_common.cc
+++ b/ipc/ipc_channel_common.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "build/build_config.h"
 #include "ipc/ipc_channel.h"
 
 namespace IPC {
diff --git a/ipc/ipc_channel_factory.cc b/ipc/ipc_channel_factory.cc
index 78cd363..6dda14d273 100644
--- a/ipc/ipc_channel_factory.cc
+++ b/ipc/ipc_channel_factory.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "base/macros.h"
 #include "ipc/ipc_channel_factory.h"
 
 namespace IPC {
diff --git a/ipc/ipc_channel_nacl.cc b/ipc/ipc_channel_nacl.cc
index 1fe75b69..84d77f6 100644
--- a/ipc/ipc_channel_nacl.cc
+++ b/ipc/ipc_channel_nacl.cc
@@ -13,6 +13,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/lock.h"
 #include "base/task_runner_util.h"
diff --git a/ipc/ipc_channel_nacl.h b/ipc/ipc_channel_nacl.h
index b7e97cc..0fcf85a 100644
--- a/ipc/ipc_channel_nacl.h
+++ b/ipc/ipc_channel_nacl.h
@@ -8,6 +8,7 @@
 #include <deque>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 3023c05..f53a8fe3 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -40,6 +40,7 @@
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
 #include "base/synchronization/lock.h"
+#include "build/build_config.h"
 #include "ipc/attachment_broker.h"
 #include "ipc/ipc_descriptors.h"
 #include "ipc/ipc_listener.h"
diff --git a/ipc/ipc_channel_posix.h b/ipc/ipc_channel_posix.h
index d5d3494..ddeb60e 100644
--- a/ipc/ipc_channel_posix.h
+++ b/ipc/ipc_channel_posix.h
@@ -7,6 +7,7 @@
 
 #include "ipc/ipc_channel.h"
 
+#include <stddef.h>
 #include <sys/socket.h>  // for CMSG macros
 
 #include <queue>
@@ -15,8 +16,10 @@
 #include <vector>
 
 #include "base/files/scoped_file.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/process/process.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel_reader.h"
 #include "ipc/ipc_message_attachment_set.h"
 
diff --git a/ipc/ipc_channel_posix_unittest.cc b/ipc/ipc_channel_posix_unittest.cc
index 44c7b37..c122b71 100644
--- a/ipc/ipc_channel_posix_unittest.cc
+++ b/ipc/ipc_channel_posix_unittest.cc
@@ -8,6 +8,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <stddef.h>
 #include <stdint.h>
 #include <string.h>
 #include <sys/socket.h>
@@ -24,6 +25,7 @@
 #include "base/single_thread_task_runner.h"
 #include "base/test/multiprocess_test.h"
 #include "base/test/test_timeouts.h"
+#include "build/build_config.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/unix_domain_socket_util.h"
 #include "testing/multiprocess_func_list.h"
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index 7c4eb7d..303f55342e 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -4,6 +4,9 @@
 
 #include "ipc/ipc_channel_proxy.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/compiler_specific.h"
 #include "base/location.h"
@@ -12,6 +15,7 @@
 #include "base/profiler/scoped_tracker.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel_factory.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_logging.h"
diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h
index 7de65bd..9fdffb1c 100644
--- a/ipc/ipc_channel_proxy.h
+++ b/ipc/ipc_channel_proxy.h
@@ -5,12 +5,15 @@
 #ifndef IPC_IPC_CHANNEL_PROXY_H_
 #define IPC_IPC_CHANNEL_PROXY_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/non_thread_safe.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel.h"
 #include "ipc/ipc_channel_handle.h"
 #include "ipc/ipc_endpoint.h"
diff --git a/ipc/ipc_channel_proxy_unittest.cc b/ipc/ipc_channel_proxy_unittest.cc
index 7c5c8a7..f7f832b 100644
--- a/ipc/ipc_channel_proxy_unittest.cc
+++ b/ipc/ipc_channel_proxy_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "build/build_config.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/pickle.h"
 #include "base/threading/thread.h"
 #include "ipc/ipc_message.h"
diff --git a/ipc/ipc_channel_reader.cc b/ipc/ipc_channel_reader.cc
index 0783df7..8f0c6f8 100644
--- a/ipc/ipc_channel_reader.cc
+++ b/ipc/ipc_channel_reader.cc
@@ -4,6 +4,8 @@
 
 #include "ipc/ipc_channel_reader.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/message_loop/message_loop.h"
diff --git a/ipc/ipc_channel_reader.h b/ipc/ipc_channel_reader.h
index 352bfa5..ca2bd94 100644
--- a/ipc/ipc_channel_reader.h
+++ b/ipc/ipc_channel_reader.h
@@ -5,6 +5,8 @@
 #ifndef IPC_IPC_CHANNEL_READER_H_
 #define IPC_IPC_CHANNEL_READER_H_
 
+#include <stddef.h>
+
 #include <set>
 
 #include "base/gtest_prod_util.h"
diff --git a/ipc/ipc_channel_reader_unittest.cc b/ipc/ipc_channel_reader_unittest.cc
index b83f08cd..4ec71b53 100644
--- a/ipc/ipc_channel_reader_unittest.cc
+++ b/ipc/ipc_channel_reader_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "build/build_config.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <limits>
 #include <set>
 
@@ -216,7 +219,7 @@
       reinterpret_cast<const char*>(&header), sizeof(header)));
   EXPECT_LE(reader.input_overflow_buf_.capacity(), capacity_before);
 
-  // Payload size is maximum int32 value
+  // Payload size is maximum int32_t value
   header.payload_size = std::numeric_limits<int32_t>::max();
   EXPECT_FALSE(reader.TranslateInputData(
       reinterpret_cast<const char*>(&header), sizeof(header)));
diff --git a/ipc/ipc_channel_unittest.cc b/ipc/ipc_channel_unittest.cc
index 0c444ff..0a49ca9 100644
--- a/ipc/ipc_channel_unittest.cc
+++ b/ipc/ipc_channel_unittest.cc
@@ -8,6 +8,8 @@
 #include <windows.h>
 #endif
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/pickle.h"
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc
index a9079ef1..912d2cd 100644
--- a/ipc/ipc_channel_win.cc
+++ b/ipc/ipc_channel_win.cc
@@ -4,8 +4,9 @@
 
 #include "ipc/ipc_channel_win.h"
 
-#include <stdint.h>
 #include <windows.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/auto_reset.h"
 #include "base/bind.h"
diff --git a/ipc/ipc_channel_win.h b/ipc/ipc_channel_win.h
index 35a158e3..fd186fc 100644
--- a/ipc/ipc_channel_win.h
+++ b/ipc/ipc_channel_win.h
@@ -12,6 +12,7 @@
 #include <queue>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
diff --git a/ipc/ipc_fuzzing_tests.cc b/ipc/ipc_fuzzing_tests.cc
index 7f89308..6eb93054 100644
--- a/ipc/ipc_fuzzing_tests.cc
+++ b/ipc/ipc_fuzzing_tests.cc
@@ -13,6 +13,7 @@
 #include "base/strings/string16.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/platform_thread.h"
+#include "build/build_config.h"
 #include "ipc/ipc_test_base.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/ipc/ipc_logging.cc b/ipc/ipc_logging.cc
index a9aa006..abe26cb8 100644
--- a/ipc/ipc_logging.cc
+++ b/ipc/ipc_logging.cc
@@ -8,6 +8,9 @@
 #define IPC_MESSAGE_MACROS_LOG_ENABLED
 #endif
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/command_line.h"
@@ -19,6 +22,7 @@
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/thread.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "ipc/ipc_message_utils.h"
 #include "ipc/ipc_sender.h"
 #include "ipc/ipc_switches.h"
diff --git a/ipc/ipc_message.cc b/ipc/ipc_message.cc
index d51cb65..71f7299 100644
--- a/ipc/ipc_message.cc
+++ b/ipc/ipc_message.cc
@@ -5,6 +5,8 @@
 #include "ipc/ipc_message.h"
 
 #include <limits.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/atomic_sequence_num.h"
 #include "base/logging.h"
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h
index cace8d37..a6c641d7 100644
--- a/ipc/ipc_message.h
+++ b/ipc/ipc_message.h
@@ -5,6 +5,7 @@
 #ifndef IPC_IPC_MESSAGE_H_
 #define IPC_IPC_MESSAGE_H_
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include <string>
@@ -13,6 +14,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/pickle.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "ipc/attachment_broker.h"
 #include "ipc/brokerable_attachment.h"
 #include "ipc/ipc_export.h"
diff --git a/ipc/ipc_message_attachment.h b/ipc/ipc_message_attachment.h
index 5ed27ca..dda0630 100644
--- a/ipc/ipc_message_attachment.h
+++ b/ipc/ipc_message_attachment.h
@@ -8,6 +8,7 @@
 #include "base/files/file.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "build/build_config.h"
 #include "ipc/ipc_export.h"
 
 namespace IPC {
diff --git a/ipc/ipc_message_attachment_set.cc b/ipc/ipc_message_attachment_set.cc
index 16446c5..3b7eefb9 100644
--- a/ipc/ipc_message_attachment_set.cc
+++ b/ipc/ipc_message_attachment_set.cc
@@ -4,15 +4,19 @@
 
 #include "ipc/ipc_message_attachment_set.h"
 
+#include <stddef.h>
+
 #include <algorithm>
+
 #include "base/logging.h"
 #include "base/posix/eintr_wrapper.h"
+#include "build/build_config.h"
 #include "ipc/brokerable_attachment.h"
 #include "ipc/ipc_message_attachment.h"
 
 #if defined(OS_POSIX)
-#include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 #include "ipc/ipc_platform_file_attachment_posix.h"
 #endif // OS_POSIX
diff --git a/ipc/ipc_message_attachment_set.h b/ipc/ipc_message_attachment_set.h
index 6a94b19..764c818 100644
--- a/ipc/ipc_message_attachment_set.h
+++ b/ipc/ipc_message_attachment_set.h
@@ -5,10 +5,13 @@
 #ifndef IPC_IPC_MESSAGE_ATTACHMENT_SET_H_
 #define IPC_IPC_MESSAGE_ATTACHMENT_SET_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "build/build_config.h"
 #include "ipc/ipc_export.h"
 
 #if defined(OS_POSIX)
diff --git a/ipc/ipc_message_attachment_set_posix_unittest.cc b/ipc/ipc_message_attachment_set_posix_unittest.cc
index c7caea6c..e43e431 100644
--- a/ipc/ipc_message_attachment_set_posix_unittest.cc
+++ b/ipc/ipc_message_attachment_set_posix_unittest.cc
@@ -7,9 +7,11 @@
 #include "ipc/ipc_message_attachment_set.h"
 
 #include <fcntl.h>
+#include <stddef.h>
 #include <unistd.h>
 
 #include "base/posix/eintr_wrapper.h"
+#include "build/build_config.h"
 #include "ipc/ipc_platform_file_attachment_posix.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/ipc/ipc_message_unittest.cc b/ipc/ipc_message_unittest.cc
index 1bd4df3..c022f97 100644
--- a/ipc/ipc_message_unittest.cc
+++ b/ipc/ipc_message_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "ipc/ipc_message.h"
 
+#include <stddef.h>
+#include <stdint.h>
 #include <string.h>
 
 #include <limits>
@@ -11,6 +13,7 @@
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "ipc/attachment_broker.h"
 #include "ipc/ipc_message_utils.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 8377712..60ae58f 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -4,6 +4,9 @@
 
 #include "ipc/ipc_message_utils.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/files/file_path.h"
 #include "base/json/json_writer.h"
 #include "base/memory/scoped_ptr.h"
@@ -12,6 +15,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel_handle.h"
 #include "ipc/ipc_message_attachment.h"
 #include "ipc/ipc_message_attachment_set.h"
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 97b95e9..3d68879 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -5,6 +5,7 @@
 #ifndef IPC_IPC_MESSAGE_UTILS_H_
 #define IPC_IPC_MESSAGE_UTILS_H_
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include <algorithm>
@@ -23,6 +24,7 @@
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/tuple.h"
+#include "build/build_config.h"
 #include "ipc/brokerable_attachment.h"
 #include "ipc/ipc_message_start.h"
 #include "ipc/ipc_param_traits.h"
diff --git a/ipc/ipc_message_utils_unittest.cc b/ipc/ipc_message_utils_unittest.cc
index 35a3e66..f3aa31a 100644
--- a/ipc/ipc_message_utils_unittest.cc
+++ b/ipc/ipc_message_utils_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "ipc/ipc_message_utils.h"
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include "base/files/file_path.h"
diff --git a/ipc/ipc_perftest_support.cc b/ipc/ipc_perftest_support.cc
index 2ece5e1..1ecc7c74 100644
--- a/ipc/ipc_perftest_support.cc
+++ b/ipc/ipc_perftest_support.cc
@@ -4,6 +4,9 @@
 
 #include "ipc/ipc_perftest_support.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <string>
 
diff --git a/ipc/ipc_perftest_support.h b/ipc/ipc_perftest_support.h
index 578256f..80c58d1 100644
--- a/ipc/ipc_perftest_support.h
+++ b/ipc/ipc_perftest_support.h
@@ -5,8 +5,12 @@
 #ifndef IPC_IPC_PERFTEST_SUPPORT_H_
 #define IPC_IPC_PERFTEST_SUPPORT_H_
 
+#include <stddef.h>
+
 #include <vector>
 
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "ipc/ipc_test_base.h"
 
 namespace IPC {
diff --git a/ipc/ipc_platform_file.cc b/ipc/ipc_platform_file.cc
index 826d030..97c176f 100644
--- a/ipc/ipc_platform_file.cc
+++ b/ipc/ipc_platform_file.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "build/build_config.h"
 #include "ipc/ipc_platform_file.h"
 
 #if defined(OS_POSIX)
diff --git a/ipc/ipc_platform_file.h b/ipc/ipc_platform_file.h
index df6e8e3..fb4d0e4 100644
--- a/ipc/ipc_platform_file.h
+++ b/ipc/ipc_platform_file.h
@@ -7,6 +7,7 @@
 
 #include "base/files/file.h"
 #include "base/process/process.h"
+#include "build/build_config.h"
 #include "ipc/ipc_export.h"
 
 #if defined(OS_POSIX)
diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc
index a3b4d4e8..81f5894 100644
--- a/ipc/ipc_send_fds_test.cc
+++ b/ipc/ipc_send_fds_test.cc
@@ -11,6 +11,7 @@
 }
 #endif
 #include <fcntl.h>
+#include <stddef.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <unistd.h>
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index caf504da6..8e559146 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -4,6 +4,9 @@
 
 #include "ipc/ipc_sync_channel.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/lazy_instance.h"
 #include "base/location.h"
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index a0968c7..21ebafb6 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "ipc/ipc_sync_channel.h"
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
@@ -20,6 +22,7 @@
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/platform_thread.h"
 #include "base/threading/thread.h"
+#include "build/build_config.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_message.h"
 #include "ipc/ipc_sender.h"
diff --git a/ipc/ipc_sync_message.cc b/ipc/ipc_sync_message.cc
index 8a770b1..884dd802 100644
--- a/ipc/ipc_sync_message.cc
+++ b/ipc/ipc_sync_message.cc
@@ -4,6 +4,8 @@
 
 #include "ipc/ipc_sync_message.h"
 
+#include <stdint.h>
+
 #include <stack>
 
 #include "base/atomic_sequence_num.h"
diff --git a/ipc/ipc_sync_message.h b/ipc/ipc_sync_message.h
index 904a9c8..6dd3b63 100644
--- a/ipc/ipc_sync_message.h
+++ b/ipc/ipc_sync_message.h
@@ -13,6 +13,7 @@
 #include <string>
 
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "ipc/ipc_message.h"
 
 namespace base {
diff --git a/ipc/ipc_test_base.h b/ipc/ipc_test_base.h
index 372d12a..360188f6 100644
--- a/ipc/ipc_test_base.h
+++ b/ipc/ipc_test_base.h
@@ -11,6 +11,7 @@
 #include "base/memory/scoped_ptr.h"
 #include "base/process/process.h"
 #include "base/test/multiprocess_test.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel.h"
 #include "ipc/ipc_channel_factory.h"
 #include "ipc/ipc_channel_proxy.h"
diff --git a/ipc/ipc_test_sink.cc b/ipc/ipc_test_sink.cc
index ab95a19..316609c 100644
--- a/ipc/ipc_test_sink.cc
+++ b/ipc/ipc_test_sink.cc
@@ -4,6 +4,10 @@
 
 #include "ipc/ipc_test_sink.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "build/build_config.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_message.h"
 
diff --git a/ipc/ipc_test_sink.h b/ipc/ipc_test_sink.h
index d964498..ab8531d 100644
--- a/ipc/ipc_test_sink.h
+++ b/ipc/ipc_test_sink.h
@@ -5,6 +5,7 @@
 #ifndef IPC_IPC_TEST_SINK_H_
 #define IPC_IPC_TEST_SINK_H_
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include <utility>
@@ -13,6 +14,7 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/observer_list.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel.h"
 
 namespace IPC {
diff --git a/ipc/mach_port_attachment_mac.cc b/ipc/mach_port_attachment_mac.cc
index 5aec8fcd..7a1d40b 100644
--- a/ipc/mach_port_attachment_mac.cc
+++ b/ipc/mach_port_attachment_mac.cc
@@ -4,6 +4,8 @@
 
 #include "ipc/mach_port_attachment_mac.h"
 
+#include <stdint.h>
+
 #include "base/mac/mach_logging.h"
 
 namespace IPC {
diff --git a/ipc/mach_port_attachment_mac.h b/ipc/mach_port_attachment_mac.h
index 7d8c4d5..7b2465c9 100644
--- a/ipc/mach_port_attachment_mac.h
+++ b/ipc/mach_port_attachment_mac.h
@@ -8,6 +8,7 @@
 #include <mach/mach.h>
 #include <stdint.h>
 
+#include "base/macros.h"
 #include "base/process/process_handle.h"
 #include "ipc/brokerable_attachment.h"
 #include "ipc/ipc_export.h"
diff --git a/ipc/message_filter.cc b/ipc/message_filter.cc
index b9436e2..dd5ec30f 100644
--- a/ipc/message_filter.cc
+++ b/ipc/message_filter.cc
@@ -4,6 +4,8 @@
 
 #include "ipc/message_filter.h"
 
+#include <stdint.h>
+
 #include "base/memory/ref_counted.h"
 #include "ipc/ipc_channel.h"
 
diff --git a/ipc/message_filter_router.cc b/ipc/message_filter_router.cc
index 35209b09..56075d6 100644
--- a/ipc/message_filter_router.cc
+++ b/ipc/message_filter_router.cc
@@ -4,8 +4,10 @@
 
 #include "ipc/message_filter_router.h"
 
+#include <stddef.h>
 #include <stdint.h>
 
+#include "base/macros.h"
 #include "ipc/ipc_message_macros.h"
 #include "ipc/ipc_message_utils.h"
 #include "ipc/message_filter.h"
diff --git a/ipc/mojo/async_handle_waiter.cc b/ipc/mojo/async_handle_waiter.cc
index 652764e..4e07480 100644
--- a/ipc/mojo/async_handle_waiter.cc
+++ b/ipc/mojo/async_handle_waiter.cc
@@ -9,6 +9,7 @@
 #include "base/bind_helpers.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
 
 namespace IPC {
diff --git a/ipc/mojo/async_handle_waiter.h b/ipc/mojo/async_handle_waiter.h
index 083060e..e82c27a 100644
--- a/ipc/mojo/async_handle_waiter.h
+++ b/ipc/mojo/async_handle_waiter.h
@@ -6,6 +6,7 @@
 #define IPC_MOJO_ASYNC_HANDLE_WAITER_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
diff --git a/ipc/mojo/async_handle_waiter_unittest.cc b/ipc/mojo/async_handle_waiter_unittest.cc
index 494b01b..e17b4fd 100644
--- a/ipc/mojo/async_handle_waiter_unittest.cc
+++ b/ipc/mojo/async_handle_waiter_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "ipc/mojo/async_handle_waiter.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/run_loop.h"
diff --git a/ipc/mojo/ipc_channel_mojo.cc b/ipc/mojo/ipc_channel_mojo.cc
index 97330dc..d0356eb 100644
--- a/ipc/mojo/ipc_channel_mojo.cc
+++ b/ipc/mojo/ipc_channel_mojo.cc
@@ -4,13 +4,18 @@
 
 #include "ipc/mojo/ipc_channel_mojo.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <memory>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/command_line.h"
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_logging.h"
 #include "ipc/ipc_message_attachment_set.h"
@@ -69,7 +74,7 @@
 
   // MojoBootstrap::Delegate implementation
   void OnPipeAvailable(mojo::embedder::ScopedPlatformHandle handle,
-                       int32 peer_pid) override {
+                       int32_t peer_pid) override {
     if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk")) {
       InitMessageReader(mojo::embedder::CreateChannel(
           handle.Pass(), base::Callback<void(mojo::embedder::ChannelInfo*)>(),
@@ -119,7 +124,7 @@
 
   // MojoBootstrap::Delegate implementation
   void OnPipeAvailable(mojo::embedder::ScopedPlatformHandle handle,
-                       int32 peer_pid) override {
+                       int32_t peer_pid) override {
     if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk")) {
       message_pipe_ = mojo::embedder::CreateChannel(
           handle.Pass(), base::Callback<void(mojo::embedder::ChannelInfo*)>(),
diff --git a/ipc/mojo/ipc_channel_mojo.h b/ipc/mojo/ipc_channel_mojo.h
index ec583f2..a5ddf1e 100644
--- a/ipc/mojo/ipc_channel_mojo.h
+++ b/ipc/mojo/ipc_channel_mojo.h
@@ -5,12 +5,16 @@
 #ifndef IPC_IPC_CHANNEL_MOJO_H_
 #define IPC_IPC_CHANNEL_MOJO_H_
 
+#include <stdint.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/lock.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel.h"
 #include "ipc/ipc_channel_factory.h"
 #include "ipc/ipc_export.h"
diff --git a/ipc/mojo/ipc_channel_mojo_unittest.cc b/ipc/mojo/ipc_channel_mojo_unittest.cc
index f1982533b..37267eb6 100644
--- a/ipc/mojo/ipc_channel_mojo_unittest.cc
+++ b/ipc/mojo/ipc_channel_mojo_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "ipc/mojo/ipc_channel_mojo.h"
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include "base/base_paths.h"
@@ -16,6 +17,7 @@
 #include "base/test/test_timeouts.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/thread.h"
+#include "build/build_config.h"
 #include "ipc/ipc_message.h"
 #include "ipc/ipc_test_base.h"
 #include "ipc/ipc_test_channel_listener.h"
diff --git a/ipc/mojo/ipc_message_pipe_reader.h b/ipc/mojo/ipc_message_pipe_reader.h
index 01baa37f..37581230 100644
--- a/ipc/mojo/ipc_message_pipe_reader.h
+++ b/ipc/mojo/ipc_message_pipe_reader.h
@@ -5,11 +5,14 @@
 #ifndef IPC_IPC_MESSAGE_PIPE_READER_H_
 #define IPC_IPC_MESSAGE_PIPE_READER_H_
 
+#include <stdint.h>
+
 #include <memory>
 #include <vector>
 
 #include "base/atomicops.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "ipc/ipc_message.h"
diff --git a/ipc/mojo/ipc_mojo_bootstrap.cc b/ipc/mojo/ipc_mojo_bootstrap.cc
index b668a7bc..fe307d5 100644
--- a/ipc/mojo/ipc_mojo_bootstrap.cc
+++ b/ipc/mojo/ipc_mojo_bootstrap.cc
@@ -7,7 +7,9 @@
 #include <stdint.h>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/process/process_handle.h"
+#include "build/build_config.h"
 #include "ipc/ipc_message_utils.h"
 #include "ipc/ipc_platform_file.h"
 #include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h"
@@ -109,7 +111,7 @@
   bool OnMessageReceived(const Message& message) override;
   void OnChannelConnected(int32_t peer_pid) override;
 
-  int32 peer_pid_;
+  int32_t peer_pid_;
 
   DISALLOW_COPY_AND_ASSIGN(MojoClientBootstrap);
 };
diff --git a/ipc/mojo/ipc_mojo_bootstrap.h b/ipc/mojo/ipc_mojo_bootstrap.h
index 27a038ba..4b5ccfb7 100644
--- a/ipc/mojo/ipc_mojo_bootstrap.h
+++ b/ipc/mojo/ipc_mojo_bootstrap.h
@@ -5,8 +5,12 @@
 #ifndef IPC_MOJO_IPC_MOJO_BOOTSTRAP_H_
 #define IPC_MOJO_IPC_MOJO_BOOTSTRAP_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/process/process_handle.h"
+#include "build/build_config.h"
 #include "ipc/ipc_channel.h"
 #include "ipc/ipc_listener.h"
 #include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h"
@@ -27,9 +31,8 @@
  public:
   class Delegate {
    public:
-    virtual void OnPipeAvailable(
-        mojo::embedder::ScopedPlatformHandle handle,
-        int32 peer_pid) = 0;
+    virtual void OnPipeAvailable(mojo::embedder::ScopedPlatformHandle handle,
+                                 int32_t peer_pid) = 0;
     virtual void OnBootstrapError() = 0;
   };
 
diff --git a/ipc/mojo/ipc_mojo_bootstrap_unittest.cc b/ipc/mojo/ipc_mojo_bootstrap_unittest.cc
index 391e9530..60046d1 100644
--- a/ipc/mojo/ipc_mojo_bootstrap_unittest.cc
+++ b/ipc/mojo/ipc_mojo_bootstrap_unittest.cc
@@ -4,9 +4,12 @@
 
 #include "ipc/mojo/ipc_mojo_bootstrap.h"
 
+#include <stdint.h>
+
 #include "base/base_paths.h"
 #include "base/files/file.h"
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "ipc/ipc_test_base.h"
 
 #if defined(OS_POSIX)
@@ -24,7 +27,7 @@
   TestingDelegate() : passed_(false) {}
 
   void OnPipeAvailable(mojo::embedder::ScopedPlatformHandle handle,
-                       int32 peer_pid) override;
+                       int32_t peer_pid) override;
   void OnBootstrapError() override;
 
   bool passed() const { return passed_; }
@@ -35,7 +38,7 @@
 
 void TestingDelegate::OnPipeAvailable(
     mojo::embedder::ScopedPlatformHandle handle,
-    int32 peer_pid) {
+    int32_t peer_pid) {
   passed_ = true;
   base::MessageLoop::current()->QuitWhenIdle();
 }
diff --git a/ipc/mojo/ipc_mojo_handle_attachment.cc b/ipc/mojo/ipc_mojo_handle_attachment.cc
index 9aae281c..4bbcf82 100644
--- a/ipc/mojo/ipc_mojo_handle_attachment.cc
+++ b/ipc/mojo/ipc_mojo_handle_attachment.cc
@@ -4,6 +4,7 @@
 
 #include "ipc/mojo/ipc_mojo_handle_attachment.h"
 
+#include "build/build_config.h"
 #include "ipc/ipc_message_attachment_set.h"
 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
 
diff --git a/ipc/mojo/ipc_mojo_handle_attachment.h b/ipc/mojo/ipc_mojo_handle_attachment.h
index 2b31bf3..2d51879 100644
--- a/ipc/mojo/ipc_mojo_handle_attachment.h
+++ b/ipc/mojo/ipc_mojo_handle_attachment.h
@@ -6,6 +6,8 @@
 #define IPC_MOJO_IPC_MOJO_HANDLE_ATTACHMENT_H_
 
 #include "base/files/file.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "ipc/ipc_export.h"
 #include "ipc/ipc_message_attachment.h"
 #include "mojo/public/cpp/system/handle.h"
diff --git a/ipc/mojo/ipc_mojo_perftest.cc b/ipc/mojo/ipc_mojo_perftest.cc
index 6fdcbab..d782c77e 100644
--- a/ipc/mojo/ipc_mojo_perftest.cc
+++ b/ipc/mojo/ipc_mojo_perftest.cc
@@ -2,8 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include "base/lazy_instance.h"
 #include "base/run_loop.h"
+#include "build/build_config.h"
 #include "ipc/ipc_perftest_support.h"
 #include "ipc/mojo/ipc_channel_mojo.h"
 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
diff --git a/ipc/mojo/run_all_unittests.cc b/ipc/mojo/run_all_unittests.cc
index fd3c611..43a1e4e 100644
--- a/ipc/mojo/run_all_unittests.cc
+++ b/ipc/mojo/run_all_unittests.cc
@@ -6,6 +6,7 @@
 #include "base/bind.h"
 #include "base/test/launcher/unit_test_launcher.h"
 #include "base/test/test_suite.h"
+#include "build/build_config.h"
 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
 
 #if defined(OS_ANDROID)
diff --git a/ipc/mojo/scoped_ipc_support.cc b/ipc/mojo/scoped_ipc_support.cc
index 58ee518..1557544 100644
--- a/ipc/mojo/scoped_ipc_support.cc
+++ b/ipc/mojo/scoped_ipc_support.cc
@@ -4,9 +4,12 @@
 
 #include "ipc/mojo/scoped_ipc_support.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/synchronization/condition_variable.h"
 #include "base/synchronization/lock.h"
diff --git a/ipc/placeholder_brokerable_attachment.h b/ipc/placeholder_brokerable_attachment.h
index 7a63c72..a8b08ef 100644
--- a/ipc/placeholder_brokerable_attachment.h
+++ b/ipc/placeholder_brokerable_attachment.h
@@ -5,6 +5,7 @@
 #ifndef IPC_PLACEHOLDER_BROKERABLE_ATTACHMENT_H_
 #define IPC_PLACEHOLDER_BROKERABLE_ATTACHMENT_H_
 
+#include "base/macros.h"
 #include "ipc/brokerable_attachment.h"
 #include "ipc/ipc_export.h"
 
diff --git a/ipc/run_all_unittests.cc b/ipc/run_all_unittests.cc
index 047c614..26a7395 100644
--- a/ipc/run_all_unittests.cc
+++ b/ipc/run_all_unittests.cc
@@ -5,6 +5,7 @@
 #include "base/bind.h"
 #include "base/test/launcher/unit_test_launcher.h"
 #include "base/test/test_suite.h"
+#include "build/build_config.h"
 
 #if defined(OS_ANDROID)
 #include "base/android/jni_android.h"
diff --git a/ipc/sync_socket_unittest.cc b/ipc/sync_socket_unittest.cc
index 7184761..89c155b 100644
--- a/ipc/sync_socket_unittest.cc
+++ b/ipc/sync_socket_unittest.cc
@@ -4,14 +4,17 @@
 
 #include "base/sync_socket.h"
 
+#include <stddef.h>
 #include <stdio.h>
 #include <sstream>
 #include <string>
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread.h"
+#include "build/build_config.h"
 #include "ipc/ipc_test_base.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/ipc/test_util_mac.cc b/ipc/test_util_mac.cc
index 8727077..6b6e64b 100644
--- a/ipc/test_util_mac.cc
+++ b/ipc/test_util_mac.cc
@@ -6,6 +6,7 @@
 
 #include <mach/mach_vm.h>
 #include <servers/bootstrap.h>
+#include <stddef.h>
 
 #include "base/mac/mach_logging.h"
 #include "base/mac/scoped_mach_port.h"
diff --git a/ipc/test_util_mac.h b/ipc/test_util_mac.h
index 6ed4d19..2f5e819 100644
--- a/ipc/test_util_mac.h
+++ b/ipc/test_util_mac.h
@@ -9,6 +9,7 @@
 #define IPC_TEST_UTIL_MAC_H_
 
 #include <mach/mach.h>
+#include <stddef.h>
 
 #include <string>
 
diff --git a/ipc/unix_domain_socket_util.cc b/ipc/unix_domain_socket_util.cc
index 74053445..fb64cb2 100644
--- a/ipc/unix_domain_socket_util.cc
+++ b/ipc/unix_domain_socket_util.cc
@@ -6,6 +6,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <stddef.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/un.h>
@@ -16,6 +17,7 @@
 #include "base/files/scoped_file.h"
 #include "base/logging.h"
 #include "base/posix/eintr_wrapper.h"
+#include "build/build_config.h"
 
 namespace IPC {
 
diff --git a/ipc/unix_domain_socket_util.h b/ipc/unix_domain_socket_util.h
index 5752364..1359072 100644
--- a/ipc/unix_domain_socket_util.h
+++ b/ipc/unix_domain_socket_util.h
@@ -5,6 +5,7 @@
 #ifndef IPC_UNIX_DOMAIN_SOCKET_UTIL_H_
 #define IPC_UNIX_DOMAIN_SOCKET_UTIL_H_
 
+#include <stddef.h>
 #include <sys/types.h>
 
 #include <string>
diff --git a/ipc/unix_domain_socket_util_unittest.cc b/ipc/unix_domain_socket_util_unittest.cc
index 57365a5..49c1c02 100644
--- a/ipc/unix_domain_socket_util_unittest.cc
+++ b/ipc/unix_domain_socket_util_unittest.cc
@@ -2,11 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
 #include <sys/socket.h>
 
 #include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/path_service.h"
 #include "base/posix/eintr_wrapper.h"
 #include "base/single_thread_task_runner.h"