diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-06 02:35:01 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-06 02:35:01 -0400 |
commit | 04624efda79d11ca89347d55a8a6a0f2ce4ebc75 (patch) | |
tree | 0fad1931eb8c48487b2f28902d61376dd1c7bbc7 /lib/libc/include/unistd.h | |
parent | fdc0c05328953bd9004ea330b633171c356310b4 (diff) |
lib: libc: Add initial POSIX getopt() impl
This commit introduces an initial implementation of the POSIX getopt()
argument parser.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/libc/include/unistd.h')
-rw-r--r-- | lib/libc/include/unistd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc/include/unistd.h b/lib/libc/include/unistd.h index b9c9f5e..8b03b81 100644 --- a/lib/libc/include/unistd.h +++ b/lib/libc/include/unistd.h @@ -60,6 +60,11 @@ off_t lseek(int fildes, off_t offset, int whence); pid_t getpid(void); pid_t getppid(void); +extern char *optarg; +extern int optind, opterr, optopt; + +int getopt(int argc, char *argv[], const char *optstring); + __END_DECLS #endif /* !_UNISTD_H */ |