From fdd54646766dfea895d2e6e4f806c03b53066d83 Mon Sep 17 00:00:00 2001 From: Madhura Jayaraman Date: Wed, 11 Sep 2024 14:27:04 -0700 Subject: [PATCH 1/7] Delete deprecated starboard header files Change-Id: I8c56ca7c5024e148f625756a626884b9daf31ce2 --- starboard/accessibility.h | 24 -------------------- starboard/byte_swap.h | 25 --------------------- starboard/image.h | 47 --------------------------------------- starboard/once.h | 25 --------------------- starboard/time.h | 24 -------------------- starboard/ui_navigation.h | 38 ------------------------------- starboard/user.h | 30 ------------------------- 7 files changed, 213 deletions(-) delete mode 100644 starboard/accessibility.h delete mode 100644 starboard/byte_swap.h delete mode 100644 starboard/image.h delete mode 100644 starboard/once.h delete mode 100644 starboard/time.h delete mode 100644 starboard/ui_navigation.h delete mode 100644 starboard/user.h diff --git a/starboard/accessibility.h b/starboard/accessibility.h deleted file mode 100644 index 3f765b42653..00000000000 --- a/starboard/accessibility.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2017 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard Accessibility module -// -// Provides access to the system options and settings related to accessibility. - -#ifndef STARBOARD_ACCESSIBILITY_H_ -#define STARBOARD_ACCESSIBILITY_H_ - -#error This file is deprecated with SB_API_VERSION 16. - -#endif // STARBOARD_ACCESSIBILITY_H_ diff --git a/starboard/byte_swap.h b/starboard/byte_swap.h deleted file mode 100644 index e86240a8fc0..00000000000 --- a/starboard/byte_swap.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2016 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard Byte Swap module -// -// Specifies functions for swapping byte order. These functions are used to -// deal with endianness when performing I/O. - -#ifndef STARBOARD_BYTE_SWAP_H_ -#define STARBOARD_BYTE_SWAP_H_ - -#error This file is deprecated with SB_API_VERSION 16. - -#endif // STARBOARD_BYTE_SWAP_H_ diff --git a/starboard/image.h b/starboard/image.h deleted file mode 100644 index 831abe177b1..00000000000 --- a/starboard/image.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2016 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard Image Decoding Module -// -// API for hardware accelerated image decoding. This module allows for the -// client to feed in raw, encoded data to be decoded directly into an -// SbDecodeTarget. It also provides an interface for the client to query what -// combinations of encoded image formats and SbDecodeTargetFormats are -// supported or not. -// -// All functions in this module are safe to call from any thread at any point -// in time. -// -// # SbImageIsDecodeSupported and SbImageDecode Example -// -// SbDecodeTargetProvider* provider = GetProviderFromSomewhere(); -// void* data = GetCompressedJPEGFromSomewhere(); -// int data_size = GetCompressedJPEGSizeFromSomewhere(); -// const char* mime_type = "image/jpeg"; -// SbDecodeTargetFormat format = kSbDecodeTargetFormat1PlaneRGBA; -// -// if (!SbImageIsDecodeSupported(mime_type, format)) { -// return; -// } -// -// SbDecodeTarget result_target = SbImageDecode(provider, data, data_size, -// mime_type, format); -// - -#ifndef STARBOARD_IMAGE_H_ -#define STARBOARD_IMAGE_H_ - -#error This file is deprecated with SB_API_VERSION 16. - -#endif // STARBOARD_IMAGE_H_ diff --git a/starboard/once.h b/starboard/once.h deleted file mode 100644 index d2a54c09a48..00000000000 --- a/starboard/once.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard Once module -// -// Onces represent initializations that should only ever happen once per -// process, in a thread-safe way. - -#ifndef STARBOARD_ONCE_H_ -#define STARBOARD_ONCE_H_ - -#error This file is deprecated with SB_API_VERSION 16. - -#endif // STARBOARD_ONCE_H_ diff --git a/starboard/time.h b/starboard/time.h deleted file mode 100644 index a0f1a71cd29..00000000000 --- a/starboard/time.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard Time module -// -// Provides access to system time and timers. - -#ifndef STARBOARD_TIME_H_ -#define STARBOARD_TIME_H_ - -#error This file is deprecated with SB_API_VERSION 16. - -#endif // STARBOARD_TIME_H_ diff --git a/starboard/ui_navigation.h b/starboard/ui_navigation.h deleted file mode 100644 index 16729a4ec8f..00000000000 --- a/starboard/ui_navigation.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2019 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: User Interface Navigation module -// -// API to allow applications to take advantage of the platform's native UI -// engine. This is mainly to drive the animation of visual elements and to -// signal which of those elements have focus. The implementation should not -// render any visual elements; instead, it will be used to guide the app in -// where these elements should be drawn. -// -// When the application creates the user interface, it will create SbUiNavItems -// for interactable elements. Additionally, the app must specify the position -// and size of these navigation items. As the app's user interface changes, it -// will create and destroy navigation items as appropriate. -// -// For each render frame, the app will query the local transform for each -// SbUiNavItem in case the native UI engine moves individual items in response -// to user interaction. If the navigation item is a container, then the content -// offset will also be queried to determine the placement of its content items. - -#ifndef STARBOARD_UI_NAVIGATION_H_ -#define STARBOARD_UI_NAVIGATION_H_ - -#error This file is deprecated with SB_API_VERSION 16. - -#endif // STARBOARD_UI_NAVIGATION_H_ diff --git a/starboard/user.h b/starboard/user.h deleted file mode 100644 index c350bfc393d..00000000000 --- a/starboard/user.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2016 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard User module -// -// Defines a user management API. This module defines functions only for -// managing signed-in users. Platforms that do not have users must still -// implement this API, always reporting a single user that is current and -// signed in. -// -// These APIs are NOT expected to be thread-safe, so either call them from a -// single thread, or perform proper synchronization around all calls. - -#ifndef STARBOARD_USER_H_ -#define STARBOARD_USER_H_ - -#error This file is deprecated with SB_API_VERSION 16. - -#endif // STARBOARD_USER_H_ From fb8015fe04dd6349041918b13bf3ad70b4d8cbbb Mon Sep 17 00:00:00 2001 From: Madhura Jayaraman Date: Wed, 11 Sep 2024 16:06:24 -0700 Subject: [PATCH 2/7] Delete directory header file Change-Id: Iac1a5679cf2d81d73d3e4a2b73d04b135ad7fedb --- base/files/file_enumerator_starboard.cc | 1 - base/files/file_util_starboard.cc | 1 - chrome/updater/utils_test.cc | 1 - cobalt/browser/splash_screen_cache.cc | 1 - cobalt/cache/memory_capped_directory.cc | 1 - cobalt/media/sandbox/fuzzer_app.cc | 1 - .../trust_store_in_memory_starboard.cc | 1 - .../quiche_file_utils_impl.cc | 1 - starboard/android/shared/android_main.cc | 1 - starboard/android/shared/posix_emu/file.cc | 1 - starboard/android/shared/posix_emu/stat.cc | 1 - starboard/android/shared/system_get_path.cc | 1 - starboard/common/file.cc | 1 - starboard/directory.h | 49 ------------------- starboard/elf_loader/exported_symbols.cc | 1 - starboard/linux/shared/system_get_path.cc | 1 - starboard/loader_app/app_key_files.cc | 1 - starboard/loader_app/drain_file.cc | 1 - starboard/loader_app/drain_file_test.cc | 1 - starboard/loader_app/installation_manager.cc | 2 +- .../loader_app/reset_evergreen_update_test.cc | 1 - starboard/loader_app/slot_management_test.cc | 1 - starboard/nplb/extern_c_test.cc | 1 - starboard/nplb/file_delete_recursive_test.cc | 1 - starboard/nplb/file_helpers.cc | 1 - starboard/nplb/include_all.c | 1 - .../posix_directory_can_open_test.cc | 1 - .../posix_directory_create_test.cc | 1 - .../posix_directory_get_next_test.cc | 1 - .../posix_directory_open_test.cc | 1 - .../posix_file_delete_test.cc | 1 - starboard/nplb/system_get_path_test.cc | 1 - starboard/shared/linux/dev_input/dev_input.cc | 1 - .../starboard/player/file_cache_reader.cc | 1 - .../player/filter/testing/test_util.cc | 1 - .../crashpad/crashpad/wrapper/wrapper.cc | 1 - .../include/gtest/internal/gtest-port.h | 1 - 37 files changed, 1 insertion(+), 85 deletions(-) delete mode 100644 starboard/directory.h diff --git a/base/files/file_enumerator_starboard.cc b/base/files/file_enumerator_starboard.cc index a4ebb01e4f9..cc4727f2eb0 100644 --- a/base/files/file_enumerator_starboard.cc +++ b/base/files/file_enumerator_starboard.cc @@ -22,7 +22,6 @@ #include "starboard/common/log.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/file.h" #include "starboard/memory.h" diff --git a/base/files/file_util_starboard.cc b/base/files/file_util_starboard.cc index bcec62a16ed..a86848f4dde 100644 --- a/base/files/file_util_starboard.cc +++ b/base/files/file_util_starboard.cc @@ -35,7 +35,6 @@ #include "base/time/time.h" #include "starboard/configuration_constants.h" #include "starboard/common/file.h" -#include "starboard/directory.h" #include "base/strings/strcat.h" #include "starboard/system.h" diff --git a/chrome/updater/utils_test.cc b/chrome/updater/utils_test.cc index 3e9f7ea12af..c9b2b1015db 100644 --- a/chrome/updater/utils_test.cc +++ b/chrome/updater/utils_test.cc @@ -24,7 +24,6 @@ #include "base/strings/strcat.h" #include "base/values.h" #include "gmock/gmock.h" -#include "starboard/directory.h" #include "starboard/extension/installation_manager.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cobalt/browser/splash_screen_cache.cc b/cobalt/browser/splash_screen_cache.cc index 309d1a31c07..91cde37ecca 100644 --- a/cobalt/browser/splash_screen_cache.cc +++ b/cobalt/browser/splash_screen_cache.cc @@ -30,7 +30,6 @@ #include "cobalt/base/get_application_key.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" namespace cobalt { namespace browser { diff --git a/cobalt/cache/memory_capped_directory.cc b/cobalt/cache/memory_capped_directory.cc index 9724e31f18b..ff212483f61 100644 --- a/cobalt/cache/memory_capped_directory.cc +++ b/cobalt/cache/memory_capped_directory.cc @@ -23,7 +23,6 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/strings/string_number_conversions.h" -#include "starboard/directory.h" namespace cobalt { namespace cache { diff --git a/cobalt/media/sandbox/fuzzer_app.cc b/cobalt/media/sandbox/fuzzer_app.cc index e1234bd08c9..1411c50c78a 100644 --- a/cobalt/media/sandbox/fuzzer_app.cc +++ b/cobalt/media/sandbox/fuzzer_app.cc @@ -19,7 +19,6 @@ #include "base/files/file_util.h" #include "base/logging.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" namespace cobalt { namespace media { diff --git a/net/cert/internal/trust_store_in_memory_starboard.cc b/net/cert/internal/trust_store_in_memory_starboard.cc index 1bc400f5ce5..ffb99935977 100644 --- a/net/cert/internal/trust_store_in_memory_starboard.cc +++ b/net/cert/internal/trust_store_in_memory_starboard.cc @@ -27,7 +27,6 @@ #include "net/cert/x509_util.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/file.h" #include "starboard/string.h" #include "third_party/boringssl/src/include/openssl/digest.h" diff --git a/net/third_party/quiche/src/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.cc b/net/third_party/quiche/src/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.cc index bcdc306de5b..d6d62111054 100644 --- a/net/third_party/quiche/src/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.cc +++ b/net/third_party/quiche/src/quiche/common/platform/default/quiche_platform_impl/quiche_file_utils_impl.cc @@ -12,7 +12,6 @@ #include #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #elif defined(_WIN32) #include #else diff --git a/starboard/android/shared/android_main.cc b/starboard/android/shared/android_main.cc index 011611739aa..5f31391c39f 100644 --- a/starboard/android/shared/android_main.cc +++ b/starboard/android/shared/android_main.cc @@ -27,7 +27,6 @@ #include "starboard/common/semaphore.h" #include "starboard/common/string.h" #if SB_IS(EVERGREEN_COMPATIBLE) -#include "starboard/directory.h" #include "starboard/file.h" #endif #include "starboard/event.h" diff --git a/starboard/android/shared/posix_emu/file.cc b/starboard/android/shared/posix_emu/file.cc index 6f876e5856d..f16313a0022 100644 --- a/starboard/android/shared/posix_emu/file.cc +++ b/starboard/android/shared/posix_emu/file.cc @@ -20,7 +20,6 @@ #include "starboard/android/shared/file_internal.h" #include "starboard/common/log.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/log.h" using starboard::android::shared::AssetManager; diff --git a/starboard/android/shared/posix_emu/stat.cc b/starboard/android/shared/posix_emu/stat.cc index 3ed8a9acf5b..55bcfc555b8 100644 --- a/starboard/android/shared/posix_emu/stat.cc +++ b/starboard/android/shared/posix_emu/stat.cc @@ -20,7 +20,6 @@ #include "starboard/android/shared/file_internal.h" #include "starboard/common/log.h" -#include "starboard/directory.h" using starboard::android::shared::IsAndroidAssetPath; using starboard::android::shared::OpenAndroidAsset; diff --git a/starboard/android/shared/system_get_path.cc b/starboard/android/shared/system_get_path.cc index 139318d0c7f..379cf1f8123 100644 --- a/starboard/android/shared/system_get_path.cc +++ b/starboard/android/shared/system_get_path.cc @@ -23,7 +23,6 @@ #include "starboard/android/shared/file_internal.h" #include "starboard/common/log.h" #include "starboard/common/string.h" -#include "starboard/directory.h" #if SB_IS(EVERGREEN_COMPATIBLE) #include "starboard/elf_loader/evergreen_config.h" // nogncheck diff --git a/starboard/common/file.cc b/starboard/common/file.cc index 4e5b30608c5..1e69315c8fd 100644 --- a/starboard/common/file.cc +++ b/starboard/common/file.cc @@ -27,7 +27,6 @@ #include "starboard/common/metrics/stats_tracker.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/file.h" #include "starboard/shared/starboard/file_atomic_replace_write_file.h" #include "starboard/string.h" diff --git a/starboard/directory.h b/starboard/directory.h deleted file mode 100644 index c5b5af9250d..00000000000 --- a/starboard/directory.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard Directory module -// -// Provides directory listing functions. - -#ifndef STARBOARD_DIRECTORY_H_ -#define STARBOARD_DIRECTORY_H_ - -#include "starboard/configuration.h" -#include "starboard/export.h" -#include "starboard/file.h" -#include "starboard/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Private structure representing an open directory stream. -struct SbDirectoryPrivate; - -// A handle to an open directory stream. -typedef struct SbDirectoryPrivate* SbDirectory; - -// Well-defined value for an invalid directory stream handle. -#define kSbDirectoryInvalid ((SbDirectory)NULL) - -// Returns whether the given directory stream handle is valid. -static inline bool SbDirectoryIsValid(SbDirectory directory) { - return directory != kSbDirectoryInvalid; -} - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // STARBOARD_DIRECTORY_H_ diff --git a/starboard/elf_loader/exported_symbols.cc b/starboard/elf_loader/exported_symbols.cc index 0d85b766298..d90b5e77754 100644 --- a/starboard/elf_loader/exported_symbols.cc +++ b/starboard/elf_loader/exported_symbols.cc @@ -33,7 +33,6 @@ #include "starboard/configuration_constants.h" #include "starboard/cpu_features.h" #include "starboard/decode_target.h" -#include "starboard/directory.h" #include "starboard/egl.h" #include "starboard/event.h" #include "starboard/file.h" diff --git a/starboard/linux/shared/system_get_path.cc b/starboard/linux/shared/system_get_path.cc index 4d0e125e28f..1d075a378aa 100644 --- a/starboard/linux/shared/system_get_path.cc +++ b/starboard/linux/shared/system_get_path.cc @@ -25,7 +25,6 @@ #include "starboard/common/log.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #if SB_IS(EVERGREEN_COMPATIBLE) #include "starboard/elf_loader/evergreen_config.h" #endif diff --git a/starboard/loader_app/app_key_files.cc b/starboard/loader_app/app_key_files.cc index 2fd2776309d..566f70bf342 100644 --- a/starboard/loader_app/app_key_files.cc +++ b/starboard/loader_app/app_key_files.cc @@ -23,7 +23,6 @@ #include "starboard/common/log.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/string.h" namespace starboard { diff --git a/starboard/loader_app/drain_file.cc b/starboard/loader_app/drain_file.cc index be45051d9d1..3ca60e64049 100644 --- a/starboard/loader_app/drain_file.cc +++ b/starboard/loader_app/drain_file.cc @@ -28,7 +28,6 @@ #include "starboard/common/string.h" #include "starboard/common/time.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/string.h" #ifdef __cplusplus diff --git a/starboard/loader_app/drain_file_test.cc b/starboard/loader_app/drain_file_test.cc index 680cc355400..b6948fae8de 100644 --- a/starboard/loader_app/drain_file_test.cc +++ b/starboard/loader_app/drain_file_test.cc @@ -24,7 +24,6 @@ #include "starboard/common/string.h" #include "starboard/common/time.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/loader_app/drain_file_helper.h" #include "starboard/system.h" #include "starboard/types.h" diff --git a/starboard/loader_app/installation_manager.cc b/starboard/loader_app/installation_manager.cc index 73ef2cf2f3b..47bc5f2026e 100644 --- a/starboard/loader_app/installation_manager.cc +++ b/starboard/loader_app/installation_manager.cc @@ -28,8 +28,8 @@ #include "starboard/common/mutex.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/extension/loader_app_metrics.h" +#include "starboard/file.h" #include "starboard/loader_app/installation_store.pb.h" #if !SB_IS(EVERGREEN_COMPATIBLE_LITE) #include "starboard/loader_app/pending_restart.h" // nogncheck diff --git a/starboard/loader_app/reset_evergreen_update_test.cc b/starboard/loader_app/reset_evergreen_update_test.cc index 3f922d60a71..d5b99ba6b36 100644 --- a/starboard/loader_app/reset_evergreen_update_test.cc +++ b/starboard/loader_app/reset_evergreen_update_test.cc @@ -20,7 +20,6 @@ #include #include "starboard/common/file.h" -#include "starboard/directory.h" #include "testing/gtest/include/gtest/gtest.h" #if SB_IS(EVERGREEN_COMPATIBLE) diff --git a/starboard/loader_app/slot_management_test.cc b/starboard/loader_app/slot_management_test.cc index 8b98ed9c22d..1e784a47ae3 100644 --- a/starboard/loader_app/slot_management_test.cc +++ b/starboard/loader_app/slot_management_test.cc @@ -26,7 +26,6 @@ #include "gmock/gmock.h" #include "starboard/common/file.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/elf_loader/sabi_string.h" #include "starboard/event.h" #include "starboard/file.h" diff --git a/starboard/nplb/extern_c_test.cc b/starboard/nplb/extern_c_test.cc index 09b5fc655e3..b508123e8ae 100644 --- a/starboard/nplb/extern_c_test.cc +++ b/starboard/nplb/extern_c_test.cc @@ -21,7 +21,6 @@ extern "C" { #include "starboard/configuration.h" #include "starboard/cpu_features.h" #include "starboard/decode_target.h" -#include "starboard/directory.h" #include "starboard/drm.h" #include "starboard/egl.h" #include "starboard/event.h" diff --git a/starboard/nplb/file_delete_recursive_test.cc b/starboard/nplb/file_delete_recursive_test.cc index 3ed6d0e6979..b98ffd0e221 100644 --- a/starboard/nplb/file_delete_recursive_test.cc +++ b/starboard/nplb/file_delete_recursive_test.cc @@ -18,7 +18,6 @@ #include "starboard/common/file.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/file.h" #include "starboard/nplb/file_helpers.h" #include "starboard/types.h" diff --git a/starboard/nplb/file_helpers.cc b/starboard/nplb/file_helpers.cc index 5f979f995ae..1e0170cc291 100644 --- a/starboard/nplb/file_helpers.cc +++ b/starboard/nplb/file_helpers.cc @@ -25,7 +25,6 @@ #include "starboard/common/file.h" #include "starboard/common/log.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/include_all.c b/starboard/nplb/include_all.c index 1f2c7879367..c3dc7c762be 100644 --- a/starboard/nplb/include_all.c +++ b/starboard/nplb/include_all.c @@ -20,7 +20,6 @@ #include "starboard/configuration.h" #include "starboard/cpu_features.h" #include "starboard/decode_target.h" -#include "starboard/directory.h" #include "starboard/drm.h" #include "starboard/egl.h" #include "starboard/event.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_can_open_test.cc b/starboard/nplb/posix_compliance/posix_directory_can_open_test.cc index 56479d1d923..8ea822a148e 100644 --- a/starboard/nplb/posix_compliance/posix_directory_can_open_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_can_open_test.cc @@ -17,7 +17,6 @@ #include #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/nplb/file_helpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_create_test.cc b/starboard/nplb/posix_compliance/posix_directory_create_test.cc index b4b4b31de85..fc68314353b 100644 --- a/starboard/nplb/posix_compliance/posix_directory_create_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_create_test.cc @@ -15,7 +15,6 @@ #include #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/file.h" #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc b/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc index 43c39b25d47..1cfa0a8c129 100644 --- a/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc @@ -21,7 +21,6 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/file.h" #include "starboard/nplb/file_helpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_open_test.cc b/starboard/nplb/posix_compliance/posix_directory_open_test.cc index d979dbcb4a0..1941fd2e54f 100644 --- a/starboard/nplb/posix_compliance/posix_directory_open_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_open_test.cc @@ -17,7 +17,6 @@ #include #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/file.h" #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" diff --git a/starboard/nplb/posix_compliance/posix_file_delete_test.cc b/starboard/nplb/posix_compliance/posix_file_delete_test.cc index 9b9db4ae01d..9bc24328de8 100644 --- a/starboard/nplb/posix_compliance/posix_file_delete_test.cc +++ b/starboard/nplb/posix_compliance/posix_file_delete_test.cc @@ -18,7 +18,6 @@ #include -#include "starboard/directory.h" #include "starboard/file.h" #include "starboard/nplb/file_helpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/system_get_path_test.cc b/starboard/nplb/system_get_path_test.cc index 002d515e89f..93f22f1a084 100644 --- a/starboard/nplb/system_get_path_test.cc +++ b/starboard/nplb/system_get_path_test.cc @@ -23,7 +23,6 @@ #include "starboard/common/string.h" #include "starboard/common/time.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/memory.h" #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" diff --git a/starboard/shared/linux/dev_input/dev_input.cc b/starboard/shared/linux/dev_input/dev_input.cc index 6d8aa048424..595453edb30 100644 --- a/starboard/shared/linux/dev_input/dev_input.cc +++ b/starboard/shared/linux/dev_input/dev_input.cc @@ -38,7 +38,6 @@ #include "starboard/common/string.h" #include "starboard/configuration.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/input.h" #include "starboard/key.h" #include "starboard/memory.h" diff --git a/starboard/shared/starboard/player/file_cache_reader.cc b/starboard/shared/starboard/player/file_cache_reader.cc index bce8ddec522..86b14163b9a 100644 --- a/starboard/shared/starboard/player/file_cache_reader.cc +++ b/starboard/shared/starboard/player/file_cache_reader.cc @@ -20,7 +20,6 @@ #include "starboard/common/log.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" namespace starboard { namespace shared { diff --git a/starboard/shared/starboard/player/filter/testing/test_util.cc b/starboard/shared/starboard/player/filter/testing/test_util.cc index 3cc4bf5078e..7c5a9288bfe 100644 --- a/starboard/shared/starboard/player/filter/testing/test_util.cc +++ b/starboard/shared/starboard/player/filter/testing/test_util.cc @@ -18,7 +18,6 @@ #include "starboard/audio_sink.h" #include "starboard/common/log.h" -#include "starboard/directory.h" #include "starboard/extension/enhanced_audio.h" #include "starboard/shared/starboard/media/media_support_internal.h" #include "starboard/shared/starboard/media/mime_type.h" diff --git a/third_party/crashpad/crashpad/wrapper/wrapper.cc b/third_party/crashpad/crashpad/wrapper/wrapper.cc index 9b8dc7d88ec..55d143cf7ea 100644 --- a/third_party/crashpad/crashpad/wrapper/wrapper.cc +++ b/third_party/crashpad/crashpad/wrapper/wrapper.cc @@ -27,7 +27,6 @@ #include "client/settings.h" #include "starboard/common/system_property.h" #include "starboard/configuration_constants.h" -#include "starboard/directory.h" #include "starboard/extension/loader_app_metrics.h" #include "starboard/file.h" #include "starboard/system.h" diff --git a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h index 13c2809c851..5f348f5b8e0 100644 --- a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h +++ b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h @@ -273,7 +273,6 @@ #include "starboard/common/log.h" #include "starboard/common/spin_lock.h" #include "starboard/common/string.h" -#include "starboard/directory.h" #include "starboard/file.h" #include "starboard/log.h" #include "starboard/memory.h" From f4c3388758268b1174cf1232a7288a99e745f944 Mon Sep 17 00:00:00 2001 From: Madhura Jayaraman Date: Wed, 11 Sep 2024 16:15:48 -0700 Subject: [PATCH 3/7] Delete mutex header file Change-Id: I18bc08316e75b892eef66a34e452e6bf67a8ce69 --- starboard/elf_loader/exported_symbols.cc | 1 - starboard/mutex.h | 113 ------------------ starboard/nplb/extern_c_test.cc | 1 - starboard/nplb/include_all.c | 1 - .../shared/widevine/drm_system_widevine.h | 1 - .../boringssl/src/include/openssl/thread.h | 1 - .../include/gtest/internal/gtest-port.h | 1 - 7 files changed, 119 deletions(-) delete mode 100644 starboard/mutex.h diff --git a/starboard/elf_loader/exported_symbols.cc b/starboard/elf_loader/exported_symbols.cc index d90b5e77754..96033ea389a 100644 --- a/starboard/elf_loader/exported_symbols.cc +++ b/starboard/elf_loader/exported_symbols.cc @@ -40,7 +40,6 @@ #include "starboard/log.h" #include "starboard/memory.h" #include "starboard/microphone.h" -#include "starboard/mutex.h" #include "starboard/player.h" #if SB_API_VERSION >= 16 #include "starboard/shared/modular/starboard_layer_posix_directory_abi_wrappers.h" diff --git a/starboard/mutex.h b/starboard/mutex.h deleted file mode 100644 index c7dbcd81024..00000000000 --- a/starboard/mutex.h +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard Mutex module -// -// Defines a mutually exclusive lock that can be used to coordinate with other -// threads. - -#ifndef STARBOARD_MUTEX_H_ -#define STARBOARD_MUTEX_H_ - -#if SB_API_VERSION < 16 - -#include "starboard/configuration.h" -#include "starboard/export.h" -#include "starboard/thread.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Max size of the SbMutex type. -#define SB_MUTEX_MAX_SIZE 80 - -// An opaque handle to a mutex type with reserved memory -// buffer of size SB_MUTEX_MAX_SIZE and aligned at void -// pointer type. -typedef union SbMutex { - // Reserved memory in which the implementation should map its - // native mutex type. - uint8_t mutex_buffer[SB_MUTEX_MAX_SIZE]; - - // Guarantees alignment of the type to a void pointer. - void* ptr; -} SbMutex; - -#ifdef __cplusplus -#define SB_MUTEX_INITIALIZER \ - {} -#else -#define SB_MUTEX_INITIALIZER {0} -#endif - -// Enumeration of possible results from acquiring a mutex. -typedef enum SbMutexResult { - // The mutex was acquired successfully. - kSbMutexAcquired, - - // The mutex was not acquired because it was held by someone else. - kSbMutexBusy, - - // The mutex has already been destroyed. - kSbMutexDestroyed, -} SbMutexResult; - -// Indicates whether the given result is a success. A value of |true| indicates -// that the mutex was acquired. -// -// |result|: The result being checked. -static SB_C_FORCE_INLINE bool SbMutexIsSuccess(SbMutexResult result) { - return result == kSbMutexAcquired; -} - -// Creates a new mutex. The return value indicates whether the function -// was able to create a new mutex. -// -// |out_mutex|: The handle to the newly created mutex. -SB_EXPORT bool SbMutexCreate(SbMutex* out_mutex); - -// Destroys a mutex. The return value indicates whether the destruction was -// successful. Destroying a locked mutex results in undefined behavior. -// -// |mutex|: The mutex to be invalidated. -SB_EXPORT bool SbMutexDestroy(SbMutex* mutex); - -// Acquires |mutex|, blocking indefinitely. The return value identifies -// the acquisition result. SbMutexes are not reentrant, so a recursive -// acquisition blocks forever. -// -// |mutex|: The mutex to be acquired. -SB_EXPORT SbMutexResult SbMutexAcquire(SbMutex* mutex); - -// Acquires |mutex|, without blocking. The return value identifies -// the acquisition result. SbMutexes are not reentrant, so a recursive -// acquisition has undefined behavior. -// -// |mutex|: The mutex to be acquired. -SB_EXPORT SbMutexResult SbMutexAcquireTry(SbMutex* mutex); - -// Releases |mutex| held by the current thread. The return value indicates -// whether the release was successful. Releases should always be successful -// if |mutex| is held by the current thread. -// -// |mutex|: The mutex to be released. -SB_EXPORT bool SbMutexRelease(SbMutex* mutex); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // SB_API_VERSION < 16 -#endif // STARBOARD_MUTEX_H_ diff --git a/starboard/nplb/extern_c_test.cc b/starboard/nplb/extern_c_test.cc index b508123e8ae..e26ff6edf52 100644 --- a/starboard/nplb/extern_c_test.cc +++ b/starboard/nplb/extern_c_test.cc @@ -33,7 +33,6 @@ extern "C" { #include "starboard/media.h" #include "starboard/memory.h" #include "starboard/microphone.h" -#include "starboard/mutex.h" #include "starboard/player.h" #include "starboard/socket.h" #include "starboard/socket_waiter.h" diff --git a/starboard/nplb/include_all.c b/starboard/nplb/include_all.c index c3dc7c762be..7ce8ac34148 100644 --- a/starboard/nplb/include_all.c +++ b/starboard/nplb/include_all.c @@ -32,7 +32,6 @@ #include "starboard/media.h" #include "starboard/memory.h" #include "starboard/microphone.h" -#include "starboard/mutex.h" #include "starboard/player.h" #include "starboard/socket.h" #include "starboard/socket_waiter.h" diff --git a/starboard/shared/widevine/drm_system_widevine.h b/starboard/shared/widevine/drm_system_widevine.h index 257de6558cf..c72f5c53797 100644 --- a/starboard/shared/widevine/drm_system_widevine.h +++ b/starboard/shared/widevine/drm_system_widevine.h @@ -24,7 +24,6 @@ #include "starboard/common/mutex.h" #include "starboard/common/optional.h" -#include "starboard/mutex.h" #include "starboard/shared/starboard/drm/drm_system_internal.h" #include "starboard/shared/starboard/thread_checker.h" #include "starboard/thread.h" diff --git a/third_party/boringssl/src/include/openssl/thread.h b/third_party/boringssl/src/include/openssl/thread.h index f954ce6337a..68e4d2294e8 100644 --- a/third_party/boringssl/src/include/openssl/thread.h +++ b/third_party/boringssl/src/include/openssl/thread.h @@ -64,7 +64,6 @@ #ifdef STARBOARD #include "starboard/atomic.h" #include "starboard/condition_variable.h" -#include "starboard/mutex.h" #endif #if defined(__cplusplus) diff --git a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h index 5f348f5b8e0..db8d516f9a4 100644 --- a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h +++ b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h @@ -276,7 +276,6 @@ #include "starboard/file.h" #include "starboard/log.h" #include "starboard/memory.h" -#include "starboard/mutex.h" #include "starboard/system.h" #include "starboard/thread.h" #include "starboard/types.h" From c8a82279b392efd288398ec105e9de4236fe318c Mon Sep 17 00:00:00 2001 From: Madhura Jayaraman Date: Wed, 11 Sep 2024 16:56:10 -0700 Subject: [PATCH 4/7] Delete string and condition_variable header file Change-Id: Ie2937724c9b94cd6729f2e9fc2ca53194c3a0374 --- chrome/updater/util.cc | 1 - .../memory_settings/pretty_print_test.cc | 1 - .../memory_settings/table_printer_test.cc | 1 - cobalt/configuration/configuration.cc | 1 - cobalt/debug/console/command_manager.cc | 1 - cobalt/network/dial/dial_system_config.cc | 2 +- cobalt/renderer/backend/graphics_context.cc | 1 - .../skia/skia/src/ports/SkFontMgr_cobalt.cc | 1 - .../trust_store_in_memory_starboard.cc | 2 +- .../android/shared/media_is_supported.cc | 1 - starboard/android/shared/player_create.cc | 1 - .../player_get_preferred_output_mode.cc | 1 - starboard/android/shared/video_decoder.cc | 2 +- starboard/common/condition_variable.h | 1 - .../common/experimental/concurrency_debug.h | 1 - starboard/common/file.cc | 1 - starboard/common/string.h | 2 +- starboard/condition_variable.h | 128 ------------ starboard/elf_loader/dynamic_section_test.cc | 1 - starboard/elf_loader/elf_hash_table.cc | 2 - starboard/elf_loader/elf_loader_impl.cc | 2 +- starboard/elf_loader/elf_loader_sandbox.cc | 2 +- starboard/elf_loader/evergreen_config.cc | 1 - starboard/elf_loader/exported_symbols.cc | 3 +- starboard/elf_loader/gnu_hash_table.cc | 1 - starboard/elf_loader/lz4_file_impl_test.cc | 2 +- starboard/elf_loader/program_table.cc | 1 - starboard/elf_loader/relocations_test.cc | 2 +- starboard/elf_loader/sabi_string.cc | 1 - starboard/loader_app/app_key_files.cc | 1 - starboard/loader_app/app_key_test.cc | 1 - starboard/loader_app/drain_file.cc | 1 - starboard/loader_app/installation_manager.cc | 1 - starboard/loader_app/loader_app.cc | 2 +- starboard/loader_app/slot_management.cc | 2 +- .../loader_app/system_get_extension_shim.cc | 2 +- starboard/nplb/extern_c_test.cc | 3 +- starboard/nplb/include_all.c | 3 +- .../player_get_audio_configuration_test.cc | 2 +- starboard/nplb/player_get_media_time_test.cc | 2 +- starboard/nplb/player_write_sample_test.cc | 2 +- .../shared/libde265/de265_video_decoder.cc | 2 +- .../shared/media_session/playback_state.cc | 2 +- .../player/filter/testing/test_util.cc | 2 +- starboard/string.h | 185 ------------------ .../config/starboard/openssl/opensslconf.h | 2 +- .../boringssl/src/crypto/cpu-starboard.c | 1 - .../boringssl/src/include/openssl/thread.h | 1 - .../src/include/freetype/config/ftstdlib.h | 2 +- third_party/libxml/starboard/config.h | 2 +- third_party/zlib/arm_features.c | 2 +- 51 files changed, 24 insertions(+), 366 deletions(-) delete mode 100644 starboard/condition_variable.h delete mode 100644 starboard/string.h diff --git a/chrome/updater/util.cc b/chrome/updater/util.cc index 164c1a9af22..c5cab5294c9 100644 --- a/chrome/updater/util.cc +++ b/chrome/updater/util.cc @@ -24,7 +24,6 @@ #include "starboard/configuration_constants.h" #include "starboard/extension/installation_manager.h" #include "starboard/file.h" -#include "starboard/string.h" #include "starboard/system.h" #define PRODUCT_FULLNAME_STRING "cobalt_updater" diff --git a/cobalt/browser/memory_settings/pretty_print_test.cc b/cobalt/browser/memory_settings/pretty_print_test.cc index 88b85d2f42b..5dfaaab4db7 100644 --- a/cobalt/browser/memory_settings/pretty_print_test.cc +++ b/cobalt/browser/memory_settings/pretty_print_test.cc @@ -28,7 +28,6 @@ #include "cobalt/browser/memory_settings/test_common.h" #include "cobalt/browser/switches.h" #include "starboard/memory.h" -#include "starboard/string.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cobalt/browser/memory_settings/table_printer_test.cc b/cobalt/browser/memory_settings/table_printer_test.cc index 11cc2147ac7..c2141ebdab3 100644 --- a/cobalt/browser/memory_settings/table_printer_test.cc +++ b/cobalt/browser/memory_settings/table_printer_test.cc @@ -17,7 +17,6 @@ #include "cobalt/browser/memory_settings/table_printer.h" #include "base/logging.h" -#include "starboard/string.h" #include "testing/gtest/include/gtest/gtest.h" namespace cobalt { diff --git a/cobalt/configuration/configuration.cc b/cobalt/configuration/configuration.cc index c37e6d3229d..742334e1140 100644 --- a/cobalt/configuration/configuration.cc +++ b/cobalt/configuration/configuration.cc @@ -19,7 +19,6 @@ #include "base/logging.h" #include "base/memory/singleton.h" #include "starboard/common/configuration_defaults.h" -#include "starboard/string.h" #include "starboard/system.h" namespace cobalt { diff --git a/cobalt/debug/console/command_manager.cc b/cobalt/debug/console/command_manager.cc index 565091b1f5f..bf9bfec64ad 100644 --- a/cobalt/debug/console/command_manager.cc +++ b/cobalt/debug/console/command_manager.cc @@ -17,7 +17,6 @@ #include #include "base/logging.h" -#include "starboard/string.h" namespace cobalt { namespace debug { diff --git a/cobalt/network/dial/dial_system_config.cc b/cobalt/network/dial/dial_system_config.cc index f37d86436a8..9471f44ded8 100644 --- a/cobalt/network/dial/dial_system_config.cc +++ b/cobalt/network/dial/dial_system_config.cc @@ -25,7 +25,7 @@ #include "net/base/net_string_util.h" #if defined(STARBOARD) -#include "starboard/string.h" + #include "starboard/types.h" #endif diff --git a/cobalt/renderer/backend/graphics_context.cc b/cobalt/renderer/backend/graphics_context.cc index 013d9e20827..c8f70fcea59 100644 --- a/cobalt/renderer/backend/graphics_context.cc +++ b/cobalt/renderer/backend/graphics_context.cc @@ -18,7 +18,6 @@ #include "base/logging.h" #include "starboard/gles.h" -#include "starboard/string.h" namespace cobalt { namespace renderer { diff --git a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.cc b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.cc index d5cec3ec14c..ede3ad3f623 100644 --- a/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.cc +++ b/cobalt/renderer/rasterizer/skia/skia/src/ports/SkFontMgr_cobalt.cc @@ -33,7 +33,6 @@ #include "cobalt/renderer/rasterizer/skia/skia/src/ports/SkFreeType_cobalt.h" #include "cobalt/renderer/rasterizer/skia/skia/src/ports/SkTypeface_cobalt.h" #include "starboard/extension/font.h" -#include "starboard/string.h" #include "third_party/icu/source/common/unicode/locid.h" const char* ROBOTO_SCRIPT = "latn"; diff --git a/net/cert/internal/trust_store_in_memory_starboard.cc b/net/cert/internal/trust_store_in_memory_starboard.cc index ffb99935977..734a8f7901e 100644 --- a/net/cert/internal/trust_store_in_memory_starboard.cc +++ b/net/cert/internal/trust_store_in_memory_starboard.cc @@ -28,7 +28,7 @@ #include "starboard/common/string.h" #include "starboard/configuration_constants.h" #include "starboard/file.h" -#include "starboard/string.h" + #include "third_party/boringssl/src/include/openssl/digest.h" #include "third_party/boringssl/src/include/openssl/sha.h" #include "third_party/boringssl/src/include/openssl/x509.h" diff --git a/starboard/android/shared/media_is_supported.cc b/starboard/android/shared/media_is_supported.cc index c27e0d235e1..04acefb035b 100644 --- a/starboard/android/shared/media_is_supported.cc +++ b/starboard/android/shared/media_is_supported.cc @@ -20,7 +20,6 @@ #include "starboard/android/shared/media_common.h" #include "starboard/media.h" #include "starboard/shared/starboard/media/mime_type.h" -#include "starboard/string.h" bool SbMediaIsSupported(SbMediaVideoCodec video_codec, SbMediaAudioCodec audio_codec, diff --git a/starboard/android/shared/player_create.cc b/starboard/android/shared/player_create.cc index 78b4ba46f25..b51203e6a58 100644 --- a/starboard/android/shared/player_create.cc +++ b/starboard/android/shared/player_create.cc @@ -27,7 +27,6 @@ #include "starboard/shared/starboard/player/filter/filter_based_player_worker_handler.h" #include "starboard/shared/starboard/player/player_internal.h" #include "starboard/shared/starboard/player/player_worker.h" -#include "starboard/string.h" using starboard::shared::starboard::player::PlayerWorker; using starboard::shared::starboard::player::filter:: diff --git a/starboard/android/shared/player_get_preferred_output_mode.cc b/starboard/android/shared/player_get_preferred_output_mode.cc index 185f8e1bd3d..65fbfc08f0e 100644 --- a/starboard/android/shared/player_get_preferred_output_mode.cc +++ b/starboard/android/shared/player_get_preferred_output_mode.cc @@ -19,7 +19,6 @@ #include "starboard/configuration.h" #include "starboard/shared/starboard/media/media_util.h" #include "starboard/shared/starboard/player/filter/player_components.h" -#include "starboard/string.h" SbPlayerOutputMode SbPlayerGetPreferredOutputMode( const SbPlayerCreationParam* creation_param) { diff --git a/starboard/android/shared/video_decoder.cc b/starboard/android/shared/video_decoder.cc index 48527d2c635..3593f878d2b 100644 --- a/starboard/android/shared/video_decoder.cc +++ b/starboard/android/shared/video_decoder.cc @@ -36,7 +36,7 @@ #include "starboard/memory.h" #include "starboard/shared/starboard/media/mime_type.h" #include "starboard/shared/starboard/player/filter/video_frame_internal.h" -#include "starboard/string.h" + #include "starboard/thread.h" namespace starboard { diff --git a/starboard/common/condition_variable.h b/starboard/common/condition_variable.h index c7db1264f3f..ac533379a0e 100644 --- a/starboard/common/condition_variable.h +++ b/starboard/common/condition_variable.h @@ -23,7 +23,6 @@ #include #include "starboard/common/mutex.h" -#include "starboard/condition_variable.h" #include "starboard/configuration.h" #include "starboard/types.h" diff --git a/starboard/common/experimental/concurrency_debug.h b/starboard/common/experimental/concurrency_debug.h index f07e2b2708f..8b0379ee630 100644 --- a/starboard/common/experimental/concurrency_debug.h +++ b/starboard/common/experimental/concurrency_debug.h @@ -22,7 +22,6 @@ #include "starboard/common/log.h" #include "starboard/common/time.h" #include "starboard/configuration_constants.h" -#include "starboard/mutex.h" #include "starboard/thread.h" // WARNING: Features inside experimental namespace is strictly experimental and diff --git a/starboard/common/file.cc b/starboard/common/file.cc index 1e69315c8fd..d44f550fae2 100644 --- a/starboard/common/file.cc +++ b/starboard/common/file.cc @@ -29,7 +29,6 @@ #include "starboard/configuration_constants.h" #include "starboard/file.h" #include "starboard/shared/starboard/file_atomic_replace_write_file.h" -#include "starboard/string.h" namespace starboard { namespace { diff --git a/starboard/common/string.h b/starboard/common/string.h index 49e6a1bbe7f..24f8192c9a0 100644 --- a/starboard/common/string.h +++ b/starboard/common/string.h @@ -28,7 +28,7 @@ #include #include "starboard/configuration.h" -#include "starboard/string.h" +#include "starboard/types.h" namespace starboard { diff --git a/starboard/condition_variable.h b/starboard/condition_variable.h deleted file mode 100644 index b14f08be9f9..00000000000 --- a/starboard/condition_variable.h +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard Condition Variable module -// -// Defines an interface for condition variables. - -#ifndef STARBOARD_CONDITION_VARIABLE_H_ -#define STARBOARD_CONDITION_VARIABLE_H_ - -#include "starboard/configuration.h" - -#if SB_API_VERSION < 16 - -#include "starboard/export.h" -#include "starboard/mutex.h" -#include "starboard/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// Max size of the SbConditionVariable type. -#define SB_CONDITION_VARIABLE_MAX_SIZE 80 - -// An opaque handle to a condition variable type with -// reserved memory buffer of size SB_CONDITION_VARIABLE_MAX_SIZE and -// aligned at void pointer type. -typedef union SbConditionVariable { - // Reserved memory in which the implementation should map its - // native condition variable type. - uint8_t condition_buffer[SB_CONDITION_VARIABLE_MAX_SIZE]; - - // Guarantees alignment of the type to a void pointer. - void* ptr; -} SbConditionVariable; - -#ifdef __cplusplus -#define SB_CONDITION_VARIABLE_INITIALIZER \ - {} -#else -#define SB_CONDITION_VARIABLE_INITIALIZER {0} -#endif - -// Enumeration of possible results from waiting on a condvar. -typedef enum SbConditionVariableResult { - // The wait completed because the condition variable was signaled. - kSbConditionVariableSignaled, - - // The wait completed because it timed out, and was not signaled. - kSbConditionVariableTimedOut, - - // The wait failed, either because a parameter wasn't valid, or the condition - // variable has already been destroyed, or something similar. - kSbConditionVariableFailed, -} SbConditionVariableResult; - -// Returns whether the given result is a success. -static inline bool SbConditionVariableIsSignaled( - SbConditionVariableResult result) { - return result == kSbConditionVariableSignaled; -} - -// Creates a new condition variable to work with |opt_mutex|, which may be null, -// placing the newly created condition variable in |out_condition|. -// -// The return value indicates whether the condition variable could be created. -SB_EXPORT bool SbConditionVariableCreate(SbConditionVariable* out_condition, - SbMutex* opt_mutex); - -// Destroys the specified SbConditionVariable. The return value indicates -// whether the destruction was successful. The behavior is undefined if other -// threads are currently waiting on this condition variable. -// -// |condition|: The SbConditionVariable to be destroyed. This invalidates the -// condition variable. -SB_EXPORT bool SbConditionVariableDestroy(SbConditionVariable* condition); - -// Waits for |condition|, releasing the held lock |mutex|, blocking -// indefinitely, and returning the result. Behavior is undefined if |mutex| is -// not held. -SB_EXPORT SbConditionVariableResult -SbConditionVariableWait(SbConditionVariable* condition, SbMutex* mutex); - -// Waits for |condition|, releasing the held lock |mutex|, blocking up to -// |timeout_duration|, and returning the acquisition result. Behavior is -// undefined if |mutex| is not held. -// -// |timeout_duration|: The maximum amount of time that function should wait -// for |condition|, in microseconds. If the |timeout_duration| value is less -// than or equal to zero, the function returns as quickly as possible with a -// kSbConditionVariableTimedOut result. -SB_EXPORT SbConditionVariableResult -SbConditionVariableWaitTimed(SbConditionVariable* condition, - SbMutex* mutex, - int64_t timeout_duration); - -// Broadcasts to all current waiters of |condition| to stop waiting. This -// function wakes all of the threads waiting on |condition| while -// SbConditionVariableSignal wakes a single thread. -// -// |condition|: The condition that should no longer be waited for. -SB_EXPORT bool SbConditionVariableBroadcast(SbConditionVariable* condition); - -// Signals the next waiter of |condition| to stop waiting. This function wakes -// a single thread waiting on |condition| while SbConditionVariableBroadcast -// wakes all threads waiting on it. -// -// |condition|: The condition that the waiter should stop waiting for. -SB_EXPORT bool SbConditionVariableSignal(SbConditionVariable* condition); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // SB_API_VERSION < 16 -#endif // STARBOARD_CONDITION_VARIABLE_H_ diff --git a/starboard/elf_loader/dynamic_section_test.cc b/starboard/elf_loader/dynamic_section_test.cc index e0483cd6927..c61107ca9ec 100644 --- a/starboard/elf_loader/dynamic_section_test.cc +++ b/starboard/elf_loader/dynamic_section_test.cc @@ -14,7 +14,6 @@ #include "starboard/elf_loader/dynamic_section.h" -#include "starboard/string.h" #include "testing/gtest/include/gtest/gtest.h" namespace starboard { diff --git a/starboard/elf_loader/elf_hash_table.cc b/starboard/elf_loader/elf_hash_table.cc index 11580e06d84..edba5a3b623 100644 --- a/starboard/elf_loader/elf_hash_table.cc +++ b/starboard/elf_loader/elf_hash_table.cc @@ -16,8 +16,6 @@ #include -#include "starboard/string.h" - namespace starboard { namespace elf_loader { diff --git a/starboard/elf_loader/elf_loader_impl.cc b/starboard/elf_loader/elf_loader_impl.cc index 2875e49c2b8..ef11493db33 100644 --- a/starboard/elf_loader/elf_loader_impl.cc +++ b/starboard/elf_loader/elf_loader_impl.cc @@ -25,7 +25,7 @@ #include "starboard/elf_loader/lz4_file_impl.h" #include "starboard/extension/loader_app_metrics.h" #include "starboard/memory.h" -#include "starboard/string.h" + #include "starboard/system.h" namespace starboard { diff --git a/starboard/elf_loader/elf_loader_sandbox.cc b/starboard/elf_loader/elf_loader_sandbox.cc index 63c12f63f86..2ac91c228d8 100644 --- a/starboard/elf_loader/elf_loader_sandbox.cc +++ b/starboard/elf_loader/elf_loader_sandbox.cc @@ -24,7 +24,7 @@ #include "starboard/elf_loader/sabi_string.h" #include "starboard/event.h" #include "starboard/shared/starboard/command_line.h" -#include "starboard/string.h" + #include "third_party/crashpad/crashpad/wrapper/annotations.h" #include "third_party/crashpad/crashpad/wrapper/wrapper.h" diff --git a/starboard/elf_loader/evergreen_config.cc b/starboard/elf_loader/evergreen_config.cc index ed17ecaef43..6e1723b5d19 100644 --- a/starboard/elf_loader/evergreen_config.cc +++ b/starboard/elf_loader/evergreen_config.cc @@ -19,7 +19,6 @@ #include "starboard/common/log.h" #include "starboard/common/mutex.h" #include "starboard/memory.h" -#include "starboard/string.h" namespace starboard { namespace elf_loader { diff --git a/starboard/elf_loader/exported_symbols.cc b/starboard/elf_loader/exported_symbols.cc index 96033ea389a..e0072f9678b 100644 --- a/starboard/elf_loader/exported_symbols.cc +++ b/starboard/elf_loader/exported_symbols.cc @@ -28,7 +28,6 @@ #include "starboard/audio_sink.h" #include "starboard/common/log.h" -#include "starboard/condition_variable.h" #include "starboard/configuration.h" #include "starboard/configuration_constants.h" #include "starboard/cpu_features.h" @@ -55,7 +54,7 @@ #include "starboard/socket_waiter.h" #include "starboard/speech_synthesis.h" #include "starboard/storage.h" -#include "starboard/string.h" + #include "starboard/system.h" #include "starboard/thread.h" #include "starboard/time_zone.h" diff --git a/starboard/elf_loader/gnu_hash_table.cc b/starboard/elf_loader/gnu_hash_table.cc index 3d7b529f4c5..6ea286c99dc 100644 --- a/starboard/elf_loader/gnu_hash_table.cc +++ b/starboard/elf_loader/gnu_hash_table.cc @@ -18,7 +18,6 @@ #include "starboard/common/log.h" #include "starboard/elf_loader/log.h" -#include "starboard/string.h" namespace starboard { namespace elf_loader { diff --git a/starboard/elf_loader/lz4_file_impl_test.cc b/starboard/elf_loader/lz4_file_impl_test.cc index 1828e5a64f5..19e317f26e2 100644 --- a/starboard/elf_loader/lz4_file_impl_test.cc +++ b/starboard/elf_loader/lz4_file_impl_test.cc @@ -17,7 +17,7 @@ #include "starboard/elf_loader/lz4_file_impl.h" #include "starboard/configuration_constants.h" -#include "starboard/string.h" + #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/elf_loader/program_table.cc b/starboard/elf_loader/program_table.cc index 3dcb3e26a7d..e3cba22762f 100644 --- a/starboard/elf_loader/program_table.cc +++ b/starboard/elf_loader/program_table.cc @@ -21,7 +21,6 @@ #include "starboard/elf_loader/evergreen_info.h" #include "starboard/elf_loader/log.h" #include "starboard/memory.h" -#include "starboard/string.h" #define MAYBE_MAP_FLAG(x, from, to) (((x) & (from)) ? (to) : 0) diff --git a/starboard/elf_loader/relocations_test.cc b/starboard/elf_loader/relocations_test.cc index a55c0d32acd..cc673ab3179 100644 --- a/starboard/elf_loader/relocations_test.cc +++ b/starboard/elf_loader/relocations_test.cc @@ -18,7 +18,7 @@ #include "starboard/elf_loader/elf.h" #include "starboard/elf_loader/file_impl.h" -#include "starboard/string.h" + #include "testing/gtest/include/gtest/gtest.h" namespace starboard { diff --git a/starboard/elf_loader/sabi_string.cc b/starboard/elf_loader/sabi_string.cc index 2204160bc10..da5bad354be 100644 --- a/starboard/elf_loader/sabi_string.cc +++ b/starboard/elf_loader/sabi_string.cc @@ -17,7 +17,6 @@ #include #include "starboard/common/log.h" -#include "starboard/string.h" extern "C" { diff --git a/starboard/loader_app/app_key_files.cc b/starboard/loader_app/app_key_files.cc index 566f70bf342..89b8713e643 100644 --- a/starboard/loader_app/app_key_files.cc +++ b/starboard/loader_app/app_key_files.cc @@ -23,7 +23,6 @@ #include "starboard/common/log.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/string.h" namespace starboard { namespace loader_app { diff --git a/starboard/loader_app/app_key_test.cc b/starboard/loader_app/app_key_test.cc index 9bd3340cda5..7e9c761a28b 100644 --- a/starboard/loader_app/app_key_test.cc +++ b/starboard/loader_app/app_key_test.cc @@ -16,7 +16,6 @@ #include -#include "starboard/string.h" #include "testing/gtest/include/gtest/gtest.h" namespace starboard { diff --git a/starboard/loader_app/drain_file.cc b/starboard/loader_app/drain_file.cc index 3ca60e64049..43ae0291eee 100644 --- a/starboard/loader_app/drain_file.cc +++ b/starboard/loader_app/drain_file.cc @@ -28,7 +28,6 @@ #include "starboard/common/string.h" #include "starboard/common/time.h" #include "starboard/configuration_constants.h" -#include "starboard/string.h" #ifdef __cplusplus extern "C" { diff --git a/starboard/loader_app/installation_manager.cc b/starboard/loader_app/installation_manager.cc index 47bc5f2026e..78b7bba7b7b 100644 --- a/starboard/loader_app/installation_manager.cc +++ b/starboard/loader_app/installation_manager.cc @@ -36,7 +36,6 @@ #endif // !SB_IS(EVERGREEN_COMPATIBLE_LITE) #include "starboard/common/once.h" #include "starboard/loader_app/record_loader_app_status.h" -#include "starboard/string.h" namespace starboard { namespace loader_app { diff --git a/starboard/loader_app/loader_app.cc b/starboard/loader_app/loader_app.cc index 39ce43d3411..151a328413e 100644 --- a/starboard/loader_app/loader_app.cc +++ b/starboard/loader_app/loader_app.cc @@ -38,7 +38,7 @@ #include "starboard/loader_app/system_get_extension_shim.h" #include "starboard/memory.h" #include "starboard/shared/starboard/command_line.h" -#include "starboard/string.h" + #include "third_party/crashpad/crashpad/wrapper/annotations.h" #include "third_party/crashpad/crashpad/wrapper/wrapper.h" diff --git a/starboard/loader_app/slot_management.cc b/starboard/loader_app/slot_management.cc index 842a702bc23..bf04eb8ce15 100644 --- a/starboard/loader_app/slot_management.cc +++ b/starboard/loader_app/slot_management.cc @@ -36,7 +36,7 @@ #include "starboard/loader_app/drain_file.h" #include "starboard/loader_app/installation_manager.h" #include "starboard/memory.h" -#include "starboard/string.h" + #include "third_party/crashpad/crashpad/wrapper/annotations.h" #include "third_party/crashpad/crashpad/wrapper/wrapper.h" #include "third_party/jsoncpp/source/include/json/reader.h" diff --git a/starboard/loader_app/system_get_extension_shim.cc b/starboard/loader_app/system_get_extension_shim.cc index 636585494f8..88acae4388e 100644 --- a/starboard/loader_app/system_get_extension_shim.cc +++ b/starboard/loader_app/system_get_extension_shim.cc @@ -20,7 +20,7 @@ #include "starboard/common/log.h" #include "starboard/extension/installation_manager.h" #include "starboard/loader_app/installation_manager.h" -#include "starboard/string.h" + #include "starboard/system.h" namespace { diff --git a/starboard/nplb/extern_c_test.cc b/starboard/nplb/extern_c_test.cc index e26ff6edf52..e3b5fa7d0a1 100644 --- a/starboard/nplb/extern_c_test.cc +++ b/starboard/nplb/extern_c_test.cc @@ -17,7 +17,6 @@ extern "C" { #include "starboard/atomic.h" #include "starboard/audio_sink.h" -#include "starboard/condition_variable.h" #include "starboard/configuration.h" #include "starboard/cpu_features.h" #include "starboard/decode_target.h" @@ -38,7 +37,7 @@ extern "C" { #include "starboard/socket_waiter.h" #include "starboard/speech_synthesis.h" #include "starboard/storage.h" -#include "starboard/string.h" + #include "starboard/system.h" #include "starboard/thread.h" #include "starboard/time_zone.h" diff --git a/starboard/nplb/include_all.c b/starboard/nplb/include_all.c index 7ce8ac34148..b1eea3eb8f7 100644 --- a/starboard/nplb/include_all.c +++ b/starboard/nplb/include_all.c @@ -16,7 +16,6 @@ #include "starboard/atomic.h" #include "starboard/audio_sink.h" -#include "starboard/condition_variable.h" #include "starboard/configuration.h" #include "starboard/cpu_features.h" #include "starboard/decode_target.h" @@ -37,7 +36,7 @@ #include "starboard/socket_waiter.h" #include "starboard/speech_synthesis.h" #include "starboard/storage.h" -#include "starboard/string.h" + #include "starboard/system.h" #include "starboard/thread.h" #include "starboard/time_zone.h" diff --git a/starboard/nplb/player_get_audio_configuration_test.cc b/starboard/nplb/player_get_audio_configuration_test.cc index 7cd5a7e5a8b..932197147d7 100644 --- a/starboard/nplb/player_get_audio_configuration_test.cc +++ b/starboard/nplb/player_get_audio_configuration_test.cc @@ -15,7 +15,7 @@ #include #include "starboard/nplb/player_test_fixture.h" -#include "starboard/string.h" + #include "starboard/testing/fake_graphics_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/player_get_media_time_test.cc b/starboard/nplb/player_get_media_time_test.cc index fefcce23117..f28fffe0429 100644 --- a/starboard/nplb/player_get_media_time_test.cc +++ b/starboard/nplb/player_get_media_time_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "starboard/nplb/player_test_fixture.h" -#include "starboard/string.h" + #include "starboard/testing/fake_graphics_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/player_write_sample_test.cc b/starboard/nplb/player_write_sample_test.cc index d2428fed5ce..dc6ae77928e 100644 --- a/starboard/nplb/player_write_sample_test.cc +++ b/starboard/nplb/player_write_sample_test.cc @@ -18,7 +18,7 @@ #include "starboard/nplb/player_test_fixture.h" #include "starboard/nplb/player_test_util.h" #include "starboard/nplb/posix_compliance/posix_thread_helpers.h" -#include "starboard/string.h" + #include "starboard/testing/fake_graphics_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/shared/libde265/de265_video_decoder.cc b/starboard/shared/libde265/de265_video_decoder.cc index 2cbef036447..bcc027fd67e 100644 --- a/starboard/shared/libde265/de265_video_decoder.cc +++ b/starboard/shared/libde265/de265_video_decoder.cc @@ -17,7 +17,7 @@ #include "starboard/common/string.h" #include "starboard/linux/shared/decode_target_internal.h" #include "starboard/shared/libde265/de265_library_loader.h" -#include "starboard/string.h" + #include "starboard/thread.h" namespace starboard { diff --git a/starboard/shared/media_session/playback_state.cc b/starboard/shared/media_session/playback_state.cc index b29f2d18148..55adb2c6a08 100644 --- a/starboard/shared/media_session/playback_state.cc +++ b/starboard/shared/media_session/playback_state.cc @@ -18,7 +18,7 @@ #include "starboard/common/log.h" #include "starboard/extension/media_session.h" -#include "starboard/string.h" + #include "starboard/system.h" namespace starboard { diff --git a/starboard/shared/starboard/player/filter/testing/test_util.cc b/starboard/shared/starboard/player/filter/testing/test_util.cc index 7c5a9288bfe..afb8a1a154c 100644 --- a/starboard/shared/starboard/player/filter/testing/test_util.cc +++ b/starboard/shared/starboard/player/filter/testing/test_util.cc @@ -24,7 +24,7 @@ #include "starboard/shared/starboard/player/filter/player_components.h" #include "starboard/shared/starboard/player/filter/stub_player_components_factory.h" #include "starboard/shared/starboard/player/video_dmp_reader.h" -#include "starboard/string.h" + #include "starboard/system.h" namespace starboard { diff --git a/starboard/string.h b/starboard/string.h deleted file mode 100644 index e634c841782..00000000000 --- a/starboard/string.h +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright 2015 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Module Overview: Starboard String module -// -// Defines functions for interacting with c-style strings. - -#ifndef STARBOARD_STRING_H_ -#define STARBOARD_STRING_H_ - -#include -#include - -#include "starboard/configuration.h" -#include "starboard/export.h" -#include "starboard/types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if SB_API_VERSION < 16 -// Copies |source| into a buffer that is allocated by this function and that -// can be freed with SbMemoryDeallocate. This function is meant to be a drop-in -// replacement for |strdup|. -// -// |source|: The string to be copied. -SB_EXPORT char* SbStringDuplicate(const char* source); - -// Compares two strings, ignoring differences in case. The return value is: -// - |< 0| if |string1| is ASCII-betically lower than |string2|. -// - |0| if the two strings are equal. -// - |> 0| if |string1| is ASCII-betically higher than |string2|. -// -// This function is meant to be a drop-in replacement for |strcasecmp|. -// -// |string1|: The first string to compare. -// |string2|: The second string to compare. -SB_EXPORT int SbStringCompareNoCase(const char* string1, const char* string2); - -// Compares the first |count| characters of two strings, ignoring differences -// in case. The return value is: -// - |< 0| if |string1| is ASCII-betically lower than |string2|. -// - |0| if the two strings are equal. -// - |> 0| if |string1| is ASCII-betically higher than |string2|. -// -// This function is meant to be a drop-in replacement for |strncasecmp|. -// -// |string1|: The first string to compare. -// |string2|: The second string to compare. -// |count|: The number of characters to compare. -SB_EXPORT int SbStringCompareNoCaseN(const char* string1, - const char* string2, - size_t count); - -// Produces a string formatted with |format| and |arguments|, placing as much -// of the result that will fit into |out_buffer|. The return value specifies -// the number of characters that the format would produce if |buffer_size| were -// infinite. -// -// This function is meant to be a drop-in replacement for |vsnprintf|. -// -// |out_buffer|: The location where the formatted string is stored. -// |buffer_size|: The size of |out_buffer|. -// |format|: A string that specifies how the data should be formatted. -// |arguments|: Variable arguments used in the string. -SB_EXPORT int SbStringFormat(char* out_buffer, - size_t buffer_size, - const char* format, - va_list arguments) SB_PRINTF_FORMAT(3, 0); -// An inline wrapper of SbStringFormat that converts from ellipsis to va_args. -// This function is meant to be a drop-in replacement for |snprintf|. -// -// |out_buffer|: The location where the formatted string is stored. -// |buffer_size|: The size of |out_buffer|. -// |format|: A string that specifies how the data should be formatted. -// |...|: Arguments used in the string. -static inline int SbStringFormatF(char* out_buffer, - size_t buffer_size, - const char* format, - ...) SB_PRINTF_FORMAT(3, 4); -static inline int SbStringFormatF(char* out_buffer, - size_t buffer_size, - const char* format, - ...) { - va_list arguments; - va_start(arguments, format); - int result = SbStringFormat(out_buffer, buffer_size, format, arguments); - va_end(arguments); - return result; -} - -// An inline wrapper of SbStringFormat that is meant to be a drop-in -// replacement for the unsafe but commonly used |sprintf|. -// -// |out_buffer|: The location where the formatted string is stored. -// |format|: A string that specifies how the data should be formatted. -// |...|: Arguments used in the string. -static inline int SbStringFormatUnsafeF(char* out_buffer, - const char* format, - ...) SB_PRINTF_FORMAT(2, 3); -static inline int SbStringFormatUnsafeF(char* out_buffer, - const char* format, - ...) { - va_list arguments; - va_start(arguments, format); - int result = SbStringFormat(out_buffer, SSIZE_MAX, format, arguments); - va_end(arguments); - return result; -} - -// This function is identical to SbStringFormat, but is for wide characters. -// It is meant to be a drop-in replacement for |vswprintf|. -// -// |out_buffer|: The location where the formatted string is stored. -// |buffer_size|: The size of |out_buffer|. -// |format|: A string that specifies how the data should be formatted. -// |arguments|: Variable arguments used in the string. -SB_EXPORT int SbStringFormatWide(wchar_t* out_buffer, - size_t buffer_size, - const wchar_t* format, - va_list arguments); - -// An inline wrapper of SbStringFormatWide that converts from ellipsis to -// |va_args|. -// -// |out_buffer|: The location where the formatted string is stored. -// |buffer_size|: The size of |out_buffer|. -// |format|: A string that specifies how the data should be formatted. -// |...|: Arguments used in the string. - -static inline int SbStringFormatWideF(wchar_t* out_buffer, - size_t buffer_size, - const wchar_t* format, - ...) { - va_list arguments; - va_start(arguments, format); - int result = SbStringFormatWide(out_buffer, buffer_size, format, arguments); - va_end(arguments); - return result; -} - -// Scans |buffer| for |pattern|, placing the extracted values in |arguments|. -// The return value specifies the number of successfully matched items, which -// may be |0|. -// -// This function is meant to be a drop-in replacement for |vsscanf|. -// -// |buffer|: The string to scan for the pattern. -// |pattern|: The string to search for in |buffer|. -// |arguments|: Values matching |pattern| that were extracted from |buffer|. -SB_EXPORT int SbStringScan(const char* buffer, - const char* pattern, - va_list arguments); - -// An inline wrapper of SbStringScan that converts from ellipsis to |va_args|. -// This function is meant to be a drop-in replacement for |sscanf|. -// |buffer|: The string to scan for the pattern. -// |pattern|: The string to search for in |buffer|. -// |...|: Values matching |pattern| that were extracted from |buffer|. -static inline int SbStringScanF(const char* buffer, const char* pattern, ...) { - va_list arguments; - va_start(arguments, pattern); - int result = SbStringScan(buffer, pattern, arguments); - va_end(arguments); - return result; -} -#endif // SB_API_VERSION < 16 - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // STARBOARD_STRING_H_ diff --git a/third_party/boringssl/src/config/starboard/openssl/opensslconf.h b/third_party/boringssl/src/config/starboard/openssl/opensslconf.h index d1b967213da..013897e67f1 100644 --- a/third_party/boringssl/src/config/starboard/openssl/opensslconf.h +++ b/third_party/boringssl/src/config/starboard/openssl/opensslconf.h @@ -6,7 +6,7 @@ #include "starboard/configuration.h" #include "starboard/file.h" #include "starboard/memory.h" -#include "starboard/string.h" + #include "starboard/system.h" #include "starboard/thread.h" diff --git a/third_party/boringssl/src/crypto/cpu-starboard.c b/third_party/boringssl/src/crypto/cpu-starboard.c index 335cd917999..6d0f5cb7063 100644 --- a/third_party/boringssl/src/crypto/cpu-starboard.c +++ b/third_party/boringssl/src/crypto/cpu-starboard.c @@ -16,7 +16,6 @@ #include #include "../../crypto/internal.h" #include -#include #if defined(STARBOARD) diff --git a/third_party/boringssl/src/include/openssl/thread.h b/third_party/boringssl/src/include/openssl/thread.h index 68e4d2294e8..6e4b72ff1e0 100644 --- a/third_party/boringssl/src/include/openssl/thread.h +++ b/third_party/boringssl/src/include/openssl/thread.h @@ -63,7 +63,6 @@ #ifdef STARBOARD #include "starboard/atomic.h" -#include "starboard/condition_variable.h" #endif #if defined(__cplusplus) diff --git a/third_party/freetype/src/include/freetype/config/ftstdlib.h b/third_party/freetype/src/include/freetype/config/ftstdlib.h index 239858c80ec..a4088260c66 100644 --- a/third_party/freetype/src/include/freetype/config/ftstdlib.h +++ b/third_party/freetype/src/include/freetype/config/ftstdlib.h @@ -114,7 +114,7 @@ #include #include "starboard/common/file_wrapper.h" -#include "starboard/string.h" + #define FT_FILE FileStruct #define ft_fclose file_close diff --git a/third_party/libxml/starboard/config.h b/third_party/libxml/starboard/config.h index 5324c4489df..087d7edc42d 100644 --- a/third_party/libxml/starboard/config.h +++ b/third_party/libxml/starboard/config.h @@ -1,7 +1,7 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" #include "starboard/memory.h" -#include "starboard/string.h" + #include "starboard/types.h" /* Define if getaddrinfo is there */ diff --git a/third_party/zlib/arm_features.c b/third_party/zlib/arm_features.c index 0b314919b90..b5b84bc50ea 100644 --- a/third_party/zlib/arm_features.c +++ b/third_party/zlib/arm_features.c @@ -21,7 +21,7 @@ int ZLIB_INTERNAL arm_cpu_enable_pmull = 0; #if defined(STARBOARD) #include "starboard/log.h" -#include "starboard/string.h" + #include "starboard/cpu_features.h" #elif defined(ARMV8_OS_ANDROID) #include From 4fa8d7f42f258c29b88bf088f0bc85e025670d7d Mon Sep 17 00:00:00 2001 From: Madhura Jayaraman Date: Wed, 11 Sep 2024 17:11:56 -0700 Subject: [PATCH 5/7] Remove hanging references to starboard/file.h Change-Id: I4ec7729b2033ff9fbaed830c9778a171acb321f3 --- base/files/file_enumerator.h | 2 +- base/files/file_enumerator_starboard.cc | 2 +- base/files/file_starboard.cc | 2 +- base/files/platform_file.h | 2 +- base/files/scoped_file.h | 2 +- base/logging.cc | 2 +- base/memory/platform_shared_memory_handle.h | 2 +- chrome/updater/util.cc | 2 +- cobalt/dom/navigator.cc | 1 - cobalt/dom/window.cc | 2 +- cobalt/loader/image/jpeg_image_decoder.h | 2 +- cobalt/script/v8c/isolate_fellowship.cc | 1 - .../update_client/cobalt_slot_management.cc | 2 +- .../trust_store_in_memory_starboard.cc | 2 +- starboard/android/shared/android_main.cc | 2 +- starboard/android/shared/file_internal.h | 1 - starboard/client_porting/icu_init/icu_init.cc | 2 +- starboard/common/file.cc | 2 +- starboard/common/paths.cc | 2 +- .../samples/cast_starboard_api_test.cc | 2 +- starboard/elf_loader/file_impl.h | 2 - starboard/file.h | 105 ------------------ .../loader_app/installation_manager_test.cc | 1 + starboard/loader_app/loader_app.cc | 2 +- starboard/loader_app/slot_management.cc | 2 +- starboard/loader_app/slot_management_test.cc | 2 +- starboard/nplb/extern_c_test.cc | 2 +- starboard/nplb/file_delete_recursive_test.cc | 2 +- starboard/nplb/file_helpers.h | 2 - starboard/nplb/include_all.c | 2 +- .../nplb_evergreen_compat_tests/fonts_test.cc | 2 +- .../posix_directory_create_test.cc | 2 +- .../posix_directory_get_next_test.cc | 2 +- .../posix_directory_open_test.cc | 2 +- .../posix_file_delete_test.cc | 1 - .../posix_file_get_info_test.cc | 2 +- .../posix_file_get_path_info_test.cc | 2 +- .../posix_compliance/posix_file_open_test.cc | 1 - .../posix_compliance/posix_file_seek_test.cc | 1 - .../nplb/system_get_error_string_test.cc | 2 +- starboard/nplb/system_get_last_error_test.cc | 1 - .../shared/libjpeg/jpeg_image_decoder.cc | 2 +- starboard/shared/posix/file_internal.h | 1 - starboard/shared/posix/impl/file_can_open.h | 2 - starboard/shared/posix/impl/file_close.h | 2 - starboard/shared/posix/impl/file_delete.h | 2 - starboard/shared/posix/impl/file_exists.h | 2 - starboard/shared/posix/impl/file_flush.h | 2 - starboard/shared/posix/impl/file_get_info.h | 2 - starboard/shared/posix/impl/file_impl.h | 1 - starboard/shared/posix/impl/file_open.h | 2 - starboard/shared/posix/impl/file_read.h | 2 - starboard/shared/posix/impl/file_seek.h | 2 - starboard/shared/posix/impl/file_truncate.h | 2 - starboard/shared/posix/impl/file_write.h | 2 - .../shared/starboard/localized_strings.h | 2 - .../starboard/player/video_dmp_writer.h | 1 - starboard/stub/javascript_cache.cc | 1 - .../config/starboard/openssl/opensslconf.h | 2 +- .../crashpad/crashpad/wrapper/wrapper.cc | 2 +- .../include/gtest/internal/gtest-port.h | 2 +- third_party/libjpeg_turbo/jinclude.h | 2 +- 62 files changed, 36 insertions(+), 179 deletions(-) diff --git a/base/files/file_enumerator.h b/base/files/file_enumerator.h index b970055bc8a..d2dd14c5ba5 100644 --- a/base/files/file_enumerator.h +++ b/base/files/file_enumerator.h @@ -20,7 +20,7 @@ #if defined(STARBOARD) #include #include -#include "starboard/file.h" + #elif BUILDFLAG(IS_WIN) #include "base/win/windows_types.h" #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) diff --git a/base/files/file_enumerator_starboard.cc b/base/files/file_enumerator_starboard.cc index cc4727f2eb0..98fba17ffc5 100644 --- a/base/files/file_enumerator_starboard.cc +++ b/base/files/file_enumerator_starboard.cc @@ -22,7 +22,7 @@ #include "starboard/common/log.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/memory.h" namespace base { diff --git a/base/files/file_starboard.cc b/base/files/file_starboard.cc index 393c6b5d095..cdb9fa2f8ea 100644 --- a/base/files/file_starboard.cc +++ b/base/files/file_starboard.cc @@ -28,7 +28,7 @@ #include "base/strings/stringprintf.h" #include "base/threading/thread_restrictions.h" #include "starboard/common/metrics/stats_tracker.h" -#include "starboard/file.h" + namespace base { diff --git a/base/files/platform_file.h b/base/files/platform_file.h index c3e9c511ef7..1bbe29f54d7 100644 --- a/base/files/platform_file.h +++ b/base/files/platform_file.h @@ -9,7 +9,7 @@ #include "build/build_config.h" #if defined(STARBOARD) -#include "starboard/file.h" + #endif #if BUILDFLAG(IS_WIN) diff --git a/base/files/scoped_file.h b/base/files/scoped_file.h index f0a57f283a4..38b9fd86299 100644 --- a/base/files/scoped_file.h +++ b/base/files/scoped_file.h @@ -15,7 +15,7 @@ #include "build/build_config.h" #if defined(STARBOARD) -#include "starboard/file.h" + #include "starboard/types.h" #include "starboard/common/file.h" #endif diff --git a/base/logging.cc b/base/logging.cc index 5900a58e9e7..d4f4bf9c68c 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -48,7 +48,7 @@ #include "starboard/common/time.h" #include "starboard/configuration.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/system.h" typedef int* FileHandle; typedef pthread_mutex_t MutexHandle; diff --git a/base/memory/platform_shared_memory_handle.h b/base/memory/platform_shared_memory_handle.h index 2869f0313a4..7241ca90110 100644 --- a/base/memory/platform_shared_memory_handle.h +++ b/base/memory/platform_shared_memory_handle.h @@ -20,7 +20,7 @@ #include "base/files/scoped_file.h" #elif defined(STARBOARD) #include "base/files/scoped_file.h" -#include "starboard/file.h" + #endif namespace base::subtle { diff --git a/chrome/updater/util.cc b/chrome/updater/util.cc index c5cab5294c9..4771dff6c51 100644 --- a/chrome/updater/util.cc +++ b/chrome/updater/util.cc @@ -23,7 +23,7 @@ #include "crypto/sha2.h" #include "starboard/configuration_constants.h" #include "starboard/extension/installation_manager.h" -#include "starboard/file.h" + #include "starboard/system.h" #define PRODUCT_FULLNAME_STRING "cobalt_updater" diff --git a/cobalt/dom/navigator.cc b/cobalt/dom/navigator.cc index 0aabea2ccb9..9a9e3725817 100644 --- a/cobalt/dom/navigator.cc +++ b/cobalt/dom/navigator.cc @@ -31,7 +31,6 @@ #include "cobalt/web/navigator_base.h" #include "cobalt/worker/service_worker_container.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" #include "starboard/media.h" namespace cobalt { diff --git a/cobalt/dom/window.cc b/cobalt/dom/window.cc index 0161ca4dff7..2d0a9d90ef2 100644 --- a/cobalt/dom/window.cc +++ b/cobalt/dom/window.cc @@ -57,7 +57,7 @@ #include "cobalt/web/environment_settings_helper.h" #include "cobalt/web/event.h" #include "cobalt/web/window_or_worker_global_scope.h" -#include "starboard/file.h" + using cobalt::cssom::ViewportSize; using cobalt::media_session::MediaSession; diff --git a/cobalt/loader/image/jpeg_image_decoder.h b/cobalt/loader/image/jpeg_image_decoder.h index 6ca8a25fa16..25ded31faa4 100644 --- a/cobalt/loader/image/jpeg_image_decoder.h +++ b/cobalt/loader/image/jpeg_image_decoder.h @@ -23,7 +23,7 @@ #include "base/callback.h" #include "cobalt/loader/image/image.h" #include "cobalt/loader/image/image_data_decoder.h" -#include "starboard/file.h" + // Inhibit C++ name-mangling for libjpeg functions. extern "C" { diff --git a/cobalt/script/v8c/isolate_fellowship.cc b/cobalt/script/v8c/isolate_fellowship.cc index 0af59d53935..4abfcacbc66 100644 --- a/cobalt/script/v8c/isolate_fellowship.cc +++ b/cobalt/script/v8c/isolate_fellowship.cc @@ -26,7 +26,6 @@ #include "cobalt/script/v8c/switches.h" #include "cobalt/script/v8c/v8c_tracing_controller.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" #include "starboard/memory.h" namespace cobalt { diff --git a/components/update_client/cobalt_slot_management.cc b/components/update_client/cobalt_slot_management.cc index 0ebece98358..9707876fd4a 100644 --- a/components/update_client/cobalt_slot_management.cc +++ b/components/update_client/cobalt_slot_management.cc @@ -25,7 +25,7 @@ #include "chrome/updater/util.h" #include "components/update_client/utils.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/loader_app/app_key_files.h" #include "starboard/loader_app/drain_file.h" diff --git a/net/cert/internal/trust_store_in_memory_starboard.cc b/net/cert/internal/trust_store_in_memory_starboard.cc index 734a8f7901e..e06c78ecbee 100644 --- a/net/cert/internal/trust_store_in_memory_starboard.cc +++ b/net/cert/internal/trust_store_in_memory_starboard.cc @@ -27,7 +27,7 @@ #include "net/cert/x509_util.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "third_party/boringssl/src/include/openssl/digest.h" #include "third_party/boringssl/src/include/openssl/sha.h" diff --git a/starboard/android/shared/android_main.cc b/starboard/android/shared/android_main.cc index 5f31391c39f..5985acec80c 100644 --- a/starboard/android/shared/android_main.cc +++ b/starboard/android/shared/android_main.cc @@ -27,7 +27,7 @@ #include "starboard/common/semaphore.h" #include "starboard/common/string.h" #if SB_IS(EVERGREEN_COMPATIBLE) -#include "starboard/file.h" + #endif #include "starboard/event.h" #include "starboard/log.h" diff --git a/starboard/android/shared/file_internal.h b/starboard/android/shared/file_internal.h index 7d33227c16d..866b9f42bfb 100644 --- a/starboard/android/shared/file_internal.h +++ b/starboard/android/shared/file_internal.h @@ -19,7 +19,6 @@ #include -#include "starboard/file.h" #include "starboard/shared/internal_only.h" struct SbFilePrivate { diff --git a/starboard/client_porting/icu_init/icu_init.cc b/starboard/client_porting/icu_init/icu_init.cc index d2fca9df3bc..defb2f852d7 100644 --- a/starboard/client_porting/icu_init/icu_init.cc +++ b/starboard/client_porting/icu_init/icu_init.cc @@ -23,7 +23,7 @@ #include "starboard/common/once.h" #include "starboard/configuration.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/system.h" #include "third_party/icu/source/common/unicode/putil.h" #include "third_party/icu/source/common/unicode/udata.h" diff --git a/starboard/common/file.cc b/starboard/common/file.cc index d44f550fae2..3c65bc57fac 100644 --- a/starboard/common/file.cc +++ b/starboard/common/file.cc @@ -27,7 +27,7 @@ #include "starboard/common/metrics/stats_tracker.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/shared/starboard/file_atomic_replace_write_file.h" namespace starboard { diff --git a/starboard/common/paths.cc b/starboard/common/paths.cc index ef44eb3d485..6acbdff73d5 100644 --- a/starboard/common/paths.cc +++ b/starboard/common/paths.cc @@ -20,7 +20,7 @@ #include #include "starboard/common/log.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/system.h" namespace starboard { diff --git a/starboard/contrib/cast/cast_starboard_api/samples/cast_starboard_api_test.cc b/starboard/contrib/cast/cast_starboard_api/samples/cast_starboard_api_test.cc index cc6ff4dbed1..31cbd649a11 100644 --- a/starboard/contrib/cast/cast_starboard_api/samples/cast_starboard_api_test.cc +++ b/starboard/contrib/cast/cast_starboard_api/samples/cast_starboard_api_test.cc @@ -8,7 +8,7 @@ #include "starboard/common/thread.h" #include "starboard/egl.h" #include "starboard/event.h" -#include "starboard/file.h" + #include "starboard/gles.h" #include "starboard/system.h" #include "starboard/window.h" diff --git a/starboard/elf_loader/file_impl.h b/starboard/elf_loader/file_impl.h index a1a2f9525be..99f6533fe08 100644 --- a/starboard/elf_loader/file_impl.h +++ b/starboard/elf_loader/file_impl.h @@ -19,8 +19,6 @@ #include -#include "starboard/file.h" - namespace starboard { namespace elf_loader { diff --git a/starboard/file.h b/starboard/file.h index 6f2641807fb..9f01335da26 100644 --- a/starboard/file.h +++ b/starboard/file.h @@ -26,111 +26,6 @@ extern "C" { #endif -#if SB_API_VERSION < 17 - -// Private structure representing an open file. -typedef struct SbFilePrivate SbFilePrivate; - -// A handle to an open file. -typedef SbFilePrivate* SbFile; - -// Flags that define how a file is used in the application. These flags should -// be or'd together when passed to SbFileOpen to open or create a file. -// -// The following five flags are mutually exclusive. You must specify exactly one -// of them: -// - |kSbFileOpenAlways| -// - |kSbFileOpenOnly| -// - |kSbFileOpenTruncated| -// - |kSbFileCreateAlways| -// - |kSbFileCreateOnly| -// -// In addition, one or more of the following flags must be specified: -// - |kSbFileRead| -// - |kSbFileWrite| -// -// The |kSbFileAsync| flag is optional. -typedef enum SbFileFlags { - kSbFileOpenOnly = 1 << 0, // Opens a file, only if it exists. - kSbFileCreateOnly = 1 << 1, // Creates a new file, only if it - // does not already exist. - kSbFileOpenAlways = 1 << 2, // Opens an existing file at the specified - // path or creates a new file at that path. - kSbFileCreateAlways = 1 << 3, // Creates a new file at the specified path - // or overwrites an existing file at that - // path. - kSbFileOpenTruncated = 1 << 4, // Opens a file and truncates it to zero, - // only if it exists. - kSbFileRead = 1 << 5, - kSbFileWrite = 1 << 6, - kSbFileAsync = 1 << 7, // May allow asynchronous I/O on some - // platforms, meaning that calls to - // Read or Write will only return the - // data that is readily available. -} SbFileFlags; - -// kSbFileErrorAccessDenied is returned when a call fails because of a -// filesystem restriction. kSbFileErrorSecurity is returned when a security -// policy doesn't allow the operation to be executed. -typedef enum SbFileError { - kSbFileOk = 0, - kSbFileErrorFailed = -1, - kSbFileErrorInUse = -2, - kSbFileErrorExists = -3, - kSbFileErrorNotFound = -4, - kSbFileErrorAccessDenied = -5, - kSbFileErrorTooManyOpened = -6, - kSbFileErrorNoMemory = -7, - kSbFileErrorNoSpace = -8, - kSbFileErrorNotADirectory = -9, - kSbFileErrorInvalidOperation = -10, - kSbFileErrorSecurity = -11, - kSbFileErrorAbort = -12, - kSbFileErrorNotAFile = -13, - kSbFileErrorNotEmpty = -14, - kSbFileErrorInvalidUrl = -15, - kSbFileErrorIO = -16, - kSbFileErrorMax = -17, -} SbFileError; - -// This explicit mapping matches both FILE_ on Windows and SEEK_ on Linux. -typedef enum SbFileWhence { - kSbFileFromBegin = 0, - kSbFileFromCurrent = 1, - kSbFileFromEnd = 2, -} SbFileWhence; - -// Used to hold information about a file. -typedef struct SbFileInfo { - // The size of the file in bytes. Undefined when is_directory is true. - int64_t size; - - // Whether the file corresponds to a directory. - bool is_directory; - - // Whether the file corresponds to a symbolic link. - bool is_symbolic_link; - - // The last modified time of a file - microseconds since Windows epoch UTC. - int64_t last_modified; - - // The last accessed time of a file - microseconds since Windows epoch UTC. - int64_t last_accessed; - - // The creation time of a file - microseconds since Windows epoch UTC. - int64_t creation_time; -} SbFileInfo; - -// Well-defined value for an invalid file handle. -#define kSbFileInvalid (SbFile) NULL - -// Returns whether the given file handle is valid. -static inline bool SbFileIsValid(SbFile file) { - return file != kSbFileInvalid; -} - -#endif - // Replaces the content of the file at |path| with |data|. Returns whether the // contents of the file were replaced. The replacement of the content is an // atomic operation. The file will either have all of the data, or none. diff --git a/starboard/loader_app/installation_manager_test.cc b/starboard/loader_app/installation_manager_test.cc index daec5c62b0a..a61defe2eb3 100644 --- a/starboard/loader_app/installation_manager_test.cc +++ b/starboard/loader_app/installation_manager_test.cc @@ -25,6 +25,7 @@ #include "starboard/common/file.h" #include "starboard/configuration_constants.h" #include "starboard/extension/loader_app_metrics.h" +#include "starboard/file.h" #include "starboard/loader_app/installation_store.pb.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/loader_app/loader_app.cc b/starboard/loader_app/loader_app.cc index 151a328413e..5dea517ee9e 100644 --- a/starboard/loader_app/loader_app.cc +++ b/starboard/loader_app/loader_app.cc @@ -28,7 +28,7 @@ #include "starboard/elf_loader/sabi_string.h" #include "starboard/event.h" #include "starboard/extension/loader_app_metrics.h" -#include "starboard/file.h" + #include "starboard/loader_app/app_key.h" #include "starboard/loader_app/loader_app_switches.h" #include "starboard/loader_app/memory_tracker_thread.h" diff --git a/starboard/loader_app/slot_management.cc b/starboard/loader_app/slot_management.cc index bf04eb8ce15..ef4a5b13b80 100644 --- a/starboard/loader_app/slot_management.cc +++ b/starboard/loader_app/slot_management.cc @@ -31,7 +31,7 @@ #include "starboard/elf_loader/sabi_string.h" #include "starboard/event.h" #include "starboard/extension/loader_app_metrics.h" -#include "starboard/file.h" + #include "starboard/loader_app/app_key_files.h" #include "starboard/loader_app/drain_file.h" #include "starboard/loader_app/installation_manager.h" diff --git a/starboard/loader_app/slot_management_test.cc b/starboard/loader_app/slot_management_test.cc index 1e784a47ae3..62e1d5dd0f4 100644 --- a/starboard/loader_app/slot_management_test.cc +++ b/starboard/loader_app/slot_management_test.cc @@ -28,7 +28,7 @@ #include "starboard/configuration_constants.h" #include "starboard/elf_loader/sabi_string.h" #include "starboard/event.h" -#include "starboard/file.h" + #include "starboard/loader_app/app_key_files.h" #include "starboard/loader_app/drain_file.h" #include "starboard/loader_app/installation_manager.h" diff --git a/starboard/nplb/extern_c_test.cc b/starboard/nplb/extern_c_test.cc index e3b5fa7d0a1..4c503322749 100644 --- a/starboard/nplb/extern_c_test.cc +++ b/starboard/nplb/extern_c_test.cc @@ -24,7 +24,7 @@ extern "C" { #include "starboard/egl.h" #include "starboard/event.h" #include "starboard/export.h" -#include "starboard/file.h" + #include "starboard/gles.h" #include "starboard/input.h" #include "starboard/key.h" diff --git a/starboard/nplb/file_delete_recursive_test.cc b/starboard/nplb/file_delete_recursive_test.cc index b98ffd0e221..1053a334371 100644 --- a/starboard/nplb/file_delete_recursive_test.cc +++ b/starboard/nplb/file_delete_recursive_test.cc @@ -18,7 +18,7 @@ #include "starboard/common/file.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/nplb/file_helpers.h" #include "starboard/types.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/file_helpers.h b/starboard/nplb/file_helpers.h index 2d883932dcb..2ba99a8eed7 100644 --- a/starboard/nplb/file_helpers.h +++ b/starboard/nplb/file_helpers.h @@ -20,8 +20,6 @@ #include #include -#include "starboard/file.h" - namespace starboard { namespace nplb { diff --git a/starboard/nplb/include_all.c b/starboard/nplb/include_all.c index b1eea3eb8f7..b61fc45687a 100644 --- a/starboard/nplb/include_all.c +++ b/starboard/nplb/include_all.c @@ -23,7 +23,7 @@ #include "starboard/egl.h" #include "starboard/event.h" #include "starboard/export.h" -#include "starboard/file.h" + #include "starboard/gles.h" #include "starboard/input.h" #include "starboard/key.h" diff --git a/starboard/nplb/nplb_evergreen_compat_tests/fonts_test.cc b/starboard/nplb/nplb_evergreen_compat_tests/fonts_test.cc index 3687ca18956..32c4437451f 100644 --- a/starboard/nplb/nplb_evergreen_compat_tests/fonts_test.cc +++ b/starboard/nplb/nplb_evergreen_compat_tests/fonts_test.cc @@ -19,7 +19,7 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" -#include "starboard/file.h" + #include "starboard/nplb/nplb_evergreen_compat_tests/checks.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_create_test.cc b/starboard/nplb/posix_compliance/posix_directory_create_test.cc index fc68314353b..168f1f341aa 100644 --- a/starboard/nplb/posix_compliance/posix_directory_create_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_create_test.cc @@ -15,7 +15,7 @@ #include #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc b/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc index 1cfa0a8c129..abbd23ad7da 100644 --- a/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc @@ -21,7 +21,7 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/nplb/file_helpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_open_test.cc b/starboard/nplb/posix_compliance/posix_directory_open_test.cc index 1941fd2e54f..ae90740d8ab 100644 --- a/starboard/nplb/posix_compliance/posix_directory_open_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_open_test.cc @@ -17,7 +17,7 @@ #include #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_file_delete_test.cc b/starboard/nplb/posix_compliance/posix_file_delete_test.cc index 9bc24328de8..367f9588d82 100644 --- a/starboard/nplb/posix_compliance/posix_file_delete_test.cc +++ b/starboard/nplb/posix_compliance/posix_file_delete_test.cc @@ -18,7 +18,6 @@ #include -#include "starboard/file.h" #include "starboard/nplb/file_helpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_file_get_info_test.cc b/starboard/nplb/posix_compliance/posix_file_get_info_test.cc index 192fe817cef..7a03d4bb690 100644 --- a/starboard/nplb/posix_compliance/posix_file_get_info_test.cc +++ b/starboard/nplb/posix_compliance/posix_file_get_info_test.cc @@ -21,7 +21,7 @@ #include #include "starboard/common/time.h" -#include "starboard/file.h" + #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_file_get_path_info_test.cc b/starboard/nplb/posix_compliance/posix_file_get_path_info_test.cc index fbada38a57d..403bf5b3a41 100644 --- a/starboard/nplb/posix_compliance/posix_file_get_path_info_test.cc +++ b/starboard/nplb/posix_compliance/posix_file_get_path_info_test.cc @@ -20,7 +20,7 @@ #include "starboard/common/time.h" #include "starboard/configuration_constants.h" -#include "starboard/file.h" + #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_file_open_test.cc b/starboard/nplb/posix_compliance/posix_file_open_test.cc index 5b329da2a39..8fb2cd59c8e 100644 --- a/starboard/nplb/posix_compliance/posix_file_open_test.cc +++ b/starboard/nplb/posix_compliance/posix_file_open_test.cc @@ -16,7 +16,6 @@ #include #include -#include "starboard/file.h" #include "starboard/nplb/file_helpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_file_seek_test.cc b/starboard/nplb/posix_compliance/posix_file_seek_test.cc index 6473c00f3fd..d4dc3a4be28 100644 --- a/starboard/nplb/posix_compliance/posix_file_seek_test.cc +++ b/starboard/nplb/posix_compliance/posix_file_seek_test.cc @@ -21,7 +21,6 @@ #include #include -#include "starboard/file.h" #include "starboard/nplb/file_helpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/system_get_error_string_test.cc b/starboard/nplb/system_get_error_string_test.cc index 04fa50d8480..5343a217ba3 100644 --- a/starboard/nplb/system_get_error_string_test.cc +++ b/starboard/nplb/system_get_error_string_test.cc @@ -15,7 +15,7 @@ #include #include "starboard/common/string.h" -#include "starboard/file.h" + #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/system_get_last_error_test.cc b/starboard/nplb/system_get_last_error_test.cc index f001a9d2399..3b5bcc6c249 100644 --- a/starboard/nplb/system_get_last_error_test.cc +++ b/starboard/nplb/system_get_last_error_test.cc @@ -14,7 +14,6 @@ #include -#include "starboard/file.h" #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/shared/libjpeg/jpeg_image_decoder.cc b/starboard/shared/libjpeg/jpeg_image_decoder.cc index b6b8c2bd14c..d2100df5515 100644 --- a/starboard/shared/libjpeg/jpeg_image_decoder.cc +++ b/starboard/shared/libjpeg/jpeg_image_decoder.cc @@ -21,7 +21,7 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" -#include "starboard/file.h" + #include "starboard/linux/shared/decode_target_internal.h" // Inhibit C++ name-mangling for libjpeg functions. diff --git a/starboard/shared/posix/file_internal.h b/starboard/shared/posix/file_internal.h index d49a5ef5738..55d242558b0 100644 --- a/starboard/shared/posix/file_internal.h +++ b/starboard/shared/posix/file_internal.h @@ -17,7 +17,6 @@ #include -#include "starboard/file.h" #include "starboard/shared/internal_only.h" struct SbFilePrivate { diff --git a/starboard/shared/posix/impl/file_can_open.h b/starboard/shared/posix/impl/file_can_open.h index 11ffba90483..e81bac4f256 100644 --- a/starboard/shared/posix/impl/file_can_open.h +++ b/starboard/shared/posix/impl/file_can_open.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_CAN_OPEN_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_CAN_OPEN_H_ -#include "starboard/file.h" - #include #include diff --git a/starboard/shared/posix/impl/file_close.h b/starboard/shared/posix/impl/file_close.h index b5b9f46861d..37cce9c375c 100644 --- a/starboard/shared/posix/impl/file_close.h +++ b/starboard/shared/posix/impl/file_close.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_CLOSE_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_CLOSE_H_ -#include "starboard/file.h" - #include #include "starboard/shared/posix/handle_eintr.h" diff --git a/starboard/shared/posix/impl/file_delete.h b/starboard/shared/posix/impl/file_delete.h index a73c25f520f..b8df09d8355 100644 --- a/starboard/shared/posix/impl/file_delete.h +++ b/starboard/shared/posix/impl/file_delete.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_DELETE_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_DELETE_H_ -#include "starboard/file.h" - #include #include #include diff --git a/starboard/shared/posix/impl/file_exists.h b/starboard/shared/posix/impl/file_exists.h index aa5a4c77df9..4387c78efd1 100644 --- a/starboard/shared/posix/impl/file_exists.h +++ b/starboard/shared/posix/impl/file_exists.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_EXISTS_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_EXISTS_H_ -#include "starboard/file.h" - #include #include "starboard/shared/internal_only.h" diff --git a/starboard/shared/posix/impl/file_flush.h b/starboard/shared/posix/impl/file_flush.h index 51b5b14ed42..af7fcc00462 100644 --- a/starboard/shared/posix/impl/file_flush.h +++ b/starboard/shared/posix/impl/file_flush.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_FLUSH_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_FLUSH_H_ -#include "starboard/file.h" - #include #include "starboard/shared/posix/handle_eintr.h" diff --git a/starboard/shared/posix/impl/file_get_info.h b/starboard/shared/posix/impl/file_get_info.h index e086b41efdc..f875c08d478 100644 --- a/starboard/shared/posix/impl/file_get_info.h +++ b/starboard/shared/posix/impl/file_get_info.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_GET_INFO_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_GET_INFO_H_ -#include "starboard/file.h" - #include #include diff --git a/starboard/shared/posix/impl/file_impl.h b/starboard/shared/posix/impl/file_impl.h index 27fa9cc0785..8298324cff6 100644 --- a/starboard/shared/posix/impl/file_impl.h +++ b/starboard/shared/posix/impl/file_impl.h @@ -19,7 +19,6 @@ #include "starboard/common/time.h" #include "starboard/configuration.h" -#include "starboard/file.h" #include "starboard/shared/internal_only.h" diff --git a/starboard/shared/posix/impl/file_open.h b/starboard/shared/posix/impl/file_open.h index 8721d5b5cc0..f2859a69898 100644 --- a/starboard/shared/posix/impl/file_open.h +++ b/starboard/shared/posix/impl/file_open.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_OPEN_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_OPEN_H_ -#include "starboard/file.h" - #include #include #include diff --git a/starboard/shared/posix/impl/file_read.h b/starboard/shared/posix/impl/file_read.h index 8be3e99a72b..0a998205965 100644 --- a/starboard/shared/posix/impl/file_read.h +++ b/starboard/shared/posix/impl/file_read.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_READ_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_READ_H_ -#include "starboard/file.h" - #include #include "starboard/shared/posix/handle_eintr.h" diff --git a/starboard/shared/posix/impl/file_seek.h b/starboard/shared/posix/impl/file_seek.h index c769b882db1..8d710af2c40 100644 --- a/starboard/shared/posix/impl/file_seek.h +++ b/starboard/shared/posix/impl/file_seek.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_SEEK_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_SEEK_H_ -#include "starboard/file.h" - #include #include "starboard/shared/internal_only.h" diff --git a/starboard/shared/posix/impl/file_truncate.h b/starboard/shared/posix/impl/file_truncate.h index 0f8d8a3c1f2..67ee5d57df3 100644 --- a/starboard/shared/posix/impl/file_truncate.h +++ b/starboard/shared/posix/impl/file_truncate.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_TRUNCATE_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_TRUNCATE_H_ -#include "starboard/file.h" - #include #include "starboard/shared/posix/handle_eintr.h" diff --git a/starboard/shared/posix/impl/file_write.h b/starboard/shared/posix/impl/file_write.h index 13dc16a6867..783c07e69d9 100644 --- a/starboard/shared/posix/impl/file_write.h +++ b/starboard/shared/posix/impl/file_write.h @@ -17,8 +17,6 @@ #ifndef STARBOARD_SHARED_POSIX_IMPL_FILE_WRITE_H_ #define STARBOARD_SHARED_POSIX_IMPL_FILE_WRITE_H_ -#include "starboard/file.h" - #include #include "starboard/shared/posix/handle_eintr.h" diff --git a/starboard/shared/starboard/localized_strings.h b/starboard/shared/starboard/localized_strings.h index 9cea810ceaf..37f95ce7346 100644 --- a/starboard/shared/starboard/localized_strings.h +++ b/starboard/shared/starboard/localized_strings.h @@ -20,8 +20,6 @@ #include #include -#include "starboard/file.h" - namespace starboard { namespace shared { namespace starboard { diff --git a/starboard/shared/starboard/player/video_dmp_writer.h b/starboard/shared/starboard/player/video_dmp_writer.h index 4869f160ac5..f5212ff1d28 100644 --- a/starboard/shared/starboard/player/video_dmp_writer.h +++ b/starboard/shared/starboard/player/video_dmp_writer.h @@ -15,7 +15,6 @@ #ifndef STARBOARD_SHARED_STARBOARD_PLAYER_VIDEO_DMP_WRITER_H_ #define STARBOARD_SHARED_STARBOARD_PLAYER_VIDEO_DMP_WRITER_H_ -#include "starboard/file.h" #include "starboard/media.h" #include "starboard/player.h" #include "starboard/shared/internal_only.h" diff --git a/starboard/stub/javascript_cache.cc b/starboard/stub/javascript_cache.cc index c458fac2ff6..c2ca1bcfd52 100644 --- a/starboard/stub/javascript_cache.cc +++ b/starboard/stub/javascript_cache.cc @@ -19,7 +19,6 @@ #include "starboard/common/log.h" #include "starboard/extension/javascript_cache.h" -#include "starboard/file.h" namespace starboard { namespace stub { diff --git a/third_party/boringssl/src/config/starboard/openssl/opensslconf.h b/third_party/boringssl/src/config/starboard/openssl/opensslconf.h index 013897e67f1..7f289ac4309 100644 --- a/third_party/boringssl/src/config/starboard/openssl/opensslconf.h +++ b/third_party/boringssl/src/config/starboard/openssl/opensslconf.h @@ -4,7 +4,7 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" -#include "starboard/file.h" + #include "starboard/memory.h" #include "starboard/system.h" diff --git a/third_party/crashpad/crashpad/wrapper/wrapper.cc b/third_party/crashpad/crashpad/wrapper/wrapper.cc index 55d143cf7ea..4c738b2b0bd 100644 --- a/third_party/crashpad/crashpad/wrapper/wrapper.cc +++ b/third_party/crashpad/crashpad/wrapper/wrapper.cc @@ -28,7 +28,7 @@ #include "starboard/common/system_property.h" #include "starboard/configuration_constants.h" #include "starboard/extension/loader_app_metrics.h" -#include "starboard/file.h" + #include "starboard/system.h" #include "third_party/crashpad/crashpad/snapshot/sanitized/sanitization_information.h" diff --git a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h index db8d516f9a4..78318de8079 100644 --- a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h +++ b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h @@ -273,7 +273,7 @@ #include "starboard/common/log.h" #include "starboard/common/spin_lock.h" #include "starboard/common/string.h" -#include "starboard/file.h" + #include "starboard/log.h" #include "starboard/memory.h" #include "starboard/system.h" diff --git a/third_party/libjpeg_turbo/jinclude.h b/third_party/libjpeg_turbo/jinclude.h index 0fb7acf812f..2029edc11ce 100644 --- a/third_party/libjpeg_turbo/jinclude.h +++ b/third_party/libjpeg_turbo/jinclude.h @@ -34,7 +34,7 @@ */ #ifdef STARBOARD -#include "starboard/file.h" + #endif #include #include From 8e2ffbd1f3865dd6d97234ba9be5fd07b0f427a7 Mon Sep 17 00:00:00 2001 From: Madhura Jayaraman Date: Thu, 12 Sep 2024 14:00:11 -0700 Subject: [PATCH 6/7] Remove whitespace Change-Id: I1eee7a8f32f37af5443c0e742eabb19e32ce789d --- base/files/file.cc | 1 - base/files/file_enumerator.h | 1 - base/files/file_enumerator_starboard.cc | 1 - base/files/file_starboard.cc | 1 - base/files/platform_file.h | 4 ---- base/files/scoped_file.h | 1 - base/logging.cc | 1 - base/memory/platform_shared_memory_handle.h | 1 - chrome/updater/util.cc | 1 - cobalt/dom/window.cc | 1 - cobalt/loader/image/jpeg_image_decoder.h | 1 - cobalt/network/dial/dial_system_config.cc | 1 - components/update_client/cobalt_slot_management.cc | 2 +- components/update_client/cobalt_slot_management_test.cc | 1 + net/cert/internal/trust_store_in_memory_starboard.cc | 1 - starboard/android/shared/android_main.cc | 3 --- starboard/android/shared/video_decoder.cc | 1 - starboard/client_porting/icu_init/icu_init.cc | 1 - starboard/common/file.cc | 2 -- starboard/common/paths.cc | 1 - .../cast_starboard_api/samples/cast_starboard_api_test.cc | 1 - starboard/elf_loader/elf_loader_impl.cc | 1 - starboard/elf_loader/elf_loader_sandbox.cc | 1 - starboard/elf_loader/exported_symbols.cc | 1 - starboard/elf_loader/lz4_file_impl_test.cc | 1 - starboard/elf_loader/relocations_test.cc | 1 - starboard/loader_app/loader_app.cc | 1 - starboard/loader_app/slot_management.cc | 1 - starboard/loader_app/slot_management_test.cc | 1 - starboard/loader_app/system_get_extension_shim.cc | 1 - starboard/nplb/extern_c_test.cc | 1 - starboard/nplb/file_delete_recursive_test.cc | 1 - starboard/nplb/include_all.c | 1 - starboard/nplb/nplb_evergreen_compat_tests/fonts_test.cc | 1 - starboard/nplb/player_get_audio_configuration_test.cc | 1 - starboard/nplb/player_get_media_time_test.cc | 1 - starboard/nplb/player_write_sample_test.cc | 1 - .../nplb/posix_compliance/posix_directory_create_test.cc | 1 - .../nplb/posix_compliance/posix_directory_get_next_test.cc | 1 - starboard/nplb/posix_compliance/posix_directory_open_test.cc | 1 - starboard/nplb/posix_compliance/posix_file_get_info_test.cc | 1 - .../nplb/posix_compliance/posix_file_get_path_info_test.cc | 1 - starboard/nplb/system_get_error_string_test.cc | 1 - starboard/shared/libde265/de265_video_decoder.cc | 1 - starboard/shared/libjpeg/jpeg_image_decoder.cc | 1 - starboard/shared/media_session/playback_state.cc | 1 - starboard/shared/starboard/player/filter/testing/test_util.cc | 1 - .../boringssl/src/config/starboard/openssl/opensslconf.h | 2 -- third_party/crashpad/crashpad/wrapper/wrapper.cc | 1 - third_party/freetype/src/include/freetype/config/ftstdlib.h | 1 - .../src/googletest/include/gtest/internal/gtest-port.h | 1 - third_party/libjpeg_turbo/jinclude.h | 4 ---- third_party/libxml/starboard/config.h | 1 - third_party/zlib/arm_features.c | 1 - 54 files changed, 2 insertions(+), 63 deletions(-) diff --git a/base/files/file.cc b/base/files/file.cc index aa4e59563d7..d582682a0d3 100644 --- a/base/files/file.cc +++ b/base/files/file.cc @@ -15,7 +15,6 @@ #include "base/timer/elapsed_timer.h" #include "base/trace_event/base_tracing.h" #include "build/build_config.h" - #if defined(STARBOARD) #include "starboard/types.h" #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) diff --git a/base/files/file_enumerator.h b/base/files/file_enumerator.h index d2dd14c5ba5..ea49aeb16a2 100644 --- a/base/files/file_enumerator.h +++ b/base/files/file_enumerator.h @@ -20,7 +20,6 @@ #if defined(STARBOARD) #include #include - #elif BUILDFLAG(IS_WIN) #include "base/win/windows_types.h" #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) diff --git a/base/files/file_enumerator_starboard.cc b/base/files/file_enumerator_starboard.cc index 98fba17ffc5..efa6f0813f7 100644 --- a/base/files/file_enumerator_starboard.cc +++ b/base/files/file_enumerator_starboard.cc @@ -22,7 +22,6 @@ #include "starboard/common/log.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" - #include "starboard/memory.h" namespace base { diff --git a/base/files/file_starboard.cc b/base/files/file_starboard.cc index cdb9fa2f8ea..7cd56ffef29 100644 --- a/base/files/file_starboard.cc +++ b/base/files/file_starboard.cc @@ -29,7 +29,6 @@ #include "base/threading/thread_restrictions.h" #include "starboard/common/metrics/stats_tracker.h" - namespace base { void RecordFileWriteStat(int write_file_result) { diff --git a/base/files/platform_file.h b/base/files/platform_file.h index 1bbe29f54d7..169727ab086 100644 --- a/base/files/platform_file.h +++ b/base/files/platform_file.h @@ -8,10 +8,6 @@ #include "base/files/scoped_file.h" #include "build/build_config.h" -#if defined(STARBOARD) - -#endif - #if BUILDFLAG(IS_WIN) #include "base/win/scoped_handle.h" #include "base/win/windows_types.h" diff --git a/base/files/scoped_file.h b/base/files/scoped_file.h index 38b9fd86299..030430400dc 100644 --- a/base/files/scoped_file.h +++ b/base/files/scoped_file.h @@ -15,7 +15,6 @@ #include "build/build_config.h" #if defined(STARBOARD) - #include "starboard/types.h" #include "starboard/common/file.h" #endif diff --git a/base/logging.cc b/base/logging.cc index d4f4bf9c68c..f988b19bb0e 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -48,7 +48,6 @@ #include "starboard/common/time.h" #include "starboard/configuration.h" #include "starboard/configuration_constants.h" - #include "starboard/system.h" typedef int* FileHandle; typedef pthread_mutex_t MutexHandle; diff --git a/base/memory/platform_shared_memory_handle.h b/base/memory/platform_shared_memory_handle.h index 7241ca90110..0de54d0f3b0 100644 --- a/base/memory/platform_shared_memory_handle.h +++ b/base/memory/platform_shared_memory_handle.h @@ -20,7 +20,6 @@ #include "base/files/scoped_file.h" #elif defined(STARBOARD) #include "base/files/scoped_file.h" - #endif namespace base::subtle { diff --git a/chrome/updater/util.cc b/chrome/updater/util.cc index 4771dff6c51..bc50f5e6dbb 100644 --- a/chrome/updater/util.cc +++ b/chrome/updater/util.cc @@ -23,7 +23,6 @@ #include "crypto/sha2.h" #include "starboard/configuration_constants.h" #include "starboard/extension/installation_manager.h" - #include "starboard/system.h" #define PRODUCT_FULLNAME_STRING "cobalt_updater" diff --git a/cobalt/dom/window.cc b/cobalt/dom/window.cc index 2d0a9d90ef2..dec0fb0fcc7 100644 --- a/cobalt/dom/window.cc +++ b/cobalt/dom/window.cc @@ -58,7 +58,6 @@ #include "cobalt/web/event.h" #include "cobalt/web/window_or_worker_global_scope.h" - using cobalt::cssom::ViewportSize; using cobalt::media_session::MediaSession; diff --git a/cobalt/loader/image/jpeg_image_decoder.h b/cobalt/loader/image/jpeg_image_decoder.h index 25ded31faa4..37352aea9b3 100644 --- a/cobalt/loader/image/jpeg_image_decoder.h +++ b/cobalt/loader/image/jpeg_image_decoder.h @@ -24,7 +24,6 @@ #include "cobalt/loader/image/image.h" #include "cobalt/loader/image/image_data_decoder.h" - // Inhibit C++ name-mangling for libjpeg functions. extern "C" { #include "third_party/libjpeg_turbo/jpeglib.h" diff --git a/cobalt/network/dial/dial_system_config.cc b/cobalt/network/dial/dial_system_config.cc index 9471f44ded8..7d9bc32cf3e 100644 --- a/cobalt/network/dial/dial_system_config.cc +++ b/cobalt/network/dial/dial_system_config.cc @@ -25,7 +25,6 @@ #include "net/base/net_string_util.h" #if defined(STARBOARD) - #include "starboard/types.h" #endif diff --git a/components/update_client/cobalt_slot_management.cc b/components/update_client/cobalt_slot_management.cc index 9707876fd4a..0ebece98358 100644 --- a/components/update_client/cobalt_slot_management.cc +++ b/components/update_client/cobalt_slot_management.cc @@ -25,7 +25,7 @@ #include "chrome/updater/util.h" #include "components/update_client/utils.h" #include "starboard/configuration_constants.h" - +#include "starboard/file.h" #include "starboard/loader_app/app_key_files.h" #include "starboard/loader_app/drain_file.h" diff --git a/components/update_client/cobalt_slot_management_test.cc b/components/update_client/cobalt_slot_management_test.cc index 47e3434be6b..378ddaf1356 100644 --- a/components/update_client/cobalt_slot_management_test.cc +++ b/components/update_client/cobalt_slot_management_test.cc @@ -23,6 +23,7 @@ #include "base/time/time.h" #include "starboard/common/file.h" #include "starboard/extension/free_space.h" +#include "starboard/file.h" #include "starboard/loader_app/app_key_files.h" #include "starboard/loader_app/drain_file.h" #include "starboard/loader_app/drain_file_helper.h" diff --git a/net/cert/internal/trust_store_in_memory_starboard.cc b/net/cert/internal/trust_store_in_memory_starboard.cc index e06c78ecbee..9648478a32b 100644 --- a/net/cert/internal/trust_store_in_memory_starboard.cc +++ b/net/cert/internal/trust_store_in_memory_starboard.cc @@ -28,7 +28,6 @@ #include "starboard/common/string.h" #include "starboard/configuration_constants.h" - #include "third_party/boringssl/src/include/openssl/digest.h" #include "third_party/boringssl/src/include/openssl/sha.h" #include "third_party/boringssl/src/include/openssl/x509.h" diff --git a/starboard/android/shared/android_main.cc b/starboard/android/shared/android_main.cc index 5985acec80c..9912d85586f 100644 --- a/starboard/android/shared/android_main.cc +++ b/starboard/android/shared/android_main.cc @@ -26,9 +26,6 @@ #include "starboard/common/file.h" #include "starboard/common/semaphore.h" #include "starboard/common/string.h" -#if SB_IS(EVERGREEN_COMPATIBLE) - -#endif #include "starboard/event.h" #include "starboard/log.h" #include "starboard/shared/starboard/command_line.h" diff --git a/starboard/android/shared/video_decoder.cc b/starboard/android/shared/video_decoder.cc index 3593f878d2b..e345dc1e5e6 100644 --- a/starboard/android/shared/video_decoder.cc +++ b/starboard/android/shared/video_decoder.cc @@ -36,7 +36,6 @@ #include "starboard/memory.h" #include "starboard/shared/starboard/media/mime_type.h" #include "starboard/shared/starboard/player/filter/video_frame_internal.h" - #include "starboard/thread.h" namespace starboard { diff --git a/starboard/client_porting/icu_init/icu_init.cc b/starboard/client_porting/icu_init/icu_init.cc index defb2f852d7..63c47bcbc08 100644 --- a/starboard/client_porting/icu_init/icu_init.cc +++ b/starboard/client_porting/icu_init/icu_init.cc @@ -23,7 +23,6 @@ #include "starboard/common/once.h" #include "starboard/configuration.h" #include "starboard/configuration_constants.h" - #include "starboard/system.h" #include "third_party/icu/source/common/unicode/putil.h" #include "third_party/icu/source/common/unicode/udata.h" diff --git a/starboard/common/file.cc b/starboard/common/file.cc index 3c65bc57fac..351fe59b792 100644 --- a/starboard/common/file.cc +++ b/starboard/common/file.cc @@ -28,8 +28,6 @@ #include "starboard/common/string.h" #include "starboard/configuration_constants.h" -#include "starboard/shared/starboard/file_atomic_replace_write_file.h" - namespace starboard { namespace { diff --git a/starboard/common/paths.cc b/starboard/common/paths.cc index 6acbdff73d5..290b25b4acc 100644 --- a/starboard/common/paths.cc +++ b/starboard/common/paths.cc @@ -20,7 +20,6 @@ #include #include "starboard/common/log.h" #include "starboard/configuration_constants.h" - #include "starboard/system.h" namespace starboard { diff --git a/starboard/contrib/cast/cast_starboard_api/samples/cast_starboard_api_test.cc b/starboard/contrib/cast/cast_starboard_api/samples/cast_starboard_api_test.cc index 31cbd649a11..f7235bc98c7 100644 --- a/starboard/contrib/cast/cast_starboard_api/samples/cast_starboard_api_test.cc +++ b/starboard/contrib/cast/cast_starboard_api/samples/cast_starboard_api_test.cc @@ -8,7 +8,6 @@ #include "starboard/common/thread.h" #include "starboard/egl.h" #include "starboard/event.h" - #include "starboard/gles.h" #include "starboard/system.h" #include "starboard/window.h" diff --git a/starboard/elf_loader/elf_loader_impl.cc b/starboard/elf_loader/elf_loader_impl.cc index ef11493db33..8c1913203ee 100644 --- a/starboard/elf_loader/elf_loader_impl.cc +++ b/starboard/elf_loader/elf_loader_impl.cc @@ -25,7 +25,6 @@ #include "starboard/elf_loader/lz4_file_impl.h" #include "starboard/extension/loader_app_metrics.h" #include "starboard/memory.h" - #include "starboard/system.h" namespace starboard { diff --git a/starboard/elf_loader/elf_loader_sandbox.cc b/starboard/elf_loader/elf_loader_sandbox.cc index 2ac91c228d8..2961c41b87c 100644 --- a/starboard/elf_loader/elf_loader_sandbox.cc +++ b/starboard/elf_loader/elf_loader_sandbox.cc @@ -24,7 +24,6 @@ #include "starboard/elf_loader/sabi_string.h" #include "starboard/event.h" #include "starboard/shared/starboard/command_line.h" - #include "third_party/crashpad/crashpad/wrapper/annotations.h" #include "third_party/crashpad/crashpad/wrapper/wrapper.h" diff --git a/starboard/elf_loader/exported_symbols.cc b/starboard/elf_loader/exported_symbols.cc index e0072f9678b..1d875d6e867 100644 --- a/starboard/elf_loader/exported_symbols.cc +++ b/starboard/elf_loader/exported_symbols.cc @@ -54,7 +54,6 @@ #include "starboard/socket_waiter.h" #include "starboard/speech_synthesis.h" #include "starboard/storage.h" - #include "starboard/system.h" #include "starboard/thread.h" #include "starboard/time_zone.h" diff --git a/starboard/elf_loader/lz4_file_impl_test.cc b/starboard/elf_loader/lz4_file_impl_test.cc index 19e317f26e2..dedecb32f81 100644 --- a/starboard/elf_loader/lz4_file_impl_test.cc +++ b/starboard/elf_loader/lz4_file_impl_test.cc @@ -17,7 +17,6 @@ #include "starboard/elf_loader/lz4_file_impl.h" #include "starboard/configuration_constants.h" - #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/elf_loader/relocations_test.cc b/starboard/elf_loader/relocations_test.cc index cc673ab3179..4ce54b2cfc0 100644 --- a/starboard/elf_loader/relocations_test.cc +++ b/starboard/elf_loader/relocations_test.cc @@ -18,7 +18,6 @@ #include "starboard/elf_loader/elf.h" #include "starboard/elf_loader/file_impl.h" - #include "testing/gtest/include/gtest/gtest.h" namespace starboard { diff --git a/starboard/loader_app/loader_app.cc b/starboard/loader_app/loader_app.cc index 5dea517ee9e..4e7ac1b7960 100644 --- a/starboard/loader_app/loader_app.cc +++ b/starboard/loader_app/loader_app.cc @@ -28,7 +28,6 @@ #include "starboard/elf_loader/sabi_string.h" #include "starboard/event.h" #include "starboard/extension/loader_app_metrics.h" - #include "starboard/loader_app/app_key.h" #include "starboard/loader_app/loader_app_switches.h" #include "starboard/loader_app/memory_tracker_thread.h" diff --git a/starboard/loader_app/slot_management.cc b/starboard/loader_app/slot_management.cc index ef4a5b13b80..1c06bbb3d10 100644 --- a/starboard/loader_app/slot_management.cc +++ b/starboard/loader_app/slot_management.cc @@ -31,7 +31,6 @@ #include "starboard/elf_loader/sabi_string.h" #include "starboard/event.h" #include "starboard/extension/loader_app_metrics.h" - #include "starboard/loader_app/app_key_files.h" #include "starboard/loader_app/drain_file.h" #include "starboard/loader_app/installation_manager.h" diff --git a/starboard/loader_app/slot_management_test.cc b/starboard/loader_app/slot_management_test.cc index 62e1d5dd0f4..ac44f62e80e 100644 --- a/starboard/loader_app/slot_management_test.cc +++ b/starboard/loader_app/slot_management_test.cc @@ -28,7 +28,6 @@ #include "starboard/configuration_constants.h" #include "starboard/elf_loader/sabi_string.h" #include "starboard/event.h" - #include "starboard/loader_app/app_key_files.h" #include "starboard/loader_app/drain_file.h" #include "starboard/loader_app/installation_manager.h" diff --git a/starboard/loader_app/system_get_extension_shim.cc b/starboard/loader_app/system_get_extension_shim.cc index 88acae4388e..6a008b1241a 100644 --- a/starboard/loader_app/system_get_extension_shim.cc +++ b/starboard/loader_app/system_get_extension_shim.cc @@ -20,7 +20,6 @@ #include "starboard/common/log.h" #include "starboard/extension/installation_manager.h" #include "starboard/loader_app/installation_manager.h" - #include "starboard/system.h" namespace { diff --git a/starboard/nplb/extern_c_test.cc b/starboard/nplb/extern_c_test.cc index 4c503322749..c3ddc821359 100644 --- a/starboard/nplb/extern_c_test.cc +++ b/starboard/nplb/extern_c_test.cc @@ -24,7 +24,6 @@ extern "C" { #include "starboard/egl.h" #include "starboard/event.h" #include "starboard/export.h" - #include "starboard/gles.h" #include "starboard/input.h" #include "starboard/key.h" diff --git a/starboard/nplb/file_delete_recursive_test.cc b/starboard/nplb/file_delete_recursive_test.cc index 1053a334371..2a6b73dcc2e 100644 --- a/starboard/nplb/file_delete_recursive_test.cc +++ b/starboard/nplb/file_delete_recursive_test.cc @@ -18,7 +18,6 @@ #include "starboard/common/file.h" #include "starboard/configuration_constants.h" - #include "starboard/nplb/file_helpers.h" #include "starboard/types.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/include_all.c b/starboard/nplb/include_all.c index b61fc45687a..ae05b9412a8 100644 --- a/starboard/nplb/include_all.c +++ b/starboard/nplb/include_all.c @@ -23,7 +23,6 @@ #include "starboard/egl.h" #include "starboard/event.h" #include "starboard/export.h" - #include "starboard/gles.h" #include "starboard/input.h" #include "starboard/key.h" diff --git a/starboard/nplb/nplb_evergreen_compat_tests/fonts_test.cc b/starboard/nplb/nplb_evergreen_compat_tests/fonts_test.cc index 32c4437451f..cd1a56e5b47 100644 --- a/starboard/nplb/nplb_evergreen_compat_tests/fonts_test.cc +++ b/starboard/nplb/nplb_evergreen_compat_tests/fonts_test.cc @@ -19,7 +19,6 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" - #include "starboard/nplb/nplb_evergreen_compat_tests/checks.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/player_get_audio_configuration_test.cc b/starboard/nplb/player_get_audio_configuration_test.cc index 932197147d7..41bc2c8a634 100644 --- a/starboard/nplb/player_get_audio_configuration_test.cc +++ b/starboard/nplb/player_get_audio_configuration_test.cc @@ -15,7 +15,6 @@ #include #include "starboard/nplb/player_test_fixture.h" - #include "starboard/testing/fake_graphics_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/player_get_media_time_test.cc b/starboard/nplb/player_get_media_time_test.cc index f28fffe0429..d08a241763f 100644 --- a/starboard/nplb/player_get_media_time_test.cc +++ b/starboard/nplb/player_get_media_time_test.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "starboard/nplb/player_test_fixture.h" - #include "starboard/testing/fake_graphics_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/player_write_sample_test.cc b/starboard/nplb/player_write_sample_test.cc index dc6ae77928e..ab10b02110f 100644 --- a/starboard/nplb/player_write_sample_test.cc +++ b/starboard/nplb/player_write_sample_test.cc @@ -18,7 +18,6 @@ #include "starboard/nplb/player_test_fixture.h" #include "starboard/nplb/player_test_util.h" #include "starboard/nplb/posix_compliance/posix_thread_helpers.h" - #include "starboard/testing/fake_graphics_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_create_test.cc b/starboard/nplb/posix_compliance/posix_directory_create_test.cc index 168f1f341aa..db8cb81c42c 100644 --- a/starboard/nplb/posix_compliance/posix_directory_create_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_create_test.cc @@ -15,7 +15,6 @@ #include #include "starboard/configuration_constants.h" - #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc b/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc index abbd23ad7da..86a747fe819 100644 --- a/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_get_next_test.cc @@ -21,7 +21,6 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" #include "starboard/configuration_constants.h" - #include "starboard/nplb/file_helpers.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_directory_open_test.cc b/starboard/nplb/posix_compliance/posix_directory_open_test.cc index ae90740d8ab..41d530ff7f9 100644 --- a/starboard/nplb/posix_compliance/posix_directory_open_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_open_test.cc @@ -17,7 +17,6 @@ #include #include "starboard/configuration_constants.h" - #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_file_get_info_test.cc b/starboard/nplb/posix_compliance/posix_file_get_info_test.cc index 7a03d4bb690..f6bb06cfc58 100644 --- a/starboard/nplb/posix_compliance/posix_file_get_info_test.cc +++ b/starboard/nplb/posix_compliance/posix_file_get_info_test.cc @@ -21,7 +21,6 @@ #include #include "starboard/common/time.h" - #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/posix_compliance/posix_file_get_path_info_test.cc b/starboard/nplb/posix_compliance/posix_file_get_path_info_test.cc index 403bf5b3a41..81a27511cdb 100644 --- a/starboard/nplb/posix_compliance/posix_file_get_path_info_test.cc +++ b/starboard/nplb/posix_compliance/posix_file_get_path_info_test.cc @@ -20,7 +20,6 @@ #include "starboard/common/time.h" #include "starboard/configuration_constants.h" - #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/nplb/system_get_error_string_test.cc b/starboard/nplb/system_get_error_string_test.cc index 5343a217ba3..e47177fd39a 100644 --- a/starboard/nplb/system_get_error_string_test.cc +++ b/starboard/nplb/system_get_error_string_test.cc @@ -15,7 +15,6 @@ #include #include "starboard/common/string.h" - #include "starboard/nplb/file_helpers.h" #include "starboard/system.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/starboard/shared/libde265/de265_video_decoder.cc b/starboard/shared/libde265/de265_video_decoder.cc index bcc027fd67e..27746f30e60 100644 --- a/starboard/shared/libde265/de265_video_decoder.cc +++ b/starboard/shared/libde265/de265_video_decoder.cc @@ -17,7 +17,6 @@ #include "starboard/common/string.h" #include "starboard/linux/shared/decode_target_internal.h" #include "starboard/shared/libde265/de265_library_loader.h" - #include "starboard/thread.h" namespace starboard { diff --git a/starboard/shared/libjpeg/jpeg_image_decoder.cc b/starboard/shared/libjpeg/jpeg_image_decoder.cc index d2100df5515..c7308d7e489 100644 --- a/starboard/shared/libjpeg/jpeg_image_decoder.cc +++ b/starboard/shared/libjpeg/jpeg_image_decoder.cc @@ -21,7 +21,6 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" - #include "starboard/linux/shared/decode_target_internal.h" // Inhibit C++ name-mangling for libjpeg functions. diff --git a/starboard/shared/media_session/playback_state.cc b/starboard/shared/media_session/playback_state.cc index 55adb2c6a08..b12b2041f36 100644 --- a/starboard/shared/media_session/playback_state.cc +++ b/starboard/shared/media_session/playback_state.cc @@ -18,7 +18,6 @@ #include "starboard/common/log.h" #include "starboard/extension/media_session.h" - #include "starboard/system.h" namespace starboard { diff --git a/starboard/shared/starboard/player/filter/testing/test_util.cc b/starboard/shared/starboard/player/filter/testing/test_util.cc index afb8a1a154c..daf8c78d39d 100644 --- a/starboard/shared/starboard/player/filter/testing/test_util.cc +++ b/starboard/shared/starboard/player/filter/testing/test_util.cc @@ -24,7 +24,6 @@ #include "starboard/shared/starboard/player/filter/player_components.h" #include "starboard/shared/starboard/player/filter/stub_player_components_factory.h" #include "starboard/shared/starboard/player/video_dmp_reader.h" - #include "starboard/system.h" namespace starboard { diff --git a/third_party/boringssl/src/config/starboard/openssl/opensslconf.h b/third_party/boringssl/src/config/starboard/openssl/opensslconf.h index 7f289ac4309..b483a95fa4f 100644 --- a/third_party/boringssl/src/config/starboard/openssl/opensslconf.h +++ b/third_party/boringssl/src/config/starboard/openssl/opensslconf.h @@ -4,9 +4,7 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" - #include "starboard/memory.h" - #include "starboard/system.h" #include "starboard/thread.h" diff --git a/third_party/crashpad/crashpad/wrapper/wrapper.cc b/third_party/crashpad/crashpad/wrapper/wrapper.cc index 4c738b2b0bd..75ba2acd8b0 100644 --- a/third_party/crashpad/crashpad/wrapper/wrapper.cc +++ b/third_party/crashpad/crashpad/wrapper/wrapper.cc @@ -28,7 +28,6 @@ #include "starboard/common/system_property.h" #include "starboard/configuration_constants.h" #include "starboard/extension/loader_app_metrics.h" - #include "starboard/system.h" #include "third_party/crashpad/crashpad/snapshot/sanitized/sanitization_information.h" diff --git a/third_party/freetype/src/include/freetype/config/ftstdlib.h b/third_party/freetype/src/include/freetype/config/ftstdlib.h index a4088260c66..64cf92303bf 100644 --- a/third_party/freetype/src/include/freetype/config/ftstdlib.h +++ b/third_party/freetype/src/include/freetype/config/ftstdlib.h @@ -115,7 +115,6 @@ #include "starboard/common/file_wrapper.h" - #define FT_FILE FileStruct #define ft_fclose file_close #define ft_fopen(p, m) file_open((p), FileModeStringToFlags(m)) diff --git a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h index 78318de8079..f3aa05b5e53 100644 --- a/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h +++ b/third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h @@ -273,7 +273,6 @@ #include "starboard/common/log.h" #include "starboard/common/spin_lock.h" #include "starboard/common/string.h" - #include "starboard/log.h" #include "starboard/memory.h" #include "starboard/system.h" diff --git a/third_party/libjpeg_turbo/jinclude.h b/third_party/libjpeg_turbo/jinclude.h index 2029edc11ce..72c26e1e426 100644 --- a/third_party/libjpeg_turbo/jinclude.h +++ b/third_party/libjpeg_turbo/jinclude.h @@ -32,10 +32,6 @@ * But we must pull it in because of the references to FILE in jpeglib.h. * You can remove those references if you want to compile without . */ - -#ifdef STARBOARD - -#endif #include #include #include diff --git a/third_party/libxml/starboard/config.h b/third_party/libxml/starboard/config.h index 087d7edc42d..ad5569d3801 100644 --- a/third_party/libxml/starboard/config.h +++ b/third_party/libxml/starboard/config.h @@ -1,7 +1,6 @@ #include "starboard/common/log.h" #include "starboard/configuration.h" #include "starboard/memory.h" - #include "starboard/types.h" /* Define if getaddrinfo is there */ diff --git a/third_party/zlib/arm_features.c b/third_party/zlib/arm_features.c index b5b84bc50ea..85eff572ce8 100644 --- a/third_party/zlib/arm_features.c +++ b/third_party/zlib/arm_features.c @@ -21,7 +21,6 @@ int ZLIB_INTERNAL arm_cpu_enable_pmull = 0; #if defined(STARBOARD) #include "starboard/log.h" - #include "starboard/cpu_features.h" #elif defined(ARMV8_OS_ANDROID) #include From 457f3817e9aba57a533afa55038b343e5a6b0e7b Mon Sep 17 00:00:00 2001 From: Madhura Jayaraman Date: Thu, 12 Sep 2024 14:08:46 -0700 Subject: [PATCH 7/7] Remaining whitespace changes Change-Id: Ia490b44eb35917b1f9ec0fc23a8678f67b68a4ca --- net/cert/internal/trust_store_in_memory_starboard.cc | 1 - starboard/nplb/extern_c_test.cc | 1 - starboard/nplb/include_all.c | 1 - 3 files changed, 3 deletions(-) diff --git a/net/cert/internal/trust_store_in_memory_starboard.cc b/net/cert/internal/trust_store_in_memory_starboard.cc index 9648478a32b..9d95765cfb5 100644 --- a/net/cert/internal/trust_store_in_memory_starboard.cc +++ b/net/cert/internal/trust_store_in_memory_starboard.cc @@ -27,7 +27,6 @@ #include "net/cert/x509_util.h" #include "starboard/common/string.h" #include "starboard/configuration_constants.h" - #include "third_party/boringssl/src/include/openssl/digest.h" #include "third_party/boringssl/src/include/openssl/sha.h" #include "third_party/boringssl/src/include/openssl/x509.h" diff --git a/starboard/nplb/extern_c_test.cc b/starboard/nplb/extern_c_test.cc index c3ddc821359..f5f46ede4e1 100644 --- a/starboard/nplb/extern_c_test.cc +++ b/starboard/nplb/extern_c_test.cc @@ -36,7 +36,6 @@ extern "C" { #include "starboard/socket_waiter.h" #include "starboard/speech_synthesis.h" #include "starboard/storage.h" - #include "starboard/system.h" #include "starboard/thread.h" #include "starboard/time_zone.h" diff --git a/starboard/nplb/include_all.c b/starboard/nplb/include_all.c index ae05b9412a8..6f576ef7266 100644 --- a/starboard/nplb/include_all.c +++ b/starboard/nplb/include_all.c @@ -35,7 +35,6 @@ #include "starboard/socket_waiter.h" #include "starboard/speech_synthesis.h" #include "starboard/storage.h" - #include "starboard/system.h" #include "starboard/thread.h" #include "starboard/time_zone.h"