mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
LibC: Implement various things to get GNU bc building and running.
Looks like that's all we needed, and bc now runs. :^)
This commit is contained in:
parent
3a9c01619f
commit
c2adfd0e2d
9 changed files with 51 additions and 2 deletions
|
@ -358,13 +358,12 @@ static void greeting()
|
|||
printf("\n%s/%s on %s\n\n", uts.sysname, uts.machine, g->ttyname);
|
||||
}
|
||||
|
||||
int main(int, char**)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
g = new GlobalState;
|
||||
g->uid = getuid();
|
||||
g->sid = setsid();
|
||||
tcsetpgrp(0, getpgrp());
|
||||
|
||||
tcgetattr(0, &g->termios);
|
||||
|
||||
{
|
||||
|
@ -391,6 +390,11 @@ int main(int, char**)
|
|||
endpwent();
|
||||
}
|
||||
|
||||
if (argc > 1 && !strcmp(argv[1], "-c")) {
|
||||
fprintf(stderr, "FIXME: Implement /bin/sh -c\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
greeting();
|
||||
|
||||
char linebuf[128];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue