From a74f4a72504d1c5923bd2b4e85941f34d9fce79f Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 24 Jul 2023 23:17:48 +0200 Subject: Introduce crealpath crealpath (for "custom realpath") is a custom implementation of realpath(3) that aims to work similarly to GNU's realpath(1). This implementation is provided due to the following reasons: - Future commits will require extracting an absolute path from a relative path, and/or process relative components from a path, such as ".." or ".". - realpath(3) is defined by POSIX.1-2008 as a XSI extension, and extensions are generally avoided in this repository whenever possible. - Additionally, realpath(3) requires the file or directory pointed to by the path to exist, which might not always be the case for slcl. - auth.c uses its own implementation to extract a dynamically allocated string by repeatedly calling getcwd(3). Future commits will also require this future, so it makes sense to keep it on a separate component. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c216d7..d34a876 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ add_executable(${PROJECT_NAME} auth.c base64.c cftw.c + crealpath.c hex.c jwt.c main.c -- cgit v1.2.3