mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 20:31:21 +00:00
Prepare for removal of source_filter.gypi:
- Guard OS-dependent source files with #if TARGET_OS_* in a similar fashion to the architecture dependent sources. Review URL: https://codereview.chromium.org//12282051 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18786 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
8b37852e8a
commit
9046a44a37
|
@ -2,8 +2,11 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
#include "bin/crypto.h"
|
||||
|
@ -16,3 +19,5 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
|||
close(fd);
|
||||
return bytes_read == count;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
#include "bin/crypto.h"
|
||||
|
@ -16,3 +19,5 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
|||
close(fd);
|
||||
return bytes_read == count;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
#include "bin/crypto.h"
|
||||
|
@ -16,3 +19,5 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
|||
close(fd);
|
||||
return bytes_read == count;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#define _CRT_RAND_S
|
||||
#include "bin/crypto.h"
|
||||
|
||||
|
@ -20,3 +23,5 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/epoll.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <sys/epoll.h> // NOLINT
|
||||
|
||||
#include "bin/dbg_connection.h"
|
||||
#include "bin/fdutils.h"
|
||||
|
@ -115,3 +118,5 @@ intptr_t DebuggerConnectionImpl::Send(intptr_t socket,
|
|||
intptr_t DebuggerConnectionImpl::Receive(intptr_t socket, char* buf, int len) {
|
||||
return TEMP_FAILURE_RETRY(read(socket, buf, len));
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/epoll.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <sys/epoll.h> // NOLINT
|
||||
|
||||
#include "bin/dbg_connection.h"
|
||||
#include "bin/fdutils.h"
|
||||
|
@ -115,3 +118,5 @@ intptr_t DebuggerConnectionImpl::Send(intptr_t socket,
|
|||
intptr_t DebuggerConnectionImpl::Receive(intptr_t socket, char* buf, int len) {
|
||||
return TEMP_FAILURE_RETRY(read(socket, buf, len));
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/event.h>
|
||||
#include <unistd.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/event.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/dartutils.h"
|
||||
#include "bin/dbg_connection.h"
|
||||
|
@ -169,3 +172,5 @@ intptr_t DebuggerConnectionImpl::Send(intptr_t socket,
|
|||
intptr_t DebuggerConnectionImpl::Receive(intptr_t socket, char* buf, int len) {
|
||||
return TEMP_FAILURE_RETRY(read(socket, buf, len));
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "bin/dbg_connection.h"
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
|
@ -39,3 +42,5 @@ intptr_t DebuggerConnectionImpl::Receive(intptr_t socket, char* buf, int len) {
|
|||
ClientSocket* client_socket = reinterpret_cast<ClientSocket*>(socket);
|
||||
return recv(client_socket->socket(), buf, len, 0);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "bin/directory.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h> // NOLINT
|
||||
#include <errno.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/param.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/file.h"
|
||||
#include "bin/platform.h"
|
||||
|
@ -416,3 +419,5 @@ bool Directory::Rename(const char* path, const char* new_path) {
|
|||
if (exists != EXISTS) return false;
|
||||
return (TEMP_FAILURE_RETRY(rename(path, new_path)) == 0);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "bin/directory.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h> // NOLINT
|
||||
#include <errno.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/param.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/file.h"
|
||||
#include "bin/platform.h"
|
||||
|
@ -385,3 +388,5 @@ bool Directory::Rename(const char* path, const char* new_path) {
|
|||
if (exists != EXISTS) return false;
|
||||
return (TEMP_FAILURE_RETRY(rename(path, new_path)) == 0);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "bin/directory.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h> // NOLINT
|
||||
#include <errno.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/param.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/file.h"
|
||||
#include "bin/platform.h"
|
||||
|
@ -385,3 +388,5 @@ bool Directory::Rename(const char* path, const char* new_path) {
|
|||
if (exists != EXISTS) return false;
|
||||
return (TEMP_FAILURE_RETRY(rename(path, new_path)) == 0);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "bin/directory.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
|
||||
#include "bin/log.h"
|
||||
|
||||
|
@ -396,3 +399,5 @@ bool Directory::Rename(const char* path, const char* new_path) {
|
|||
free(const_cast<wchar_t*>(system_new_path));
|
||||
return (move_status != 0);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,15 +2,18 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <pthread.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/epoll.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/dartutils.h"
|
||||
#include "bin/fdutils.h"
|
||||
|
@ -421,3 +424,5 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
|
|||
// The hashmap does not support keys with value 0.
|
||||
return dart::Utils::WordHash(fd + 1);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,15 +2,18 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <pthread.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/epoll.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/dartutils.h"
|
||||
#include "bin/fdutils.h"
|
||||
|
@ -421,3 +424,5 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
|
|||
// The hashmap does not support keys with value 0.
|
||||
return dart::Utils::WordHash(fd + 1);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/event.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <pthread.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/event.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/dartutils.h"
|
||||
#include "bin/fdutils.h"
|
||||
|
@ -415,3 +418,5 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
|
|||
// The hashmap does not support keys with value 0.
|
||||
return dart::Utils::WordHash(fd + 1);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
|
||||
#include <process.h>
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <mswsock.h>
|
||||
#include <process.h> // NOLINT
|
||||
#include <winsock2.h> // NOLINT
|
||||
#include <ws2tcpip.h> // NOLINT
|
||||
#include <mswsock.h> // NOLINT
|
||||
|
||||
#include "bin/builtin.h"
|
||||
#include "bin/dartutils.h"
|
||||
|
@ -931,3 +934,5 @@ void EventHandlerImplementation::Start() {
|
|||
void EventHandlerImplementation::Shutdown() {
|
||||
SendData(kShutdownId, 0, 0);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "bin/extensions.h"
|
||||
#include <dlfcn.h>
|
||||
#include <dlfcn.h> // NOLINT
|
||||
|
||||
void* Extensions::LoadExtensionLibrary(const char* library_path,
|
||||
const char* extension_name) {
|
||||
|
@ -21,3 +24,5 @@ void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
|
|||
if (dlerror() != NULL) return NULL;
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "bin/extensions.h"
|
||||
#include <dlfcn.h>
|
||||
#include <dlfcn.h> // NOLINT
|
||||
|
||||
void* Extensions::LoadExtensionLibrary(const char* library_path,
|
||||
const char* extension_name) {
|
||||
|
@ -21,3 +24,5 @@ void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
|
|||
if (dlerror() != NULL) return NULL;
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "bin/extensions.h"
|
||||
#include <dlfcn.h>
|
||||
#include <dlfcn.h> // NOLINT
|
||||
|
||||
void* Extensions::LoadExtensionLibrary(const char* library_path,
|
||||
const char* extension_name) {
|
||||
|
@ -21,3 +24,5 @@ void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
|
|||
if (dlerror() != NULL) return NULL;
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "bin/extensions.h"
|
||||
#include "bin/utils.h"
|
||||
|
||||
|
@ -19,3 +22,5 @@ void* Extensions::LoadExtensionLibrary(const char* library_path,
|
|||
void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
|
||||
return GetProcAddress(reinterpret_cast<HMODULE>(lib_handle), symbol);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "bin/file.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <libgen.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
#include <libgen.h> // NOLINT
|
||||
|
||||
#include "bin/builtin.h"
|
||||
#include "bin/log.h"
|
||||
|
@ -242,3 +245,5 @@ File::StdioHandleType File::GetStdioHandleType(int fd) {
|
|||
if (S_ISREG(buf.st_mode)) return kFile;
|
||||
return kOther;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "bin/file.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <libgen.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
#include <libgen.h> // NOLINT
|
||||
|
||||
#include "bin/builtin.h"
|
||||
#include "bin/log.h"
|
||||
|
@ -242,3 +245,5 @@ File::StdioHandleType File::GetStdioHandleType(int fd) {
|
|||
if (S_ISREG(buf.st_mode)) return kFile;
|
||||
return kOther;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "bin/file.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <libgen.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
#include <libgen.h> // NOLINT
|
||||
#include <limits.h> // NOLINT
|
||||
|
||||
#include "bin/builtin.h"
|
||||
#include "bin/fdutils.h"
|
||||
|
@ -250,3 +253,5 @@ File::StdioHandleType File::GetStdioHandleType(int fd) {
|
|||
if (S_ISREG(buf.st_mode)) return kFile;
|
||||
return kOther;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "bin/file.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h> // NOLINT
|
||||
#include <io.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
|
||||
#include "bin/builtin.h"
|
||||
#include "bin/log.h"
|
||||
|
@ -266,3 +269,5 @@ File::StdioHandleType File::GetStdioHandleType(int fd) {
|
|||
// socket code will handle the different handle types.
|
||||
return kPipe;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "bin/log.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <android/log.h>
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <android/log.h> // NOLINT
|
||||
|
||||
// TODO(gram): We should be buffering the data and only outputting
|
||||
// it when we see a '\n'.
|
||||
|
@ -18,3 +21,4 @@ void Log::VPrintErr(const char* format, va_list args) {
|
|||
__android_log_vprint(ANDROID_LOG_ERROR, "Dart", format, args);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "bin/log.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdio.h> // NOLINT
|
||||
|
||||
void Log::VPrint(const char* format, va_list args) {
|
||||
vfprintf(stdout, format, args);
|
||||
|
@ -16,3 +19,4 @@ void Log::VPrintErr(const char* format, va_list args) {
|
|||
fflush(stdout);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "bin/log.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdio.h> // NOLINT
|
||||
|
||||
void Log::VPrint(const char* format, va_list args) {
|
||||
vfprintf(stdout, format, args);
|
||||
|
@ -15,3 +18,5 @@ void Log::VPrintErr(const char* format, va_list args) {
|
|||
vfprintf(stderr, format, args);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "bin/log.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdio.h> // NOLINT
|
||||
|
||||
void Log::VPrint(const char* format, va_list args) {
|
||||
vfprintf(stdout, format, args);
|
||||
|
@ -15,3 +18,5 @@ void Log::VPrintErr(const char* format, va_list args) {
|
|||
vfprintf(stderr, format, args);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,11 +2,14 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "bin/platform.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
|
||||
bool Platform::Initialize() {
|
||||
|
@ -65,3 +68,5 @@ char** Platform::Environment(intptr_t* count) {
|
|||
void Platform::FreeEnvironment(char** env, intptr_t count) {
|
||||
delete[] env;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,11 +2,14 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "bin/platform.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
|
||||
bool Platform::Initialize() {
|
||||
|
@ -65,3 +68,5 @@ char** Platform::Environment(intptr_t* count) {
|
|||
void Platform::FreeEnvironment(char** env, intptr_t count) {
|
||||
delete[] env;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "bin/platform.h"
|
||||
|
||||
#include <crt_externs.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <crt_externs.h> // NOLINT
|
||||
#include <signal.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
|
||||
bool Platform::Initialize() {
|
||||
|
@ -70,3 +73,5 @@ char** Platform::Environment(intptr_t* count) {
|
|||
void Platform::FreeEnvironment(char** env, intptr_t count) {
|
||||
delete[] env;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "bin/platform.h"
|
||||
#include "bin/log.h"
|
||||
#include "bin/socket.h"
|
||||
|
@ -60,3 +63,5 @@ void Platform::FreeEnvironment(char** env, int count) {
|
|||
for (int i = 0; i < count; i++) free(env[i]);
|
||||
delete[] env;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,17 +2,20 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "bin/process.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
#include <poll.h> // NOLINT
|
||||
#include <signal.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/wait.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
#include "bin/log.h"
|
||||
|
@ -566,3 +569,5 @@ void Process::TerminateExitCodeHandler() {
|
|||
intptr_t Process::CurrentProcessId() {
|
||||
return static_cast<intptr_t>(getpid());
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,17 +2,20 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "bin/process.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
#include <poll.h> // NOLINT
|
||||
#include <signal.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/wait.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
#include "bin/log.h"
|
||||
|
@ -562,3 +565,5 @@ void Process::TerminateExitCodeHandler() {
|
|||
intptr_t Process::CurrentProcessId() {
|
||||
return static_cast<intptr_t>(getpid());
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,16 +2,19 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "bin/process.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
#include <poll.h> // NOLINT
|
||||
#include <signal.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
#include "bin/log.h"
|
||||
|
@ -560,3 +563,5 @@ void Process::TerminateExitCodeHandler() {
|
|||
intptr_t Process::CurrentProcessId() {
|
||||
return static_cast<intptr_t>(getpid());
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <process.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include <process.h> // NOLINT
|
||||
|
||||
#include "bin/builtin.h"
|
||||
#include "bin/process.h"
|
||||
|
@ -10,7 +13,6 @@
|
|||
#include "bin/log.h"
|
||||
#include "bin/thread.h"
|
||||
#include "bin/utils.h"
|
||||
#include "platform/globals.h"
|
||||
|
||||
static const int kReadHandle = 0;
|
||||
static const int kWriteHandle = 1;
|
||||
|
@ -660,3 +662,5 @@ void Process::TerminateExitCodeHandler() {
|
|||
intptr_t Process::CurrentProcessId() {
|
||||
return static_cast<intptr_t>(GetCurrentProcessId());
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,11 +2,14 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/socket.h"
|
||||
#include "bin/fdutils.h"
|
||||
|
@ -260,3 +263,5 @@ void Socket::Close(intptr_t fd) {
|
|||
Log::PrintErr("%s\n", error_message);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
#include "bin/file.h"
|
||||
|
@ -276,3 +279,5 @@ void Socket::Close(intptr_t fd) {
|
|||
Log::PrintErr("%s\n", error_message);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <stdio.h> // NOLINT
|
||||
#include <stdlib.h> // NOLINT
|
||||
#include <string.h> // NOLINT
|
||||
#include <sys/stat.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
#include "bin/file.h"
|
||||
|
@ -262,3 +265,5 @@ void Socket::Close(intptr_t fd) {
|
|||
Log::PrintErr("%s\n", error_message);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "bin/builtin.h"
|
||||
#include "bin/eventhandler.h"
|
||||
#include "bin/file.h"
|
||||
|
@ -279,3 +282,5 @@ void Socket::Close(intptr_t fd) {
|
|||
ClientSocket* client_socket = reinterpret_cast<ClientSocket*>(fd);
|
||||
client_socket->close();
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,11 +2,16 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <windows.h> // NOLINT
|
||||
|
||||
BOOL APIENTRY DllMain(HMODULE module,
|
||||
DWORD reason,
|
||||
LPVOID reserved) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/time.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <netdb.h> // NOLINT
|
||||
#include <sys/time.h> // NOLINT
|
||||
|
||||
#include "bin/utils.h"
|
||||
#include "platform/assert.h"
|
||||
|
@ -83,3 +86,5 @@ int64_t TimerUtils::GetCurrentTimeMicros() {
|
|||
}
|
||||
return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/time.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <netdb.h> // NOLINT
|
||||
#include <sys/time.h> // NOLINT
|
||||
|
||||
#include "bin/utils.h"
|
||||
#include "platform/assert.h"
|
||||
|
@ -83,3 +86,5 @@ int64_t TimerUtils::GetCurrentTimeMicros() {
|
|||
}
|
||||
return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/time.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <netdb.h> // NOLINT
|
||||
#include <sys/time.h> // NOLINT
|
||||
|
||||
#include "bin/utils.h"
|
||||
#include "platform/assert.h"
|
||||
|
@ -83,3 +86,5 @@ int64_t TimerUtils::GetCurrentTimeMicros() {
|
|||
}
|
||||
return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <time.h> // NOLINT
|
||||
|
||||
#include "bin/utils.h"
|
||||
#include "bin/log.h"
|
||||
|
@ -137,3 +140,5 @@ int64_t TimerUtils::GetCurrentTimeMicros() {
|
|||
GetSystemTimeAsFileTime(&time.ft_);
|
||||
return (time.t_ - kTimeEpoc) / kTimeScaler;
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <math.h>
|
||||
#include <limits>
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include <math.h> // NOLINT
|
||||
#include <limits> // NOLINT
|
||||
|
||||
// Taken from third_party/v8/src/platform-win32.cc
|
||||
double fmod_ieee(double x, double y) {
|
||||
|
@ -44,3 +45,5 @@ double atan2_ieee(double x, double y) {
|
|||
return atan2(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "platform/thread.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <sys/time.h> // NOLINT
|
||||
|
||||
#include "platform/assert.h"
|
||||
|
||||
|
@ -277,3 +280,5 @@ void Monitor::NotifyAll() {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "platform/thread.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <sys/time.h> // NOLINT
|
||||
|
||||
#include "platform/assert.h"
|
||||
|
||||
|
@ -279,3 +282,5 @@ void Monitor::NotifyAll() {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "platform/thread.h"
|
||||
|
||||
#include <sys/errno.h>
|
||||
#include <sys/errno.h> // NOLINT
|
||||
|
||||
#include "platform/assert.h"
|
||||
|
||||
|
@ -259,3 +262,5 @@ void Monitor::NotifyAll() {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "platform/thread.h"
|
||||
|
||||
#include <process.h>
|
||||
#include <process.h> // NOLINT
|
||||
|
||||
#include "platform/assert.h"
|
||||
|
||||
|
@ -336,3 +339,5 @@ void Monitor::NotifyAll() {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,17 +2,20 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "vm/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "vm/os.h"
|
||||
|
||||
#include <android/log.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <malloc.h>
|
||||
#include <time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <android/log.h> // NOLINT
|
||||
#include <errno.h> // NOLINT
|
||||
#include <limits.h> // NOLINT
|
||||
#include <malloc.h> // NOLINT
|
||||
#include <time.h> // NOLINT
|
||||
#include <sys/resource.h> // NOLINT
|
||||
#include <sys/time.h> // NOLINT
|
||||
#include <sys/types.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "platform/utils.h"
|
||||
#include "vm/code_observers.h"
|
||||
|
@ -417,3 +420,5 @@ void OS::Exit(int code) {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,16 +2,19 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "vm/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "vm/os.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <malloc.h>
|
||||
#include <time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <limits.h> // NOLINT
|
||||
#include <malloc.h> // NOLINT
|
||||
#include <time.h> // NOLINT
|
||||
#include <sys/resource.h> // NOLINT
|
||||
#include <sys/time.h> // NOLINT
|
||||
#include <sys/types.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "platform/utils.h"
|
||||
#include "vm/code_observers.h"
|
||||
|
@ -422,3 +425,5 @@ void OS::Exit(int code) {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,16 +2,19 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "vm/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "vm/os.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <mach/mach.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/mach_time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h> // NOLINT
|
||||
#include <limits.h> // NOLINT
|
||||
#include <mach/mach.h> // NOLINT
|
||||
#include <mach/clock.h> // NOLINT
|
||||
#include <mach/mach_time.h> // NOLINT
|
||||
#include <sys/time.h> // NOLINT
|
||||
#include <sys/resource.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "platform/utils.h"
|
||||
#include "vm/isolate.h"
|
||||
|
@ -219,3 +222,5 @@ void OS::Exit(int code) {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "vm/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "vm/os.h"
|
||||
|
||||
#include <malloc.h>
|
||||
#include <time.h>
|
||||
#include <malloc.h> // NOLINT
|
||||
#include <time.h> // NOLINT
|
||||
|
||||
#include "platform/utils.h"
|
||||
#include "platform/assert.h"
|
||||
|
@ -290,3 +293,5 @@ void OS::Exit(int code) {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "vm/globals.h"
|
||||
#if defined(TARGET_OS_ANDROID)
|
||||
|
||||
#include "vm/virtual_memory.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "platform/assert.h"
|
||||
#include "platform/utils.h"
|
||||
|
@ -96,3 +99,5 @@ bool VirtualMemory::Protect(Protection mode) {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_ANDROID)
|
||||
|
|
|
@ -2,11 +2,14 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "vm/globals.h"
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
|
||||
#include "vm/virtual_memory.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/unistd.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h> // NOLINT
|
||||
#include <sys/unistd.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "platform/assert.h"
|
||||
#include "platform/utils.h"
|
||||
|
@ -96,3 +99,5 @@ bool VirtualMemory::Protect(Protection mode) {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "vm/globals.h"
|
||||
#if defined(TARGET_OS_MACOS)
|
||||
|
||||
#include "vm/virtual_memory.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h> // NOLINT
|
||||
#include <unistd.h> // NOLINT
|
||||
|
||||
#include "platform/assert.h"
|
||||
#include "platform/utils.h"
|
||||
|
@ -96,3 +99,5 @@ bool VirtualMemory::Protect(Protection mode) {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_MACOS)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "vm/globals.h"
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
|
||||
#include "vm/virtual_memory.h"
|
||||
|
||||
#include "platform/assert.h"
|
||||
|
@ -84,3 +87,5 @@ bool VirtualMemory::Protect(Protection mode) {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(TARGET_OS_WINDOWS)
|
||||
|
|
Loading…
Reference in a new issue