Skip to content

Commit

Permalink
Revert SB17 macros.
Browse files Browse the repository at this point in the history
b/302715109

Change-Id: If2072acde133ffe14242c6228295579a08142cc7
  • Loading branch information
yjzhang111 committed Aug 21, 2024
1 parent ddbb355 commit 0596d85
Show file tree
Hide file tree
Showing 55 changed files with 0 additions and 230 deletions.
4 changes: 0 additions & 4 deletions starboard/android/shared/file_can_open.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include <android/asset_manager.h>
Expand Down Expand Up @@ -43,5 +41,3 @@ bool SbFileCanOpen(const char* path, int flags) {

return result;
}

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/android/shared/file_close.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include <android/asset_manager.h>
Expand All @@ -30,5 +28,3 @@ bool SbFileClose(SbFile file) {

return ::starboard::shared::posix::impl::FileClose(file);
}

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/android/shared/file_delete.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include "starboard/android/shared/file_internal.h"
Expand All @@ -22,5 +20,3 @@
bool SbFileDelete(const char* path) {
return ::starboard::shared::posix::impl::FileDelete(path);
}

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/android/shared/file_exists.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 16

#include "starboard/file.h"

bool SbFileExists(const char* path) {
return SbFileCanOpen(path, kSbFileRead);
}

#endif // SB_API_VERSION < 16
4 changes: 0 additions & 4 deletions starboard/android/shared/file_flush.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include "starboard/android/shared/file_internal.h"
Expand All @@ -22,5 +20,3 @@
bool SbFileFlush(SbFile file) {
return ::starboard::shared::posix::impl::FileFlush(file);
}

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/android/shared/file_get_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include <android/asset_manager.h>
Expand All @@ -34,5 +32,3 @@ bool SbFileGetInfo(SbFile file, SbFileInfo* out_info) {

return ::starboard::shared::posix::impl::FileGetInfo(file, out_info);
}

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/android/shared/file_open.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include <android/asset_manager.h>
Expand Down Expand Up @@ -106,5 +104,3 @@ SbFile SbFileOpen(const char* path,
}
return kSbFileInvalid;
}

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/android/shared/file_read.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include <android/asset_manager.h>
Expand All @@ -32,5 +30,3 @@ int SbFileRead(SbFile file, char* data, int size) {
return ::starboard::shared::posix::impl::FileRead(file, data, size);
}
}

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/android/shared/file_seek.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include <android/asset_manager.h>
Expand All @@ -28,5 +26,3 @@ int64_t SbFileSeek(SbFile file, SbFileWhence whence, int64_t offset) {
return ::starboard::shared::posix::impl::FileSeek(file, whence, offset);
}
}

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/android/shared/file_truncate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include "starboard/android/shared/file_internal.h"
Expand All @@ -22,5 +20,3 @@
bool SbFileTruncate(SbFile file, int64_t length) {
return ::starboard::shared::posix::impl::FileTruncate(file, length);
}

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/android/shared/file_write.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"

#include "starboard/android/shared/file_internal.h"
Expand All @@ -22,5 +20,3 @@
int SbFileWrite(SbFile file, const char* data, int size) {
return ::starboard::shared::posix::impl::FileWrite(file, data, size);
}

