Re: libc6! Cross compilation issues
> I stumbled across the following definitions in <sys/param.h>, which are
> defined in Linux, but not in Hurd:
> /* BSD names for some <limits.h> values. */
> #define NBBY CHAR_BIT
> #ifndef NGROUPS
> #define NGROUPS NGROUPS_MAX
> #define MAXSYMLINKS 5
> #define CANBSIZ MAX_CANON
> #define NCARGS ARG_MAX
> #define MAXPATHLEN PATH_MAX
> #define NOFILE OPEN_MAX
The current hurd <sys/params.h> does define NBBY, NGROUPS, MAXSYMLINKS,
CANBSIZ, and NCARGS. The NCARGS and NGROUPS definitions are fictitious,
since there are no actual limits on those things.
> Especially the last two are used frequently.
No program that uses them unconditionally complies to 1003.1-1996.
> Notice that neither PATH_MAX nor OPEN_MAX are defined in Hurd, too.
Because there are no limits. Aside from runtime memory availability, there
is no limit whatsoever on the length of a file name imposed by the system
architecture (individual filesystems may have limits, which pathconf
reports). The only limit on open file descriptors is the soft resource
limit settable with setrlimit(RLIM_NOFILE).
A POSIX-compliant program takes absence of these definitions to mean there
is no limit determinable at compile-time, and uses sysconf or pathconf as
appropriate to ascertain the run-time limits; in most cases, they can
return -1 to indicate there is no ascertainable limit. When that is true
on the Hurd, that is what it returns.
I can dig the standard out and quote chapter and verse if it would help.