aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/posix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/fpathconf.c14
-rw-r--r--sysdeps/posix/pathconf.c14
2 files changed, 24 insertions, 4 deletions
diff --git a/sysdeps/posix/fpathconf.c b/sysdeps/posix/fpathconf.c
index 94593bc..ede91fb 100644
--- a/sysdeps/posix/fpathconf.c
+++ b/sysdeps/posix/fpathconf.c
@@ -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.
The GNU C Library is free software; you can redistribute it and/or
@@ -81,7 +81,17 @@ __fpathconf (fd, name)
return -1;
}
else
- return buf.f_namelen;
+ {
+#ifdef _STATFS_F_NAMELEN
+ return buf.f_namelen;
+#else
+# ifdef _STATFS_F_NAME_MAX
+ return buf.f_name_max;
+# else
+ return NAME_MAX;
+# endif
+#endif
+ }
}
#else
return -1;
diff --git a/sysdeps/posix/pathconf.c b/sysdeps/posix/pathconf.c
index 2032afe..b6181c3 100644
--- a/sysdeps/posix/pathconf.c
+++ b/sysdeps/posix/pathconf.c
@@ -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.
The GNU C Library is free software; you can redistribute it and/or
@@ -76,7 +76,17 @@ __pathconf (const char *path, int name)
return -1;
}
else
- return buf.f_namelen;
+ {
+#ifdef _STATFS_F_NAMELEN
+ return buf.f_namelen;
+#else
+# ifdef _STATFS_F_NAME_MAX
+ return buf.f_name_max;
+# else
+ return NAME_MAX;
+# endif
+#endif
+ }
}
#else
return -1;