Skip to content

Commit 1dc7cef

Browse files
committed
Cleanup deps_info.json. NFC.
- SDL_getenv: was removed from JS in #12319 - getenv: was removed from JS in #11885 - getlogin: depends on getenv so used to require JS? - emscripten_log: does not use strlen - syslog: I can find no evidence of this ever existing in JS - __ctype_b_loc: implemented in pure C - __ctype_tolower_loc: implemented in pure C - __ctype_toupper_loc: implemented in pure C - calloc/realloc: implemented in pure C - freopen: can't tell why this was ever in here - tmpnam: can't tell why this was ever in here - freelocale/freeaddrinfo: implemented in pure C - newlocale: implemented in pure C - realpath: implemented in pure C - strerr: implemented in pure C
1 parent b43d3de commit 1dc7cef

File tree

3 files changed

+5
-23
lines changed

3 files changed

+5
-23
lines changed

src/deps_info.json

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
11
{
2-
"freopen": ["free"],
32
"munmap": ["free"],
4-
"getenv": ["malloc", "free"],
5-
"SDL_getenv": ["malloc", "free"],
63
"dlerror": ["malloc", "free"],
74
"dladdr": ["malloc", "free"],
85
"readdir": ["malloc", "free"],
96
"ttyname": ["malloc", "free"],
10-
"calloc": ["malloc", "free"],
11-
"realloc": ["malloc", "free"],
12-
"getlogin": ["malloc", "free"],
13-
"tmpnam": ["malloc", "free"],
147
"mmap": ["memalign", "memset", "malloc", "free"],
158
"munmap": ["memalign", "memset", "malloc", "free"],
16-
"realpath": ["malloc", "free"],
17-
"strerror": ["malloc", "free"],
18-
"__ctype_b_loc": ["malloc", "free"],
19-
"__ctype_tolower_loc": ["malloc", "free"],
20-
"__ctype_toupper_loc": ["malloc", "free"],
21-
"newlocale": ["malloc", "free"],
22-
"freelocale": ["free"],
239
"nl_langinfo": ["malloc", "free"],
2410
"inet_ntoa": ["malloc", "free"],
2511
"gethostbyname": ["malloc", "free", "htons", "ntohs", "memcpy"],
@@ -29,11 +15,9 @@
2915
"getpeername": ["htons", "ntohs"],
3016
"_inet_ntop6_raw": ["ntohs"],
3117
"_read_sockaddr": ["ntohs"],
32-
"freeaddrinfo": ["free"],
3318
"gai_strerror": ["malloc", "free"],
3419
"setprotoent": ["malloc", "free"],
3520
"emscripten_run_script_string": ["malloc", "free"],
36-
"emscripten_log": ["strlen"],
3721
"uuid_clear": ["memset"],
3822
"uuid_compare": ["memcmp", "memcpy", "memset"],
3923
"uuid_copy": ["memcpy"],
@@ -181,6 +165,5 @@
181165
"emscripten_webgl_create_context": ["malloc", "free"],
182166
"glMapBufferRange": ["malloc", "free"],
183167
"glGetString": ["malloc", "free"],
184-
"glGetStringi": ["malloc", "free"],
185-
"syslog": ["malloc", "free"]
168+
"glGetStringi": ["malloc", "free"]
186169
}

src/library.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -703,11 +703,6 @@ LibraryManager.library = {
703703
#endif
704704
},
705705

706-
// This object can be modified by the user during startup, which affects
707-
// the initial values of the environment accessible by getenv. (This works
708-
// in both fastcomp and upstream).
709-
$ENV: {},
710-
711706
getloadavg: function(loadavg, nelem) {
712707
// int getloadavg(double loadavg[], int nelem);
713708
// http://linux.die.net/man/3/getloadavg

src/library_wasi.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ var WasiLibrary = {
1111
_exit(code);
1212
},
1313

14+
// This object can be modified by the user during startup, which affects
15+
// the initial values of the environment accessible by getEnvStrings/getenv.
16+
$ENV: {},
17+
1418
$getEnvStrings__deps: ['$ENV', '$getExecutableName'],
1519
$getEnvStrings: function() {
1620
if (!getEnvStrings.strings) {

0 commit comments

Comments
 (0)