#endif // SB_API_VERSION < 17
6 changes: 0 additions & 6 deletions starboard/elf_loader/exported_symbols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,29 +175,23 @@ ExportedSymbols::ExportedSymbols() {
REGISTER_SYMBOL(SbEventCancel);
REGISTER_SYMBOL(SbEventSchedule);
REGISTER_SYMBOL(SbFileAtomicReplace);
#if SB_API_VERSION < 17
REGISTER_SYMBOL(SbFileCanOpen);
REGISTER_SYMBOL(SbFileClose);
REGISTER_SYMBOL(SbFileDelete);
#endif // SB_API_VERSION < 17
#if SB_API_VERSION < 16
REGISTER_SYMBOL(SbFileExists);
#endif // SB_API_VERSION < 16
#if SB_API_VERSION < 17
REGISTER_SYMBOL(SbFileFlush);
REGISTER_SYMBOL(SbFileGetInfo);
#endif // SB_API_VERSION < 17
#if SB_API_VERSION < 16
REGISTER_SYMBOL(SbFileGetPathInfo);
#endif // SB_API_VERSION < 16
#if SB_API_VERSION < 17
REGISTER_SYMBOL(SbFileModeStringToFlags);
REGISTER_SYMBOL(SbFileOpen);
REGISTER_SYMBOL(SbFileRead);
REGISTER_SYMBOL(SbFileSeek);
REGISTER_SYMBOL(SbFileTruncate);
REGISTER_SYMBOL(SbFileWrite);
#endif // SB_API_VERSION < 17
REGISTER_SYMBOL(SbGetEglInterface);
REGISTER_SYMBOL(SbGetGlesInterface);
#if SB_API_VERSION < 16
Expand Down
12 changes: 0 additions & 12 deletions starboard/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ static inline bool SbFileIsValid(SbFile file) {
return file != kSbFileInvalid;
}

#if SB_API_VERSION < 17

// DEPRECATED with SB_API_VERSION 16
//
// Opens the file at |path|, which must be absolute, creating it if specified by
Expand Down Expand Up @@ -160,8 +158,6 @@ SB_EXPORT SbFile SbFileOpen(const char* path,
// |file|: The absolute path of the file to be closed.
SB_EXPORT bool SbFileClose(SbFile file);

#endif // SB_API_VERSION < 17

// 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.
Expand All @@ -173,8 +169,6 @@ SB_EXPORT bool SbFileAtomicReplace(const char* path,
const char* data,
int64_t data_size);

#if SB_API_VERSION < 17

// DEPRECATED with SB_API_VERSION 16
//
// Changes the current read/write position in |file|. The return value
Expand Down Expand Up @@ -270,17 +264,13 @@ SB_EXPORT bool SbFileGetPathInfo(const char* path, SbFileInfo* out_info);
// |path|: The absolute path of the file, symlink, or directory to be deleted.
SB_EXPORT bool SbFileDelete(const char* path);

#endif // SB_API_VERSION < 17

#if SB_API_VERSION < 16
// Indicates whether a file or directory exists at |path|.
//
// |path|: The absolute path of the file or directory being checked.
SB_EXPORT bool SbFileExists(const char* path);
#endif // SB_API_VERSION < 16

#if SB_API_VERSION < 17

// DEPRECATED with SB_API_VERSION 16
//
// Indicates whether SbFileOpen() with the given |flags| is allowed for |path|.
Expand Down Expand Up @@ -356,8 +346,6 @@ static inline int SbFileWriteAll(SbFile file, const char* data, int size) {
return bytes_written ? bytes_written : rv;
}

#endif // SB_API_VERSION < 17

#ifdef __cplusplus
} // extern "C"
#endif
Expand Down
4 changes: 0 additions & 4 deletions starboard/nplb/file_can_open_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include <string>

#include "starboard/configuration_constants.h"
Expand Down Expand Up @@ -72,5 +70,3 @@ TEST(SbFileCanOpenTest, ExistingStaticContentFileSucceeds) {
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/nplb/file_close_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

// SbFileClose is partially tested in file_open_test.cc.

#if SB_API_VERSION < 17

#include "starboard/file.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand All @@ -31,5 +29,3 @@ TEST(SbFileCloseTest, CloseInvalidFails) {
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/nplb/file_delete_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include <sys/stat.h>

#include <string>
Expand Down Expand Up @@ -65,5 +63,3 @@ TEST(SbFileDeleteTest, RainyDayNonExistentFileErrors) {
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/nplb/file_flush_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

// SbFileFlush is otherwise tested in SbFileWriteTest.

#if SB_API_VERSION < 17

#include "starboard/file.h"
#include "starboard/nplb/file_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand All @@ -32,5 +30,3 @@ TEST(SbFileFlushTest, InvalidFileErrors) {
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/nplb/file_get_info_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

// GetInfo is mostly tested in the course of other tests.

#if SB_API_VERSION < 17

#include <string>

#include "starboard/common/time.h"
Expand Down Expand Up @@ -89,5 +87,3 @@ TEST(SbFileGetInfoTest, WorksOnStaticContentFiles) {
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/nplb/file_mode_string_to_flags_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include <string>

#include "starboard/file.h"
Expand Down Expand Up @@ -61,5 +59,3 @@ TEST(SbFileModeStringToFlagsTest, Aah) {
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/nplb/file_open_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include <sys/stat.h>

#include <iomanip>
Expand Down Expand Up @@ -167,5 +165,3 @@ TEST(SbFileOpenTest, OpenOnlyDoesNotOpenNonExistingStaticContentFile) {
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/nplb/file_read_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include <string>

#include "starboard/file.h"
Expand Down Expand Up @@ -296,5 +294,3 @@ TYPED_TEST(SbFileReadTest, ReadStaticContent) {
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/nplb/file_read_write_all_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include "starboard/file.h"
#include "starboard/nplb/file_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down Expand Up @@ -65,5 +63,3 @@ INSTANTIATE_TEST_CASE_P(
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
4 changes: 0 additions & 4 deletions starboard/nplb/file_seek_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if SB_API_VERSION < 17

#include <string>

#include "starboard/file.h"
Expand Down Expand Up @@ -237,5 +235,3 @@ TEST(SbFileSeekTest, FromBeginInStaticContentWorks) {
} // namespace
} // namespace nplb
} // namespace starboard

#endif // SB_API_VERSION < 17
Loading

0 comments on commit 0596d85

Please sign in to comment.