summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/fcntl.h
AgeCommit message (Collapse)Author
2021-08-14Kernel+LibC: Share definitions in fcntl.h and sys/types.hAndreas Kling
This patch begins the work of sharing types and macros between Kernel and LibC instead of duplicating them via the kludge in UnixTypes.h. The basic idea is that the Kernel vends various POSIX headers via Kernel/API/POSIX/ and LibC simply #include's them to get the macros.
2021-07-20Kernel+LibC: Implement fcntl(2) advisory locksPeter Elliott
Advisory locks don't actually prevent other processes from writing to the file, but they do prevent other processes looking to acquire and advisory lock on the file. This implementation currently only adds non-blocking locks, which are all I need for now.
2021-05-14Kernel+LibC: Add fstatatMart G
The function fstatat can do the same thing as the stat and lstat functions. However, it can be passed the file descriptor of a directory which will be used when as the starting point for relative paths. This is contrary to stat and lstat which use the current working directory as the starting for relative paths.
2021-05-12Userland+LibCore: Update FileWatcher + its users for InodeWatcher 2.0sin-ack
With the new InodeWatcher API, the old style of creating a watcher per inode will no longer work. Therefore the FileWatcher API has been updated to support multiple watches, and its users have also been refactored to the new style. At the moment, all operations done on a (Blocking)FileWatcher return Result objects, however, this may be changed in the future if it becomes too obnoxious. :^) Co-authored-by: Gunnar Beutner <gunnar@beutner.name>
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-11LibC: Move S_* defines into <fcntl.h>Gunnar Beutner
According to the Single UNIX Specification, Version 2 that's where those macros should be defined. This fixes the libiconv port. This also fixes some (but not all) build errors for the diffutils and nano ports.
2021-03-27LibC: Define F_GETLKJelle Raaijmakers
2021-03-27LibC: Add S_I{READ,WRITE,EXEC} macro aliases for BSD compatibilityAndreas Kling
These map as follows: S_IREAD -> S_IRUSR S_IWRITE -> S_IWUSR S_IEXEC -> S_IXUSR
2021-01-12LibC+Everywhere: Remove open_with_path_length() in favor of open()Andreas Kling
This API was a mostly gratuitous deviation from POSIX that gave up some portability in exchange for avoiding the occasional strlen(). I don't think that was actually achieving anything valuable, so let's just chill out and have the same open() API as everyone else. :^)
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling