From 0efa8cf1d20712cbfaa549d31a8ebc11a23f78ec Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 4 Jul 2016 00:50:42 -0400 Subject: created free-standing project skeleton. --- src/internal/nolibc/nt32/ptyc_compiler.s | 20 ++++++++++++++++++++ src/internal/nolibc/nt64/ptyc_compiler.s | 20 ++++++++++++++++++++ src/internal/nolibc/stdbool.h | 11 +++++++++++ src/internal/nolibc/stddef.h | 6 ++++++ src/internal/nolibc/stdint.h | 6 ++++++ src/internal/nolibc/stdio.h | 8 ++++++++ src/internal/nolibc/stdlib.h | 4 ++++ src/internal/nolibc/string.h | 4 ++++ src/internal/nolibc/unistd.h | 4 ++++ 9 files changed, 83 insertions(+) create mode 100644 src/internal/nolibc/nt32/ptyc_compiler.s create mode 100644 src/internal/nolibc/nt64/ptyc_compiler.s create mode 100644 src/internal/nolibc/stdbool.h create mode 100644 src/internal/nolibc/stddef.h create mode 100644 src/internal/nolibc/stdint.h create mode 100644 src/internal/nolibc/stdio.h create mode 100644 src/internal/nolibc/stdlib.h create mode 100644 src/internal/nolibc/string.h create mode 100644 src/internal/nolibc/unistd.h (limited to 'src/internal/nolibc') diff --git a/src/internal/nolibc/nt32/ptyc_compiler.s b/src/internal/nolibc/nt32/ptyc_compiler.s new file mode 100644 index 0000000..6144edf --- /dev/null +++ b/src/internal/nolibc/nt32/ptyc_compiler.s @@ -0,0 +1,20 @@ +########################################################### +## ptycon: a pty-console bridge ## +## Copyright (C) 2016 Z. Gilboa ## +## Released under GPLv2 and GPLv3; see COPYING.PTYCON. ## +########################################################### + +# ___chkstk_ms and _pei386_runtime_relocator are not needed by the framework +# and are provided here in the form of no-op functions in order to satisfy +# compiler-generated dependencies. + +.section .text + +.global _pei386_runtime_relocator +.global ___chkstk_ms + +_pei386_runtime_relocatorr: + ret + +___chkstk_ms: + ret diff --git a/src/internal/nolibc/nt64/ptyc_compiler.s b/src/internal/nolibc/nt64/ptyc_compiler.s new file mode 100644 index 0000000..6144edf --- /dev/null +++ b/src/internal/nolibc/nt64/ptyc_compiler.s @@ -0,0 +1,20 @@ +########################################################### +## ptycon: a pty-console bridge ## +## Copyright (C) 2016 Z. Gilboa ## +## Released under GPLv2 and GPLv3; see COPYING.PTYCON. ## +########################################################### + +# ___chkstk_ms and _pei386_runtime_relocator are not needed by the framework +# and are provided here in the form of no-op functions in order to satisfy +# compiler-generated dependencies. + +.section .text + +.global _pei386_runtime_relocator +.global ___chkstk_ms + +_pei386_runtime_relocatorr: + ret + +___chkstk_ms: + ret diff --git a/src/internal/nolibc/stdbool.h b/src/internal/nolibc/stdbool.h new file mode 100644 index 0000000..45fc6f9 --- /dev/null +++ b/src/internal/nolibc/stdbool.h @@ -0,0 +1,11 @@ +#ifndef _STDBOOL_H +#define _STDBOOL_H + +#ifndef __cplusplus + +#define true 1 +#define false 0 +#define bool _Bool + +#endif +#endif diff --git a/src/internal/nolibc/stddef.h b/src/internal/nolibc/stddef.h new file mode 100644 index 0000000..8288bae --- /dev/null +++ b/src/internal/nolibc/stddef.h @@ -0,0 +1,6 @@ +#ifndef _STDDEF_H +#define _STDDEF_H + +#define offsetof(type, member) ((size_t)( (char *)&(((type *)0)->member) - (char *)0 )) + +#endif diff --git a/src/internal/nolibc/stdint.h b/src/internal/nolibc/stdint.h new file mode 100644 index 0000000..831d865 --- /dev/null +++ b/src/internal/nolibc/stdint.h @@ -0,0 +1,6 @@ +#ifndef _STDINT_H +#define _STDINT_H + +#include + +#endif diff --git a/src/internal/nolibc/stdio.h b/src/internal/nolibc/stdio.h new file mode 100644 index 0000000..610533e --- /dev/null +++ b/src/internal/nolibc/stdio.h @@ -0,0 +1,8 @@ +#ifndef _STDIO_H +#define _STDIO_H + +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 + +#endif diff --git a/src/internal/nolibc/stdlib.h b/src/internal/nolibc/stdlib.h new file mode 100644 index 0000000..8a24bec --- /dev/null +++ b/src/internal/nolibc/stdlib.h @@ -0,0 +1,4 @@ +#ifndef _STDLIB_H +#define _STDLIB_H + +#endif diff --git a/src/internal/nolibc/string.h b/src/internal/nolibc/string.h new file mode 100644 index 0000000..f8e3b8e --- /dev/null +++ b/src/internal/nolibc/string.h @@ -0,0 +1,4 @@ +#ifndef _STRING_H +#define _STRING_H + +#endif diff --git a/src/internal/nolibc/unistd.h b/src/internal/nolibc/unistd.h new file mode 100644 index 0000000..2e39dc8 --- /dev/null +++ b/src/internal/nolibc/unistd.h @@ -0,0 +1,4 @@ +#ifndef _UNISTD_H +#define _UNISTD_H + +#endif -- cgit v1.2.3