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>
|
#include <cassert>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "fix_interlocked_exchange_pointer_windows.h"
|
#include "fix_interlocked_exchange_pointer_win.h"
|
||||||
#include "udp_socket_manager_windows.h"
|
#include "udp_socket_manager_windows.h"
|
||||||
#include "udp_socket2_manager_windows.h"
|
#include "udp_socket2_manager_windows.h"
|
||||||
#else
|
#else
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "critical_section_wrapper.h"
|
#include "critical_section_wrapper.h"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "fix_interlocked_exchange_pointer_windows.h"
|
#include "fix_interlocked_exchange_pointer_win.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "atomic32_wrapper.h"
|
#include "atomic32_wrapper.h"
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include "atomic32_windows.h"
|
#include "atomic32_win.h"
|
||||||
#elif defined(WEBRTC_LINUX)
|
#elif defined(WEBRTC_LINUX)
|
||||||
#include "atomic32_linux.h"
|
#include "atomic32_linux.h"
|
||||||
#elif defined(WEBRTC_MAC)
|
#elif defined(WEBRTC_MAC)
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "condition_variable_wrapper.h"
|
#include "condition_variable_wrapper.h"
|
||||||
#include "condition_variable_windows.h"
|
#include "condition_variable_win.h"
|
||||||
#elif defined(WEBRTC_LINUX)
|
#elif defined(WEBRTC_LINUX)
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include "condition_variable_wrapper.h"
|
#include "condition_variable_wrapper.h"
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
// TODO (hellner): probably nicer to split up native and generic
|
// TODO (hellner): probably nicer to split up native and generic
|
||||||
// implementation into two different files
|
// 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"
|
#include "trace.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
@ -11,7 +11,7 @@
|
|||||||
#include "cpu_wrapper.h"
|
#include "cpu_wrapper.h"
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include "cpu_windows.h"
|
#include "cpu_win.h"
|
||||||
#elif defined(WEBRTC_MAC)
|
#elif defined(WEBRTC_MAC)
|
||||||
#include "cpu_mac.h"
|
#include "cpu_mac.h"
|
||||||
#elif defined(WEBRTC_MAC_INTEL)
|
#elif defined(WEBRTC_MAC_INTEL)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cpu_windows.h"
|
#include "cpu_win.h"
|
||||||
|
|
||||||
#define _WIN32_DCOM
|
#define _WIN32_DCOM
|
||||||
|
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "critical_section_windows.h"
|
#include "critical_section_win.h"
|
||||||
#else
|
#else
|
||||||
#include "critical_section_posix.h"
|
#include "critical_section_posix.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* 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 {
|
namespace webrtc {
|
||||||
CriticalSectionWindows::CriticalSectionWindows()
|
CriticalSectionWindows::CriticalSectionWindows()
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "event_windows.h"
|
#include "event_win.h"
|
||||||
#elif defined(WEBRTC_MAC_INTEL)
|
#elif defined(WEBRTC_MAC_INTEL)
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "event_windows.h"
|
#include "event_win.h"
|
||||||
|
|
||||||
#include "Mmsystem.h"
|
#include "Mmsystem.h"
|
||||||
|
|
@ -13,7 +13,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include "rw_lock_windows.h"
|
#include "rw_lock_win.h"
|
||||||
#elif defined(WEBRTC_ANDROID)
|
#elif defined(WEBRTC_ANDROID)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "rw_lock_generic.h"
|
#include "rw_lock_generic.h"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* 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 "critical_section_wrapper.h"
|
||||||
#include "condition_variable_wrapper.h"
|
#include "condition_variable_wrapper.h"
|
@ -6,12 +6,8 @@
|
|||||||
# in the file PATENTS. All contributing project authors may
|
# in the file PATENTS. All contributing project authors may
|
||||||
# be found in the AUTHORS file in the root of the source tree.
|
# 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': [
|
'includes': [ '../../build/common.gypi', ],
|
||||||
'../../common_settings.gypi', # Common settings
|
|
||||||
],
|
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
'target_name': 'system_wrappers',
|
'target_name': 'system_wrappers',
|
||||||
@ -38,7 +34,7 @@
|
|||||||
'../interface/data_log_impl.h',
|
'../interface/data_log_impl.h',
|
||||||
'../interface/event_wrapper.h',
|
'../interface/event_wrapper.h',
|
||||||
'../interface/file_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/list_wrapper.h',
|
||||||
'../interface/map_wrapper.h',
|
'../interface/map_wrapper.h',
|
||||||
'../interface/ref_count.h',
|
'../interface/ref_count.h',
|
||||||
@ -54,108 +50,96 @@
|
|||||||
'atomic32.cc',
|
'atomic32.cc',
|
||||||
'atomic32_linux.h',
|
'atomic32_linux.h',
|
||||||
'atomic32_mac.h',
|
'atomic32_mac.h',
|
||||||
'atomic32_windows.h',
|
'atomic32_win.h',
|
||||||
'condition_variable.cc',
|
'condition_variable.cc',
|
||||||
|
'condition_variable_posix.cc',
|
||||||
'condition_variable_posix.h',
|
'condition_variable_posix.h',
|
||||||
'condition_variable_windows.h',
|
'condition_variable_win.cc',
|
||||||
|
'condition_variable_win.h',
|
||||||
'cpu.cc',
|
'cpu.cc',
|
||||||
'cpu_dummy.cc',
|
'cpu_no_op.cc',
|
||||||
'cpu_info.cc',
|
'cpu_info.cc',
|
||||||
|
'cpu_linux.cc',
|
||||||
'cpu_linux.h',
|
'cpu_linux.h',
|
||||||
|
'cpu_mac.cc',
|
||||||
'cpu_mac.h',
|
'cpu_mac.h',
|
||||||
'cpu_windows.h',
|
'cpu_win.cc',
|
||||||
|
'cpu_win.h',
|
||||||
'cpu_features.cc',
|
'cpu_features.cc',
|
||||||
'critical_section.cc',
|
'critical_section.cc',
|
||||||
|
'critical_section_posix.cc',
|
||||||
'critical_section_posix.h',
|
'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_c.cc',
|
||||||
|
'data_log_no_op.cc',
|
||||||
'event.cc',
|
'event.cc',
|
||||||
|
'event_posix.cc',
|
||||||
'event_posix.h',
|
'event_posix.h',
|
||||||
'event_windows.h',
|
'event_win.cc',
|
||||||
|
'event_win.h',
|
||||||
'file_impl.cc',
|
'file_impl.cc',
|
||||||
'file_impl.h',
|
'file_impl.h',
|
||||||
'list_no_stl.cc',
|
'list_no_stl.cc',
|
||||||
'map.cc',
|
'map.cc',
|
||||||
'rw_lock.cc',
|
'rw_lock.cc',
|
||||||
|
'rw_lock_posix.cc',
|
||||||
'rw_lock_posix.h',
|
'rw_lock_posix.h',
|
||||||
'rw_lock_windows.h',
|
'rw_lock_win.cc',
|
||||||
|
'rw_lock_win.h',
|
||||||
'sort.cc',
|
'sort.cc',
|
||||||
'thread.cc',
|
'thread.cc',
|
||||||
|
'thread_posix.cc',
|
||||||
'thread_posix.h',
|
'thread_posix.h',
|
||||||
'thread_windows.h',
|
'thread_win.cc',
|
||||||
'thread_windows_set_name.h',
|
'thread_win.h',
|
||||||
|
'set_thread_name_win.h',
|
||||||
'trace_impl.cc',
|
'trace_impl.cc',
|
||||||
'trace_impl_no_op.cc',
|
|
||||||
'trace_impl.h',
|
'trace_impl.h',
|
||||||
|
'trace_impl_no_op.cc',
|
||||||
|
'trace_posix.cc',
|
||||||
'trace_posix.h',
|
'trace_posix.h',
|
||||||
'trace_windows.h',
|
'trace_win.cc',
|
||||||
|
'trace_win.h',
|
||||||
],
|
],
|
||||||
'conditions': [
|
'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', {
|
['enable_data_logging==1', {
|
||||||
'sources': [
|
'sources!': [ 'data_log_no_op.cc', ],
|
||||||
'data_log.cc',
|
|
||||||
],
|
|
||||||
},{
|
},{
|
||||||
'sources': [
|
'sources!': [ 'data_log.cc', ],
|
||||||
'data_log_dummy.cc',
|
|
||||||
],
|
|
||||||
},],
|
},],
|
||||||
['OS=="linux"', {
|
['OS=="linux"', {
|
||||||
'sources': [
|
|
||||||
'cpu_linux.cc',
|
|
||||||
],
|
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
'libraries': [
|
'libraries': [ '-lrt', ],
|
||||||
'-lrt',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
['OS=="mac"', {
|
['OS=="mac"', {
|
||||||
'sources': [
|
|
||||||
'cpu_mac.cc',
|
|
||||||
],
|
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
'libraries': [
|
'libraries': [ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', ],
|
||||||
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
['OS=="win"', {
|
['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': {
|
'link_settings': {
|
||||||
'libraries': [
|
'libraries': [ '-lwinmm.lib', ],
|
||||||
'-lwinmm.lib',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
['build_with_chromium==1', {
|
['build_with_chromium==1', {
|
||||||
'sources!': [
|
'sources!': [
|
||||||
'cpu.cc',
|
'cpu.cc',
|
||||||
|
'cpu_linux.h',
|
||||||
|
'cpu_mac.h',
|
||||||
|
'cpu_win.h',
|
||||||
'trace_impl.cc',
|
'trace_impl.cc',
|
||||||
|
'trace_impl.h',
|
||||||
'trace_posix.cc',
|
'trace_posix.cc',
|
||||||
'trace_windows.cc',
|
'trace_posix.h',
|
||||||
|
'trace_win.cc',
|
||||||
|
'trace_win.h',
|
||||||
],
|
],
|
||||||
}, {
|
}, {
|
||||||
'sources!': [
|
'sources!': [
|
||||||
'cpu_dummy.cc',
|
'cpu_no_op.cc',
|
||||||
'trace_impl_no_op.cc',
|
'trace_impl_no_op.cc',
|
||||||
],
|
],
|
||||||
}]
|
}]
|
||||||
@ -177,15 +161,17 @@
|
|||||||
'cpu_wrapper_unittest.cc',
|
'cpu_wrapper_unittest.cc',
|
||||||
'list_unittest.cc',
|
'list_unittest.cc',
|
||||||
'map_unittest.cc',
|
'map_unittest.cc',
|
||||||
|
'data_log_unittest.cc',
|
||||||
|
'data_log_unittest_disabled.cc',
|
||||||
'data_log_helpers_unittest.cc',
|
'data_log_helpers_unittest.cc',
|
||||||
'data_log_c_helpers_unittest.c',
|
'data_log_c_helpers_unittest.c',
|
||||||
'data_log_c_helpers_unittest.h',
|
'data_log_c_helpers_unittest.h',
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['enable_data_logging==1', {
|
['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"
|
#include "thread_wrapper.h"
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include "thread_windows.h"
|
#include "thread_win.h"
|
||||||
#else
|
#else
|
||||||
#include "thread_posix.h"
|
#include "thread_posix.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,14 +8,14 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* 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 <assert.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include "thread_windows_set_name.h"
|
#include "set_thread_name_win.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
@ -14,7 +14,7 @@
|
|||||||
#include <string.h> // memset
|
#include <string.h> // memset
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "trace_windows.h"
|
#include "trace_win.h"
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "trace_windows.h"
|
#include "trace_win.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
Loading…
Reference in New Issue
Block a user