mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-07 06:47:52 +00:00
Formerly misc.c.~18~
This commit is contained in:
parent
6247727678
commit
d3543bc097
1 changed files with 19 additions and 0 deletions
19
misc.c
19
misc.c
|
@ -596,3 +596,22 @@ child_access ()
|
||||||
if (setgid (user_gid) < 0)
|
if (setgid (user_gid) < 0)
|
||||||
pfatal_with_name ("setgid");
|
pfatal_with_name ("setgid");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NEED_GET_PATH_MAX
|
||||||
|
unsigned int
|
||||||
|
get_path_max ()
|
||||||
|
{
|
||||||
|
static unsigned int value;
|
||||||
|
|
||||||
|
if (value == 0)
|
||||||
|
{
|
||||||
|
long int x = pathconf ("/", _PC_PATH_MAX);
|
||||||
|
if (x > 0)
|
||||||
|
value = x;
|
||||||
|
else
|
||||||
|
return MAXPATHLEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue