forked from Imagelibrary/binutils-gdb
Don't include sys/param.h
sys/param.h on recent versions of powerpc glibc ends up including asm/elf.h via asm/sigcontex.h. asm/elf.h defines R_PPC_* and R_PPC64_* macros, which clash with our include/elf/ppc.h and include/elf/ppc64.h. It turns out that no current source uses LD_PATHMAX, so there is no need for limits.h or sys/param.h, except for one occurrence of UINT_MAX. I don't have a quarrel with limits.h, but it seems unnecessary just for UINT_MAX. * sysdep.h: Don't include limits.h and sys/param.h. Don't include unistd.h twice. (LD_PATHMAX): Don't define. * ldlang.c (lang_common): Don't use UINT_MAX.
This commit is contained in:
22
ld/sysdep.h
22
ld/sysdep.h
@@ -56,34 +56,12 @@ extern char *strrchr ();
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* for PATH_MAX */
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
/* for MAXPATHLEN */
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#ifdef PATH_MAX
|
||||
# define LD_PATHMAX PATH_MAX
|
||||
#else
|
||||
# ifdef MAXPATHLEN
|
||||
# define LD_PATHMAX MAXPATHLEN
|
||||
# else
|
||||
# define LD_PATHMAX 1024
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_REALPATH
|
||||
# define REALPATH(a,b) realpath (a, b)
|
||||
#else
|
||||
# define REALPATH(a,b) NULL
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_BINARY_FOPEN
|
||||
#include "fopen-bin.h"
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user