diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-07-24 23:17:48 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-11-24 01:54:11 +0100 |
| commit | 58c383dd918635ba648b9f8532f15e357b162c77 (patch) | |
| tree | e5c76d48a0df8d63655a0b5d53c93eda00620e9f /handler.c | |
| parent | d9d1811f8922f0509d922943efb3c487ace3de9f (diff) | |
| download | slcl-58c383dd918635ba648b9f8532f15e357b162c77.tar.gz | |
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.
Diffstat (limited to 'handler.c')
0 files changed, 0 insertions, 0 deletions
