Update talk to 60094938.
Review URL: https://webrtc-codereview.appspot.com/7489005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5420 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
#include <cassert>
|
||||
|
||||
#ifdef WIN32
|
||||
// TODO(grunell): Remove io.h includes when Chromium has started
|
||||
// to use AEC in each source. http://crbug.com/264611.
|
||||
#include <io.h>
|
||||
#include "talk/base/win32.h"
|
||||
#endif
|
||||
|
||||
@@ -294,4 +297,28 @@ bool CreateUniqueFile(Pathname& path, bool create_empty) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Taken from Chromium's base/platform_file_*.cc.
|
||||
// TODO(grunell): Remove when Chromium has started to use AEC in each source.
|
||||
// http://crbug.com/264611.
|
||||
FILE* FdopenPlatformFileForWriting(PlatformFile file) {
|
||||
#if defined(WIN32)
|
||||
if (file == kInvalidPlatformFileValue)
|
||||
return NULL;
|
||||
int fd = _open_osfhandle(reinterpret_cast<intptr_t>(file), 0);
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
return _fdopen(fd, "w");
|
||||
#else
|
||||
return fdopen(file, "w");
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ClosePlatformFile(PlatformFile file) {
|
||||
#if defined(WIN32)
|
||||
return CloseHandle(file) != 0;
|
||||
#else
|
||||
return close(file);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace talk_base
|
||||
|
Reference in New Issue
Block a user