LINK_MAX undefined
Jakub Jelinek
jakub@redhat.com
Thu Jun 8 02:53:00 GMT 2000
On Thu, Jun 08, 2000 at 11:20:51AM +0200, Andreas Jaeger wrote:
>
> Compiling without linuxthreads I now get this error message:
>
> ../sysdeps/unix/sysv/linux/pathconf.c: In function `__pathconf':
> ../sysdeps/unix/sysv/linux/pathconf.c:42: `LINK_MAX' undeclared (first use in this function)
> ../sysdeps/unix/sysv/linux/pathconf.c:42: (Each undeclared identifier is reported only once
> ../sysdeps/unix/sysv/linux/pathconf.c:42: for each function it appears in.)
>
> What shall we do here ? Uli, it seems you removed LINK_MAX completly
> but it's used in a number of places throughout glibc. Should
> _POSIX_LINK_MAX used instead?
You could do something like (untested):
There is a problem with OPEN_MAX as well, sys/params.h uses it to define
NOFILE. How to solve that one?
BTW: While reading this, I have noticed only Alpha has code for
_PC_FILESIZEBITS. Shouldn't we just kill Alpha's version of *pathconf.c and
use one common because >2GB files are now supported on all arches?
Or should we check the kernel version first? Note that if we do check
version, we have to do it on alpha/sparc64 as well, though with a different
kernel version number, because it did not work for quite some time.
2000-06-08 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/pathconf.c: Include linux/limits.h before
limits.h to get LINK_MAX definition.
* sysdeps/unix/sysv/linux/fpathconf.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/pathconf.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/fpathconf.c: Likewise.
--- libc/sysdeps/unix/sysv/linux/alpha/pathconf.c.jj Tue Jan 4 11:12:06 2000
+++ libc/sysdeps/unix/sysv/linux/alpha/pathconf.c Thu Jun 8 05:42:11 2000
@@ -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
@@ -19,6 +19,7 @@
#include <errno.h>
#include <stddef.h>
#include <unistd.h>
+#include <linux/limits.h>
#include <limits.h>
#include <fcntl.h>
#include <sys/statfs.h>
--- libc/sysdeps/unix/sysv/linux/alpha/fpathconf.c.jj Tue Jan 4 11:12:06 2000
+++ libc/sysdeps/unix/sysv/linux/alpha/fpathconf.c Thu Jun 8 05:41:55 2000
@@ -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
@@ -19,6 +19,7 @@
#include <errno.h>
#include <stddef.h>
#include <unistd.h>
+#include <linux/limits.h>
#include <limits.h>
#include <sys/statfs.h>
--- libc/sysdeps/unix/sysv/linux/pathconf.c.jj Tue Jan 4 11:12:06 2000
+++ libc/sysdeps/unix/sysv/linux/pathconf.c Thu Jun 8 05:37:48 2000
@@ -1,5 +1,5 @@
/* Linux specific extensions to pathconf.
- Copyright (C) 1991, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1991, 95, 96, 98, 99, 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
@@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <unistd.h>
+#include <linux/limits.h>
#include <limits.h>
#include <sys/statfs.h>
--- libc/sysdeps/unix/sysv/linux/fpathconf.c.jj Tue Jan 4 11:12:06 2000
+++ libc/sysdeps/unix/sysv/linux/fpathconf.c Thu Jun 8 05:37:06 2000
@@ -1,5 +1,5 @@
/* Linux specific extensions to fpathconf.
- Copyright (C) 1991, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1991, 95, 96, 98, 99, 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
@@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <unistd.h>
+#include <linux/limits.h>
#include <limits.h>
#include <sys/statfs.h>
Jakub
More information about the Libc-hacker
mailing list