aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan P. Reiner <nathan@nathanreiner.xyz>2022-12-16 09:38:25 +0100
committerNathan P. Reiner <nathan@nathanreiner.xyz>2022-12-16 09:38:25 +0100
commitf7f42b5f4fd22cd16e092de4a6f2a642b5ab8234 (patch)
treeb8044f25bd865a4c5d4e9f3f41daaea9a4b1414b
parent8c66e390a5d8bf0bcc5770d61643e6023a2cbdc9 (diff)
add env structre
-rw-r--r--lib/env/.gitignore1
-rw-r--r--lib/env/Makefile3
-rw-r--r--lib/env/env.c1
-rw-r--r--lib/env/env.h7
4 files changed, 12 insertions, 0 deletions
diff --git a/lib/env/.gitignore b/lib/env/.gitignore
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/lib/env/.gitignore
@@ -0,0 +1 @@
+test
diff --git a/lib/env/Makefile b/lib/env/Makefile
new file mode 100644
index 0000000..6158ef2
--- /dev/null
+++ b/lib/env/Makefile
@@ -0,0 +1,3 @@
+unit_test:
+ gcc env.c ../cstr/cstr.c ../sys/start.S -o test -static -nostdlib -fno-stack-protector -Wno-implicit-function-declaration -g
+ ./test
diff --git a/lib/env/env.c b/lib/env/env.c
new file mode 100644
index 0000000..df8e361
--- /dev/null
+++ b/lib/env/env.c
@@ -0,0 +1 @@
+#include "env.h"
diff --git a/lib/env/env.h b/lib/env/env.h
new file mode 100644
index 0000000..7d95d63
--- /dev/null
+++ b/lib/env/env.h
@@ -0,0 +1,7 @@
+#ifndef ENV_H
+#define ENV_H
+
+const char *getenv(const char *key);
+void setenv(const char *key, const char *value);
+
+#endif