Changeset View
Changeset View
Standalone View
Standalone View
lang/picoc/files/patch-cstdlib__unistd.c
--- ./cstdlib/unistd.c.orig 2011-02-21 06:22:13.000000000 +0100 | --- cstdlib/unistd.c.orig 2017-03-23 11:34:47 UTC | ||||
+++ ./cstdlib/unistd.c 2011-03-11 08:09:48.884688383 +0100 | +++ cstdlib/unistd.c | ||||
@@ -80,10 +80,10 @@ | @@ -81,16 +81,6 @@ void UnistdFchdir(struct ParseState *Parser, struct Va | ||||
ReturnValue->Val->Integer = fchdir(Param[0]->Val->Integer); | ReturnValue->Val->Integer = fchdir(Param[0]->Val->Integer); | ||||
} | } | ||||
-void UnistdFdatasync(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) | -void UnistdFdatasync(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) | ||||
+/*void UnistdFdatasync(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) | -{ | ||||
{ | -#ifndef F_FULLSYNC | ||||
ReturnValue->Val->Integer = fdatasync(Param[0]->Val->Integer); | - ReturnValue->Val->Integer = fdatasync(Param[0]->Val->Integer); | ||||
-#else | |||||
- /* Mac OS X equivalent */ | |||||
- ReturnValue->Val->Integer = fcntl(Param[0]->Val->Integer, F_FULLFSYNC); | |||||
-#endif | |||||
-} | -} | ||||
+}*/ | - | ||||
void UnistdFork(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) | void UnistdFork(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) | ||||
{ | { | ||||
@@ -278,7 +278,7 @@ | ReturnValue->Val->Integer = fork(); | ||||
@@ -284,7 +274,7 @@ void UnistdSetpgid(struct ParseState *Parser, struct V | |||||
void UnistdSetpgrp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) | void UnistdSetpgrp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) | ||||
{ | { | ||||
- ReturnValue->Val->Integer = setpgrp(); | - ReturnValue->Val->Integer = setpgrp(); | ||||
+ ReturnValue->Val->Integer = setpgrp(Param[0]->Val->Integer, Param[1]->Val->Integer); | + ReturnValue->Val->Integer = setpgrp(Param[0]->Val->Integer, Param[1]->Val->Integer); | ||||
} | } | ||||
void UnistdSetregid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) | void UnistdSetregid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) | ||||
@@ -416,7 +416,7 @@ | @@ -422,7 +412,6 @@ struct LibraryFunction UnistdFunctions[] = | ||||
{ Unistd_Exit, "void _exit(int);" }, | { Unistd_Exit, "void _exit(int);" }, | ||||
{ UnistdFchown, "int fchown(int, uid_t, gid_t);" }, | { UnistdFchown, "int fchown(int, uid_t, gid_t);" }, | ||||
{ UnistdFchdir, "int fchdir(int);" }, | { UnistdFchdir, "int fchdir(int);" }, | ||||
- { UnistdFdatasync, "int fdatasync(int);" }, | - { UnistdFdatasync, "int fdatasync(int);" }, | ||||
+/* { UnistdFdatasync, "int fdatasync(int);" },*/ | |||||
{ UnistdFork, "pid_t fork(void);" }, | { UnistdFork, "pid_t fork(void);" }, | ||||
{ UnistdFpathconf, "long fpathconf(int, int);" }, | { UnistdFpathconf, "long fpathconf(int, int);" }, | ||||
{ UnistdFsync, "int fsync(int);" }, | { UnistdFsync, "int fsync(int);" }, | ||||
@@ -458,7 +458,7 @@ | |||||
{ UnistdSbrk, "void *sbrk(intptr_t);" }, | |||||
{ UnistdSetgid, "int setgid(gid_t);" }, | |||||
{ UnistdSetpgid, "int setpgid(pid_t, pid_t);" }, | |||||
- { UnistdSetpgrp, "pid_t setpgrp(void);" }, | |||||
+ { UnistdSetpgrp, "pid_t setpgrp(pid_t, pid_t);" }, | |||||
{ UnistdSetregid, "int setregid(gid_t, gid_t);" }, | |||||
{ UnistdSetreuid, "int setreuid(uid_t, uid_t);" }, | |||||
{ UnistdSetsid, "pid_t setsid(void);" }, |