[patch] Use MAXPATHLEN, fix sunos build problem

Andrew Cagney ac131313@cygnus.com
Sun Feb 10 08:39:00 GMT 2002


> On Sat, Jan 19, 2002 at 07:43:35PM -0500, Andrew Cagney wrote:
> 
>  > 2002-01-19  Andrew Cagney  <ac131313@redhat.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.

Andrew





More information about the Gdb-patches mailing list