diff options
| -rw-r--r-- | .deps.mk | 4 | ||||
| -rw-r--r-- | .deps/all.c | 1 | ||||
| -rw-r--r-- | .deps/libc.POSIX_1 | 1 | ||||
| -rw-r--r-- | src/unistd/__unistd.c | 7 | ||||
| -rw-r--r-- | src/unistd/_unistd.h | 18 |
5 files changed, 31 insertions, 0 deletions
@@ -1129,6 +1129,10 @@ libc.a(confstr.o): $(OBJDIR)/confstr.o $(OBJDIR)/confstr.o: ./src/unistd/confstr.c $(CC) $(BASE_CFLAGS) $(CFLAGS) -c ./src/unistd/confstr.c -o $@ echo [CC] $@ +libc.a(__unistd.o): $(OBJDIR)/__unistd.o +$(OBJDIR)/__unistd.o: ./src/unistd/__unistd.c + $(CC) $(BASE_CFLAGS) $(CFLAGS) -c ./src/unistd/__unistd.c -o $@ + echo [CC] $@ libc.a(getgroups.o): $(OBJDIR)/getgroups.o $(OBJDIR)/getgroups.o: ./src/unistd/getgroups.c $(CC) $(BASE_CFLAGS) $(CFLAGS) -c ./src/unistd/getgroups.c -o $@ diff --git a/.deps/all.c b/.deps/all.c index aa025ba6..d0f899f8 100644 --- a/.deps/all.c +++ b/.deps/all.c @@ -888,6 +888,7 @@ ./src/unistd/_POSIX_JOB_CONTROL.c ./src/unistd/_PC_LINK_MAX.c ./src/unistd/_POSIX2_VERSION.c +./src/unistd/__unistd.c ./src/unistd/_PC_PIPE_BUF.c ./src/unistd/STDIN_FILENO.c ./src/unistd/_SC_ASYNCHRONOUS_IO.c diff --git a/.deps/libc.POSIX_1 b/.deps/libc.POSIX_1 index f1e730c4..41b523a0 100644 --- a/.deps/libc.POSIX_1 +++ b/.deps/libc.POSIX_1 @@ -61,6 +61,7 @@ libc_POSIX_1_OBJS= \ libc.a($(OBJDIR)/execlp.o) \ libc.a($(OBJDIR)/pipe.o) \ libc.a($(OBJDIR)/cuserid.o) \ + libc.a($(OBJDIR)/__unistd.o) \ libc.a($(OBJDIR)/getgroups.o) \ libc.a($(OBJDIR)/chown.o) \ libc.a($(OBJDIR)/getpid.o) \ diff --git a/src/unistd/__unistd.c b/src/unistd/__unistd.c new file mode 100644 index 00000000..eaed9522 --- /dev/null +++ b/src/unistd/__unistd.c @@ -0,0 +1,7 @@ +#include "_unistd.h" + +struct __unistd __unistd; + +/* +POSIX(1) +*/ diff --git a/src/unistd/_unistd.h b/src/unistd/_unistd.h new file mode 100644 index 00000000..87cdd8f1 --- /dev/null +++ b/src/unistd/_unistd.h @@ -0,0 +1,18 @@ +#ifndef ___UNISTD_H__ +#define ___UNISTD_H__ + +#include <sys/types.h> +#include <unistd.h> +#include <limits.h> + +#ifndef PATH_MAX +#define PATH_MAX _POSIX_PATH_MAX +#endif + +struct __unistd { + char ttyname[PATH_MAX + 1]; +}; + +extern struct __unistd __unistd; + +#endif |
