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

@ -10,7 +10,7 @@
#include "webrtc/modules/video_coding/main/test/generic_codec_test.h"
#include <cmath>
#include <math.h>
#include <stdio.h>
#include "webrtc/common_video/interface/i420_video_frame.h"

View File

@ -9,7 +9,7 @@
*/
#include <stdio.h>
#include <ctime>
#include <time.h>
#include "JitterEstimateTest.h"
using namespace webrtc;
@ -25,8 +25,8 @@ _counter(0),
_lossrate(0.0)
{
// Assign to random value between 0 and max of unsigned int
_seed = static_cast<unsigned>(std::time(0));
std::srand(_seed);
_seed = static_cast<unsigned>(time(0));
srand(_seed);
_prevTimestamp = static_cast<unsigned int>((std::rand() + 1.0)/(RAND_MAX + 1.0)*(pow((float) 2, (long) sizeof(unsigned int)*8)-1));
_prevWallClock = VCMTickTime::MillisecondTimestamp();
}

View File

@ -14,8 +14,8 @@
#include "typedefs.h"
#include "jitter_buffer.h"
#include "jitter_estimator.h"
#include <cstdlib>
#include <cmath>
#include <stdlib.h>
#include <math.h>
double const pi = 4*std::atan(1.0);
@ -28,7 +28,7 @@ public:
{
double r1 = (std::rand() + 1.0)/(RAND_MAX + 1.0); // gives equal distribution in (0, 1]
double r2 = (std::rand() + 1.0)/(RAND_MAX + 1.0);
return _mu + _sigma * std::sqrt(-2*std::log(r1))*std::cos(2*pi*r2);
return _mu + _sigma * sqrt(-2*std::log(r1))*std::cos(2*pi*r2);
}
double GetAverage()

View File

@ -10,7 +10,7 @@
#include "webrtc/modules/video_coding/main/test/mt_test_common.h"
#include <cmath>
#include <math.h>
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/modules/utility/interface/rtp_dump.h"

View File

@ -16,8 +16,9 @@
#else
#include <arpa/inet.h>
#endif
#include <cassert>
#include <cstdio>
#include <assert.h>
#include <stdio.h>
#include <map>
#include <string>
#include <vector>

View File

@ -16,8 +16,8 @@
#else
#include <arpa/inet.h>
#endif
#include <cassert>
#include <cstdio>
#include <assert.h>
#include <stdio.h>
#include "webrtc/modules/video_coding/main/test/rtp_player.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"

View File

@ -10,7 +10,8 @@
#include "webrtc/modules/video_coding/main/test/rtp_player.h"
#include <cstdio>
#include <stdio.h>
#include <map>
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"

View File

@ -10,7 +10,7 @@
#include "webrtc/modules/video_coding/main/test/test_callbacks.h"
#include <cmath>
#include <math.h>
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"

View File

@ -16,10 +16,11 @@
*/
#include <cstdlib>
#include <stdlib.h>
#include <string.h>
#include <fstream>
#include <list>
#include <string.h>
#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"

View File

@ -11,8 +11,8 @@
#ifndef VCM_TEST_MACROS_H
#define VCM_TEST_MACROS_H
#include <cstdio>
#include <cstdlib>
#include <stdio.h>
#include <stdlib.h>
extern int vcmMacrosTests;
extern int vcmMacrosErrors;

View File

@ -10,8 +10,9 @@
#include "webrtc/modules/video_coding/main/test/test_util.h"
#include <cassert>
#include <cmath>
#include <assert.h>
#include <math.h>
#include <iomanip>
#include <sstream>

View File

@ -10,8 +10,9 @@
#include "webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h"
#include <assert.h>
#include <algorithm>
#include <cassert>
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
#include "webrtc/modules/video_coding/main/test/test_util.h"

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <cassert>
#include <assert.h>
#include "webrtc/modules/video_coding/main/test/receiver_tests.h"
#include "webrtc/modules/video_coding/main/test/vcm_payload_sink_factory.h"

View File

@ -10,7 +10,7 @@
#include "webrtc/modules/video_coding/main/test/video_source.h"
#include <cassert>
#include <assert.h>
#include "webrtc/test/testsupport/fileutils.h"