aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--src/library.js20
2 files changed, 20 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 24757d07..c897aae1 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,4 +3,4 @@ under the licensing terms detailed in LICENSE.
* Alon Zakai <alonzakai@gmail.com> (copyright owned by Mozilla Foundation)
* Tim Dawborn <tim.dawborn@gmail.com>
-
+* Max Shawabkeh <max99x@gmail.com>
diff --git a/src/library.js b/src/library.js
index 704ba8a5..fe3f082e 100644
--- a/src/library.js
+++ b/src/library.js
@@ -368,6 +368,11 @@ var Library = {
},
__01fopen64_: 'fopen',
+ fdopen: function(descriptor, mode) {
+ // TODO: Check whether mode is acceptable for the current stream.
+ return descriptor;
+ },
+
rewind__deps: ['$STDIO'],
rewind: function(stream) {
var info = STDIO.streams[stream];
@@ -388,6 +393,7 @@ var Library = {
return 0;
},
__01fseeko64_: 'fseek',
+ __01lseek64_: 'fseek',
ftell__deps: ['$STDIO'],
ftell: function(stream) {
@@ -511,6 +517,13 @@ var Library = {
}
},
+ __01open64___deps: ['open'],
+ __01open64_: function(filename, mode, flags) {
+ // open(), but with flags and mode switched.
+ // TODO: Verify why this happens at all.
+ return _open(filename, flags, mode);
+ },
+
close: function(stream) {
return 0;
},
@@ -1211,6 +1224,11 @@ var Library = {
return 0; // NULL
},
+ unlink: function(filename) {
+ // TODO: Actually implement.
+ return 0;
+ },
+
// time.h
time: function(ptr) {
@@ -1259,7 +1277,7 @@ var Library = {
// stat.h
__01stat64_: function() { return -1 },
- __01fstat64_: function() { return -1 },
+ __01fstat64_: 'fstat',
// locale.h