[patch] Use MAXPATHLEN, fix sunos build problem

Jason R Thorpe thorpej@wasabisystems.com
Sat Jan 19 17: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.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>



More information about the Gdb-patches mailing list