aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortim.dawborn <tim.dawborn@gmail.com>2011-06-23 16:15:56 +1000
committertim.dawborn <tim.dawborn@gmail.com>2011-06-23 16:15:56 +1000
commitb67ec228417909709ea67bafc6ef2ede0a9f39e9 (patch)
tree2a4b8ec12bb2d42132acbed39531b3a58f071d58
parent89ecb3e21c105df110a3c62a2d3366864fc5fe3c (diff)
* correction to fputs -- it should not add a trailing \n (puts does, fputs does not)
* corrected internal filennames of stderr and stdout * added default getgid(void) implementation to go with getuid(void)
-rw-r--r--src/library.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/library.js b/src/library.js
index 4875c7dc..b321dbc9 100644
--- a/src/library.js
+++ b/src/library.js
@@ -274,10 +274,10 @@ var Library = {
}
_stdout = Pointer_make([0], null, ALLOC_STATIC, 'void*');
- {{{ makeSetValue('_stdout', '0', "STDIO.prepare('<<stdin>>', null, true)", 'i32') }}};
+ {{{ makeSetValue('_stdout', '0', "STDIO.prepare('<<stdout>>', null, true)", 'i32') }}};
_stderr = Pointer_make([0], null, ALLOC_STATIC, 'void*');
- {{{ makeSetValue('_stderr', '0', "STDIO.prepare('<<stdin>>', null, true)", 'i32') }}};
+ {{{ makeSetValue('_stderr', '0', "STDIO.prepare('<<stderr>>', null, true)", 'i32') }}};
},
cleanFilename: function(filename) {
return filename.replace('./', '');
@@ -456,7 +456,6 @@ var Library = {
fputs__deps: ['$STDIO', 'fputc'],
fputs: function(p, stream) {
STDIO.write(stream, p, String_len(p));
- _fputc('\n'.charCodeAt(0), stream);
},
fputc__deps: ['$STDIO'],
@@ -1198,6 +1197,10 @@ var Library = {
return 100;
},
+ getgid: function() {
+ return 100;
+ },
+
getpwuid: function(uid) {
return 0; // NULL
},