[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091229192827.GF4815@const>
Date: Tue, 29 Dec 2009 20:28:27 +0100
From: Samuel Thibault <samuel.thibault@...-lyon.org>
To: "Robert P. J. Day" <rpjday@...shcourse.ca>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: what's the purpose of MAXHOSTNAMELEN?
Robert P. J. Day, le Tue 29 Dec 2009 14:19:30 -0500, a écrit :
> so lots of people define it but no one uses it. it *is* exported to
> user space in /usr/include/asm/param.h, but i still have no idea what
> it's for in user space. obsolete?
It's like all these *MAX* #defines: they are a bad way to express the
system limitations. They are bad because they end up compiled-in, but
also because people understand them as "a typical allocation length" and
get lazy. The typical example is PATH_MAX, which is #defined to 4096.
A _lot_ of applications thus keep allocating 4KB for all paths.
See
http://www.gnu.org/software/hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PATH_tt_MAXPATHL
If you could drop it (would be completely POSIX-compliant), that'd be a
great service to GNU/Hurd porters, but I bet you'll also get a lot of
angry people.
Samuel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists