Switch C++-style C headers with their C equivalents.

The C++ headers define the C functions within the std:: namespace, but
we mainly don't use the std:: namespace for C functions. Therefore we
should include the C headers.

BUG=1833
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1917004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4486 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2013-08-05 16:22:53 +00:00
parent c3d93c6921
commit 12dc1a38ca
212 changed files with 396 additions and 334 deletions

View File

@ -16,7 +16,7 @@
#ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ATOMIC32_H_
#define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ATOMIC32_H_
#include <cstddef>
#include <stddef.h>
#include "webrtc/common_types.h"
#include "webrtc/system_wrappers/interface/constructor_magic.h"

View File

@ -26,10 +26,9 @@
#define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_SCOPED_PTR_H_
#include <assert.h> // for assert
#include <stddef.h> // for ptrdiff_t
#include <stdlib.h> // for free() decl
#include <cstddef> // for std::ptrdiff_t
#ifdef _WIN32
namespace std { using ::ptrdiff_t; };
#endif // _WIN32
@ -149,7 +148,7 @@ class scoped_array {
}
}
T& operator[](std::ptrdiff_t i) const {
T& operator[](ptrdiff_t i) const {
assert(ptr != NULL);
assert(i >= 0);
return ptr[i];

View File

@ -19,7 +19,7 @@
#include <windows.h>
#include <mmsystem.h>
#elif WEBRTC_LINUX
#include <ctime>
#include <time.h>
#elif WEBRTC_MAC
#include <mach/mach_time.h>
#include <string.h>

View File

@ -12,7 +12,7 @@
#include <errno.h>
#if defined(WEBRTC_LINUX)
#include <ctime>
#include <time.h>
#else
#include <sys/time.h>
#endif

View File

@ -10,7 +10,7 @@
#include "webrtc/system_wrappers/interface/data_log.h"
#include <cstdio>
#include <stdio.h>
#include "testing/gtest/include/gtest/gtest.h"
@ -44,7 +44,7 @@ TEST(TestDataLogDisabled, VerifyLoggingWorks) {
TEST(TestDataLogDisabled, EnsureNoFileIsWritten) {
// Remove any previous data files on disk:
std::remove(kDataLogFileName);
remove(kDataLogFileName);
ASSERT_EQ(0, DataLog::CreateLog());
// Don't use the table name we would get from Combine on a disabled DataLog.
// Use "table_1" instead (which is what an enabled DataLog would give us).

View File

@ -15,12 +15,13 @@
#include "webrtc/system_wrappers/interface/sort.h"
#include <cassert>
#include <cstring> // memcpy
#include <assert.h>
#include <string.h> // memcpy
#include <new> // nothrow new
#ifdef NO_STL
#include <cstdlib> // qsort
#include <stdlib.h> // qsort
#else
#include <algorithm> // std::sort
#include <vector>

View File

@ -10,7 +10,7 @@
#include "webrtc/system_wrappers/interface/tick_util.h"
#include <cassert>
#include <assert.h>
namespace webrtc {

View File

@ -10,7 +10,7 @@
#include "webrtc/system_wrappers/source/trace_impl.h"
#include <cassert>
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>

View File

@ -10,12 +10,13 @@
#include "webrtc/system_wrappers/source/trace_posix.h"
#include <cassert>
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#ifdef WEBRTC_ANDROID
#include <pthread.h>
#else

View File

@ -10,7 +10,7 @@
#include "webrtc/system_wrappers/source/trace_win.h"
#include <cassert>
#include <assert.h>
#include <stdarg.h>
#include "Mmsystem.h"

View File

@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include "webrtc/system_wrappers/interface/sort.h"
#include "webrtc/system_wrappers/interface/tick_util.h"