Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete eztime_poem #2308

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cobalt/build/cobalt_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ def GetTestTargets(self):
'overlay_info_test',
'persistent_settings_test',
'png_utils_test',
'poem_unittests',
'js_profiler_test',
'renderer_test',
'render_tree_test',
Expand Down
1 change: 0 additions & 1 deletion starboard/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ group("gn_all") {
"//starboard/client_porting/eztime",
"//starboard/client_porting/eztime:eztime_test",
"//starboard/client_porting/icu_init",
"//starboard/client_porting/poem:poem_unittests",
"//starboard/examples/hello_world:starboard_hello_world_example",
"//starboard/examples/window:starboard_window_example",
"//starboard/extension:extension_test",
Expand Down
30 changes: 1 addition & 29 deletions starboard/client_porting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,6 @@ This Starboard sub-project contains libraries and headers that can be used to
make porting client software on top of Starboard a little easier.


# "Poem" - Lightweight POSIX Emulation

Before Starboard, we had tried to build a POSIX emulation layer for every
platform we wanted to support. This meant replacing link symbols in some cases,
and a wielding global preprocessor macros in others. It was impossible to keep
inclusion of platform headers (e.g. `winsock.h`) from transitively leaking out
into common code.

`poem`, for POsix EMulation, is somewhat similar, but a surgical tool for
targeted porting, rather than a blunt instrument. Because we have Starboard as a
well-defined barrier, we can use the preprocessor to selectively redirect
standard functions like malloc to Starboard without making lots of changes to
the code.

The rule we use is that these headers must ONLY be included in implementation
files, not headers, so that the preprocessor replacements don't spread
uncontrollably.

For each `poem`, we try to name files in a consistent, formulaic manner. With
this scheme, we can easily determine the correct poem header while porting.
This can also come handy if one were to write a script to assist in porting
third party libraries. In theory, the script would just look for includes
in .cc files, where we have available poems and then wrap unprotected includes
in #if !defined(STARBOARD), and include the poems if STARBOARD is defined.


# "eztime" - Easy Time Functions

Starboard does not contain functions that do much in the way of time
Expand All @@ -39,6 +13,4 @@ ICU and Starboard that makes it easy to replace calls to functions like mktime
and gmtime in older C libraries with more robust ICU calls.

EzTime can be used directly by including
`starboard/client_porting/eztime/eztime.h`, or you can include
`starboard/client_porting/poem/eztime_poem.h` in your implementation file to
automatically simulate POSIXy time functions.
`starboard/client_porting/eztime/eztime.h`.
27 changes: 0 additions & 27 deletions starboard/client_porting/poem/BUILD.gn

This file was deleted.

36 changes: 0 additions & 36 deletions starboard/client_porting/poem/eztime_poem.h

This file was deleted.

17 changes: 0 additions & 17 deletions starboard/client_porting/poem/include_all.c

This file was deleted.

26 changes: 0 additions & 26 deletions starboard/client_porting/poem/main.cc

This file was deleted.

Loading