This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Use MAXPATHLEN, fix sunos build problem


> 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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]