Rename _windows.h -> _win.h in system_wrappers.
- Also rename _dummy -> no_op which states its purpose more clearly. - Always use exclusion lists (i.e. sources! instead of sources) TEST=builds and passes system_wrapper_unittest on Linux, Mac, Win Review URL: http://webrtc-codereview.appspot.com/317007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1199 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
69eccc024a
commit
59ccd5c71f
@ -13,7 +13,7 @@
|
||||
#include <cassert>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "fix_interlocked_exchange_pointer_windows.h"
|
||||
#include "fix_interlocked_exchange_pointer_win.h"
|
||||
#include "udp_socket_manager_windows.h"
|
||||
#include "udp_socket2_manager_windows.h"
|
||||
#else
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "critical_section_wrapper.h"
|
||||
#ifdef _WIN32
|
||||
#include "fix_interlocked_exchange_pointer_windows.h"
|
||||
#include "fix_interlocked_exchange_pointer_win.h"
|
||||
#endif
|
||||
|
||||
namespace webrtc {
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "atomic32_wrapper.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "atomic32_windows.h"
|
||||
#include "atomic32_win.h"
|
||||
#elif defined(WEBRTC_LINUX)
|
||||
#include "atomic32_linux.h"
|
||||
#elif defined(WEBRTC_MAC)
|
||||
|
@ -11,7 +11,7 @@
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include "condition_variable_wrapper.h"
|
||||
#include "condition_variable_windows.h"
|
||||
#include "condition_variable_win.h"
|
||||
#elif defined(WEBRTC_LINUX)
|
||||
#include <pthread.h>
|
||||
#include "condition_variable_wrapper.h"
|
||||
|
@ -18,9 +18,9 @@
|
||||
// TODO (hellner): probably nicer to split up native and generic
|
||||
// implementation into two different files
|
||||
|
||||
#include "condition_variable_windows.h"
|
||||
#include "condition_variable_win.h"
|
||||
|
||||
#include "critical_section_windows.h"
|
||||
#include "critical_section_win.h"
|
||||
#include "trace.h"
|
||||
|
||||
namespace webrtc {
|
@ -11,7 +11,7 @@
|
||||
#include "cpu_wrapper.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "cpu_windows.h"
|
||||
#include "cpu_win.h"
|
||||
#elif defined(WEBRTC_MAC)
|
||||
#include "cpu_mac.h"
|
||||
#elif defined(WEBRTC_MAC_INTEL)
|
||||
|
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "cpu_windows.h"
|
||||
#include "cpu_win.h"
|
||||
|
||||
#define _WIN32_DCOM
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include "critical_section_windows.h"
|
||||
#include "critical_section_win.h"
|
||||
#else
|
||||
#include "critical_section_posix.h"
|
||||
#endif
|
||||
|
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "critical_section_windows.h"
|
||||
#include "critical_section_win.h"
|
||||
|
||||
namespace webrtc {
|
||||
CriticalSectionWindows::CriticalSectionWindows()
|
@ -12,7 +12,7 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include "event_windows.h"
|
||||
#include "event_win.h"
|
||||
#elif defined(WEBRTC_MAC_INTEL)
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#include <pthread.h>
|
||||
|
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "event_windows.h"
|
||||
#include "event_win.h"
|
||||
|
||||
#include "Mmsystem.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "rw_lock_windows.h"
|
||||
#include "rw_lock_win.h"
|
||||
#elif defined(WEBRTC_ANDROID)
|
||||
#include <stdlib.h>
|
||||
#include "rw_lock_generic.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "rw_lock_windows.h"
|
||||
#include "rw_lock_win.h"
|
||||
|
||||
#include "critical_section_wrapper.h"
|
||||
#include "condition_variable_wrapper.h"
|
@ -6,12 +6,8 @@
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
# TODO: Rename files to use *_linux.cpp etc. names, to automatically include relevant files. Remove conditions section.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../../common_settings.gypi', # Common settings
|
||||
],
|
||||
'includes': [ '../../build/common.gypi', ],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'system_wrappers',
|
||||
@ -38,7 +34,7 @@
|
||||
'../interface/data_log_impl.h',
|
||||
'../interface/event_wrapper.h',
|
||||
'../interface/file_wrapper.h',
|
||||
'../interface/fix_interlocked_exchange_pointer_windows.h',
|
||||
'../interface/fix_interlocked_exchange_pointer_win.h',
|
||||
'../interface/list_wrapper.h',
|
||||
'../interface/map_wrapper.h',
|
||||
'../interface/ref_count.h',
|
||||
@ -54,108 +50,96 @@
|
||||
'atomic32.cc',
|
||||
'atomic32_linux.h',
|
||||
'atomic32_mac.h',
|
||||
'atomic32_windows.h',
|
||||
'atomic32_win.h',
|
||||
'condition_variable.cc',
|
||||
'condition_variable_posix.cc',
|
||||
'condition_variable_posix.h',
|
||||
'condition_variable_windows.h',
|
||||
'condition_variable_win.cc',
|
||||
'condition_variable_win.h',
|
||||
'cpu.cc',
|
||||
'cpu_dummy.cc',
|
||||
'cpu_no_op.cc',
|
||||
'cpu_info.cc',
|
||||
'cpu_linux.cc',
|
||||
'cpu_linux.h',
|
||||
'cpu_mac.cc',
|
||||
'cpu_mac.h',
|
||||
'cpu_windows.h',
|
||||
'cpu_win.cc',
|
||||
'cpu_win.h',
|
||||
'cpu_features.cc',
|
||||
'critical_section.cc',
|
||||
'critical_section_posix.cc',
|
||||
'critical_section_posix.h',
|
||||
'critical_section_windows.h',
|
||||
'critical_section_win.cc',
|
||||
'critical_section_win.h',
|
||||
'data_log.cc',
|
||||
'data_log_c.cc',
|
||||
'data_log_no_op.cc',
|
||||
'event.cc',
|
||||
'event_posix.cc',
|
||||
'event_posix.h',
|
||||
'event_windows.h',
|
||||
'event_win.cc',
|
||||
'event_win.h',
|
||||
'file_impl.cc',
|
||||
'file_impl.h',
|
||||
'list_no_stl.cc',
|
||||
'map.cc',
|
||||
'rw_lock.cc',
|
||||
'rw_lock_posix.cc',
|
||||
'rw_lock_posix.h',
|
||||
'rw_lock_windows.h',
|
||||
'rw_lock_win.cc',
|
||||
'rw_lock_win.h',
|
||||
'sort.cc',
|
||||
'thread.cc',
|
||||
'thread_posix.cc',
|
||||
'thread_posix.h',
|
||||
'thread_windows.h',
|
||||
'thread_windows_set_name.h',
|
||||
'thread_win.cc',
|
||||
'thread_win.h',
|
||||
'set_thread_name_win.h',
|
||||
'trace_impl.cc',
|
||||
'trace_impl_no_op.cc',
|
||||
'trace_impl.h',
|
||||
'trace_impl_no_op.cc',
|
||||
'trace_posix.cc',
|
||||
'trace_posix.h',
|
||||
'trace_windows.h',
|
||||
'trace_win.cc',
|
||||
'trace_win.h',
|
||||
],
|
||||
'conditions': [
|
||||
['os_posix==1', {
|
||||
'sources': [
|
||||
'condition_variable_posix.cc',
|
||||
'critical_section_posix.cc',
|
||||
'event_posix.cc',
|
||||
'rw_lock_posix.cc',
|
||||
'thread_posix.cc',
|
||||
'trace_posix.cc',
|
||||
],
|
||||
}],
|
||||
['enable_data_logging==1', {
|
||||
'sources': [
|
||||
'data_log.cc',
|
||||
],
|
||||
'sources!': [ 'data_log_no_op.cc', ],
|
||||
},{
|
||||
'sources': [
|
||||
'data_log_dummy.cc',
|
||||
],
|
||||
'sources!': [ 'data_log.cc', ],
|
||||
},],
|
||||
['OS=="linux"', {
|
||||
'sources': [
|
||||
'cpu_linux.cc',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lrt',
|
||||
],
|
||||
'libraries': [ '-lrt', ],
|
||||
},
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
'sources': [
|
||||
'cpu_mac.cc',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
|
||||
],
|
||||
'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ],
|
||||
},
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'sources': [
|
||||
'condition_variable_windows.cc',
|
||||
'cpu_windows.cc',
|
||||
'critical_section_windows.cc',
|
||||
'event_windows.cc',
|
||||
'rw_lock_windows.cc',
|
||||
'thread_windows.cc',
|
||||
'trace_windows.cc',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lwinmm.lib',
|
||||
],
|
||||
'libraries': [ '-lwinmm.lib', ],
|
||||
},
|
||||
}],
|
||||
['build_with_chromium==1', {
|
||||
'sources!': [
|
||||
'cpu.cc',
|
||||
'cpu_linux.h',
|
||||
'cpu_mac.h',
|
||||
'cpu_win.h',
|
||||
'trace_impl.cc',
|
||||
'trace_impl.h',
|
||||
'trace_posix.cc',
|
||||
'trace_windows.cc',
|
||||
'trace_posix.h',
|
||||
'trace_win.cc',
|
||||
'trace_win.h',
|
||||
],
|
||||
}, {
|
||||
'sources!': [
|
||||
'cpu_dummy.cc',
|
||||
'cpu_no_op.cc',
|
||||
'trace_impl_no_op.cc',
|
||||
],
|
||||
}]
|
||||
@ -177,15 +161,17 @@
|
||||
'cpu_wrapper_unittest.cc',
|
||||
'list_unittest.cc',
|
||||
'map_unittest.cc',
|
||||
'data_log_unittest.cc',
|
||||
'data_log_unittest_disabled.cc',
|
||||
'data_log_helpers_unittest.cc',
|
||||
'data_log_c_helpers_unittest.c',
|
||||
'data_log_c_helpers_unittest.h',
|
||||
],
|
||||
'conditions': [
|
||||
['enable_data_logging==1', {
|
||||
'sources': [ 'data_log_unittest.cc', ],
|
||||
'sources!': [ 'data_log_unittest_disabled.cc', ],
|
||||
}, {
|
||||
'sources': [ 'data_log_unittest_disabled.cc', ],
|
||||
'sources!': [ 'data_log_unittest.cc', ],
|
||||
}],
|
||||
],
|
||||
},
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "thread_wrapper.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "thread_windows.h"
|
||||
#include "thread_win.h"
|
||||
#else
|
||||
#include "thread_posix.h"
|
||||
#endif
|
||||
|
@ -8,14 +8,14 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "thread_windows.h"
|
||||
#include "thread_win.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <process.h>
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "thread_windows_set_name.h"
|
||||
#include "set_thread_name_win.h"
|
||||
#include "trace.h"
|
||||
|
||||
#if defined(_WIN32)
|
@ -14,7 +14,7 @@
|
||||
#include <string.h> // memset
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "trace_windows.h"
|
||||
#include "trace_win.h"
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "trace_windows.h"
|
||||
#include "trace_win.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <stdarg.h>
|
Loading…
Reference in New Issue
Block a user