1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

LibC: Support _PC_PATH_MAX in [f]pathconf

This commit is contained in:
Conrad Pankoff 2019-09-02 15:36:22 +10:00 committed by Andreas Kling
parent 40daefd3dc
commit 17cf3c143a
2 changed files with 13 additions and 0 deletions

View file

@ -413,6 +413,12 @@ long fpathconf(int fd, int name)
{ {
(void)fd; (void)fd;
(void)name; (void)name;
switch (name) {
case _PC_PATH_MAX:
return PATH_MAX;
}
ASSERT_NOT_REACHED(); ASSERT_NOT_REACHED();
} }
@ -420,6 +426,12 @@ long pathconf(const char* path, int name)
{ {
(void)path; (void)path;
(void)name; (void)name;
switch (name) {
case _PC_PATH_MAX:
return PATH_MAX;
}
ASSERT_NOT_REACHED(); ASSERT_NOT_REACHED();
} }

View file

@ -107,6 +107,7 @@ char* realpath(const char* pathname, char* buffer);
enum { enum {
_PC_NAME_MAX, _PC_NAME_MAX,
_PC_PATH_MAX,
}; };
#define HOST_NAME_MAX 64 #define HOST_NAME_MAX 64