summaryrefslogtreecommitdiff
path: root/gdb/solib-ia64-hpux.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-07-01 11:28:29 +0000
committerPedro Alves <palves@redhat.com>2013-07-01 11:28:29 +0000
commit212fe135e533bb0e9667e42d7e3cbba5a12e1c7c (patch)
treee685c47d503838682ace1dcaaecc3efa8d619116 /gdb/solib-ia64-hpux.c
parent598d98c728f9024c1ef584f4c966d42b3b3e2dc2 (diff)
downloadgdb-212fe135e533bb0e9667e42d7e3cbba5a12e1c7c.tar.gz
Normalize on PATH_MAX instead of MAXPATHLEN throughout.
With the pathmax gnulib module in place, we can use PATH_MAX consistently throughout, instead of the current mixbag of PATH_MAX and MAXPATHLEN uses. It's no longer necessary to include sys/param.h (supposedly, I can't check all ports touched here) for MAXPATHLEN. Don't remove sys/param.h from GDB's configure.ac, as later tests in the file use HAVE_SYS_PARAM_H checks. Tested on x86_64 Fedora 17. Also cross-built for --host=i686-w64-mingw32, and --host=i586-pc-msdosdjgpp. gdb/ 2013-07-01 Pedro Alves <palves@redhat.com> * defs.h: Include "pathmax.h". * utils.c: Don't include sys/param.h. (gdb_realpath): Remove code that checks for MAXPATHLEN. * solib-ia64-hpux.c (ia64_hpux_handle_load_event): Use PATH_MAX instead of MAXPATHLEN. * solib-sunos.c: Don't include sys/param.h. * xcoffread.c: Don't include sys/param.h. * bsd-kvm.c: Don't include sys/param.h. * darwin-nat.c: Don't include sys/param.h. (darwin_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN. * darwin-nat-info.c: Don't include sys/param.h. * fbsd-nat.c (fbsd_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN. * i386obsd-nat.c: Don't include sys/param.h. * inf-child.c: Don't include sys/param.h. (inf_child_fileio_readlink): Use PATH_MAX instead of MAXPATHLEN. * linux-fork.c: Don't include sys/param.h. (fork_save_infrun_state): Use PATH_MAX instead of MAXPATHLEN. * linux-nat.c: Don't include sys/param.h. (linux_child_pid_to_exec_file, linux_proc_pending_signals) (linux_proc_pending_signals): Use PATH_MAX instead of MAXPATHLEN. * m68klinux-nat.c: Don't include sys/param.h. * nbsd-nat.c: Don't include sys/param.h. (nbsd_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN. * ppc-linux-nat.c: Don't include sys/param.h. * rs6000-nat.c: Don't include sys/param.h. * spu-linux-nat.c. Don't include sys/param.h. * windows-nat.c: Don't include sys/param.h. * xtensa-linux-nat.c: Don't include sys/param.h. * config/i386/nm-fbsd.h: Don't include sys/param.h. gdb/gdbserver/ 2013-07-01 Pedro Alves <palves@redhat.com> * server.h: Include "pathmax.h". * linux-low.c: Don't include sys/param.h. (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of MAXPATHLEN. * win32-low.c: Don't include sys/param.h. (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
Diffstat (limited to 'gdb/solib-ia64-hpux.c')
-rw-r--r--gdb/solib-ia64-hpux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/solib-ia64-hpux.c b/gdb/solib-ia64-hpux.c
index 0a92904d311..98fad072e2e 100644
--- a/gdb/solib-ia64-hpux.c
+++ b/gdb/solib-ia64-hpux.c
@@ -189,7 +189,7 @@ ia64_hpux_handle_load_event (struct regcache *regcache)
CORE_ADDR module_desc_addr;
ULONGEST module_desc_size;
CORE_ADDR so_path_addr;
- char so_path[MAXPATHLEN];
+ char so_path[PATH_MAX];
struct load_module_desc module_desc;
struct so_list *new_so;
@@ -210,7 +210,7 @@ ia64_hpux_handle_load_event (struct regcache *regcache)
sizeof (struct load_module_desc),
pulongest (module_desc_size));
- read_memory_string (so_path_addr, so_path, MAXPATHLEN);
+ read_memory_string (so_path_addr, so_path, PATH_MAX);
read_memory (module_desc_addr, (gdb_byte *) &module_desc,
sizeof (module_desc));