This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Use MAXPATHLEN, fix sunos build problem
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: thorpej at wasabisystems dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 10 Feb 2002 11:39:25 -0500
- Subject: Re: [patch] Use MAXPATHLEN, fix sunos build problem
- References: <3C4A12B7.email@example.com> <20020119173843.N8364@dr-evil.shagadelic.org> <3C4A31EB.firstname.lastname@example.org> <20020119192943.O8364@dr-evil.shagadelic.org>
> On Sat, Jan 19, 2002 at 07:43:35PM -0500, Andrew Cagney wrote:
> > 2002-01-19 Andrew Cagney <email@example.com>
>> > * utils.c: Include <sys/param.h> for MAXPATHLEN.
> > (gdb_realpath): Use MAXPATHLEN when PATH_MAX is not defined.
> Seems like you really want PATH_MAX to be an autoconf test, and if
> not, then test for MAXPATHLEN in <sys/param.h> and define PATH_MAX
> in terms of MAXPATHLEN.
> Basically, <machine/param.h> is by no means a standardized header, and
> pulling it in causes all sorts of namespace pollution, so you wanna
> use it only if you have to.
This really begs a question. Should we put a bomb under utils.c
breaking it up into smaller chunks (gdb/utils/*.c) so that people can be
more confident about this.
At present utils.c contains so much that someone trying to change it is
never really sure what the consequences of an include file tweek are.