mescc: dup, dup2: Move to libc.

* lib/linux/libc.c (dup, dup2): New function.
* lib/linux/gnu.c (dup, dup2): Remove.
This commit is contained in:
Jan Nieuwenhuizen 2018-11-11 10:13:01 +01:00
parent 6e2f941573
commit e660665dfd
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 12 additions and 12 deletions

View File

@ -57,12 +57,6 @@ mkdir (char const *file_name, mode_t mode)
return _sys_call2 (SYS_mkdir, (long)file_name, (long)mode);
}
int
dup (int old)
{
return _sys_call1 (SYS_dup, (int)old);
}
gid_t
getgid ()
{
@ -124,12 +118,6 @@ pipe (int filedes[2])
return _sys_call1 (SYS_pipe, (long)filedes);
}
int
dup2 (int old, int new)
{
return _sys_call2 (SYS_dup2, (int)old, (int)new);
}
int
getrusage (int processes, struct rusage *rusage)
{

View File

@ -159,6 +159,18 @@ getcwd (char *buffer, size_t size)
return 0;
}
int
dup (int old)
{
return _sys_call1 (SYS_dup, (int)old);
}
int
dup2 (int old, int new)
{
return _sys_call2 (SYS_dup2, (int)old, (int)new);
}
#include "linux/clock_gettime.c"
#include "linux/gettimeofday.c"
#include "linux/time.c"