From 04624efda79d11ca89347d55a8a6a0f2ce4ebc75 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 6 Aug 2025 02:35:01 -0400 Subject: lib: libc: Add initial POSIX getopt() impl This commit introduces an initial implementation of the POSIX getopt() argument parser. Signed-off-by: Ian Moffett --- lib/libc/include/unistd.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/libc/include') 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 */ -- cgit v1.2.3