diff options
Diffstat (limited to 'libdwfl')
| -rw-r--r-- | libdwfl/ChangeLog | 15 | ||||
| -rw-r--r-- | libdwfl/core-file.c | 1 | ||||
| -rw-r--r-- | libdwfl/dwfl_report_elf.c | 2 | ||||
| -rw-r--r-- | libdwfl/dwfl_segment_report_module.c | 7 | ||||
| -rw-r--r-- | libdwfl/frame_unwind.c | 5 | ||||
| -rw-r--r-- | libdwfl/linux-core-attach.c | 4 | ||||
| -rw-r--r-- | libdwfl/linux-kernel-modules.c | 20 | ||||
| -rw-r--r-- | libdwfl/linux-pid-attach.c | 4 |
8 files changed, 32 insertions, 26 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 3332db7a..bc627fee 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,18 @@ +2016-11-23 Mark Wielaard <[email protected]> + + * linux-kernel-modules.c: Only include fts.h early if BAD_FTS is + defined. + +2016-10-11 Akihiko Odaki <[email protected]> + + * core-file.c: Remove sys/param.h. + * dwfl_segment_report_module.c: Likewise. Add system.h include. + (MAX): Remove definition. + * frame_unwind.c: Add system.h include. + (MAX): Remove definition. + * linux-core-attach.c (MIN): Remove definition. + * linux-pid-attach.c (MAX): Likewise. + 2016-08-12 Mark Wielaard <[email protected]> * link_map.c (dwfl_link_map_report): Fix assert, set in.d_size. diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c index 67684c9a..84cb89ac 100644 --- a/libdwfl/core-file.c +++ b/libdwfl/core-file.c @@ -32,7 +32,6 @@ #include "libdwflP.h" #include <gelf.h> -#include <sys/param.h> #include <unistd.h> #include <endian.h> #include <byteswap.h> diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c index 1c6e401d..73a5511a 100644 --- a/libdwfl/dwfl_report_elf.c +++ b/libdwfl/dwfl_report_elf.c @@ -170,7 +170,7 @@ __libdwfl_elf_address_range (Elf *elf, GElf_Addr base, bool add_p_vaddr, /* An assigned base address is meaningless for these. */ base = 0; add_p_vaddr = true; - + /* Fallthrough. */ case ET_DYN: default:; size_t phnum; diff --git a/libdwfl/dwfl_segment_report_module.c b/libdwfl/dwfl_segment_report_module.c index 40553c94..207a2573 100644 --- a/libdwfl/dwfl_segment_report_module.c +++ b/libdwfl/dwfl_segment_report_module.c @@ -35,11 +35,12 @@ #include <elf.h> #include <gelf.h> #include <inttypes.h> -#include <sys/param.h> #include <endian.h> #include <unistd.h> #include <fcntl.h> +#include <system.h> + /* A good size for the initial read from memory, if it's not too costly. This more than covers the phdrs and note segment in the average 64-bit @@ -53,10 +54,6 @@ # define MY_ELFDATA ELFDATA2MSB #endif -#ifndef MAX -# define MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif - /* Return user segment index closest to ADDR but not above it. If NEXT, return the closest to ADDR but not below it. */ diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c index a885446f..fb42c1a7 100644 --- a/libdwfl/frame_unwind.c +++ b/libdwfl/frame_unwind.c @@ -35,6 +35,7 @@ #include "libdwflP.h" #include "../libdw/dwarf.h" #include <sys/ptrace.h> +#include <system.h> /* Maximum number of DWARF expression stack slots before returning an error. */ #define DWARF_EXPR_STACK_MAX 0x100 @@ -43,10 +44,6 @@ error. */ #define DWARF_EXPR_STEPS_MAX 0x1000 -#ifndef MAX -# define MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif - bool internal_function __libdwfl_frame_reg_get (Dwfl_Frame *state, unsigned regno, Dwarf_Addr *val) diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c index 5a7b3b3d..93d0e46e 100644 --- a/libdwfl/linux-core-attach.c +++ b/libdwfl/linux-core-attach.c @@ -32,10 +32,6 @@ #include "../libdw/memory-access.h" -#ifndef MIN -# define MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif - struct core_arg { Elf *core; diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c index 54c0b908..9cd8ea93 100644 --- a/libdwfl/linux-kernel-modules.c +++ b/libdwfl/linux-kernel-modules.c @@ -26,10 +26,12 @@ the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* We include this before config.h because it can't handle _FILE_OFFSET_BITS. +/* In case we have a bad fts we include this before config.h because it + can't handle _FILE_OFFSET_BITS. Everything we need here is fine if its declarations just come first. */ - -#include <fts.h> +#ifdef BAD_FTS + #include <fts.h> +#endif #include <config.h> @@ -44,11 +46,15 @@ #include <fcntl.h> #include <unistd.h> -/* Since fts.h is included before config.h, its indirect inclusions may not +/* If fts.h is included before config.h, its indirect inclusions may not give us the right LFS aliases of these functions, so map them manually. */ -#ifdef _FILE_OFFSET_BITS -#define open open64 -#define fopen fopen64 +#ifdef BAD_FTS + #ifdef _FILE_OFFSET_BITS + #define open open64 + #define fopen fopen64 + #endif +#else + #include <fts.h> #endif diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c index c13f2b62..adfc7f81 100644 --- a/libdwfl/linux-pid-attach.c +++ b/libdwfl/linux-pid-attach.c @@ -37,10 +37,6 @@ #include <sys/syscall.h> #include <unistd.h> -#ifndef MAX -# define MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif - #ifdef __linux__ static bool |
