diff options
| author | punk <punk@libernaut> | 2021-04-21 15:26:19 +0100 |
|---|---|---|
| committer | punk <punk@libernaut> | 2021-04-21 15:26:19 +0100 |
| commit | eac48b5a8d709135a95abcc2243b369095f074f4 (patch) | |
| tree | a2e34d995cef5ac8068ec7047e93b1125c80d175 /dev/c/src/hello | |
| parent | 3bd43803fc8cb7a39a87394cb7c491ddc151e06b (diff) | |
| parent | 452477a2635d85ecf772a5242ce97d9479503bb3 (diff) | |
| download | doc-eac48b5a8d709135a95abcc2243b369095f074f4.tar.gz | |
release 0.7.0
Diffstat (limited to 'dev/c/src/hello')
| -rw-r--r-- | dev/c/src/hello/Makefile | 3 | ||||
| -rw-r--r-- | dev/c/src/hello/hello.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/dev/c/src/hello/Makefile b/dev/c/src/hello/Makefile index a6d9f07..2c0ff2d 100644 --- a/dev/c/src/hello/Makefile +++ b/dev/c/src/hello/Makefile @@ -1,7 +1,6 @@ -CC=gcc CFLAGS=-Wall -hello: hello.o +hello: hello.c clean: rm -f *.o hello diff --git a/dev/c/src/hello/hello.c b/dev/c/src/hello/hello.c index df66493..092efa5 100644 --- a/dev/c/src/hello/hello.c +++ b/dev/c/src/hello/hello.c @@ -1,6 +1,10 @@ #include <stdio.h> +#include <unistd.h> int main() { - printf("hello World!"); + char *name; + name = getlogin(); + + printf("hello %s!\n", name); return 0; } |