mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-12 04:00:17 +00:00
Define LINUX_LINK_MAX.
This commit is contained in:
parent
821954bf6c
commit
0d1cec93d5
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -24,6 +24,10 @@
|
|||||||
|
|
||||||
#include <linux_fsinfo.h>
|
#include <linux_fsinfo.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* The Linux kernel header mentioned this as a kind of generic value. */
|
||||||
|
#define LINUX_LINK_MAX 127
|
||||||
|
|
||||||
static long int default_fpathconf (int fd, int name);
|
static long int default_fpathconf (int fd, int name);
|
||||||
|
|
||||||
/* Get file-specific information about descriptor FD. */
|
/* Get file-specific information about descriptor FD. */
|
||||||
@ -60,7 +64,7 @@ __fpathconf (fd, name)
|
|||||||
/* Determine the filesystem type. */
|
/* Determine the filesystem type. */
|
||||||
if (__fstatfs (fd, &fsbuf) < 0)
|
if (__fstatfs (fd, &fsbuf) < 0)
|
||||||
/* not possible, return the default value. */
|
/* not possible, return the default value. */
|
||||||
return LINK_MAX;
|
return LINUX_LINK_MAX;
|
||||||
|
|
||||||
switch (fsbuf.f_type)
|
switch (fsbuf.f_type)
|
||||||
{
|
{
|
||||||
@ -90,7 +94,7 @@ __fpathconf (fd, name)
|
|||||||
return UFS_LINK_MAX;
|
return UFS_LINK_MAX;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return LINK_MAX;
|
return LINUX_LINK_MAX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ __pathconf (const char *path, int name)
|
|||||||
/* Determine the filesystem type. */
|
/* Determine the filesystem type. */
|
||||||
if (__statfs (path, &fsbuf) < 0)
|
if (__statfs (path, &fsbuf) < 0)
|
||||||
/* not possible, return the default value. */
|
/* not possible, return the default value. */
|
||||||
return LINK_MAX;
|
return LINUX_LINK_MAX;
|
||||||
|
|
||||||
switch (fsbuf.f_type)
|
switch (fsbuf.f_type)
|
||||||
{
|
{
|
||||||
@ -87,7 +87,7 @@ __pathconf (const char *path, int name)
|
|||||||
return UFS_LINK_MAX;
|
return UFS_LINK_MAX;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return LINK_MAX;
|
return LINUX_LINK_MAX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user