From b72a3681aedba711dd62bc758bd876b369040828 Mon Sep 17 00:00:00 2001 From: Theo Schlossnagle Date: Tue, 13 Dec 2011 19:24:59 +0000 Subject: Make this compile on Solaris again... oh, the irony --- configure.ac | 1 + cvt/dwarf.c | 6 ++++++ libdwarf/dwarf_init.c | 2 +- libdwarf/libdwarf.h | 8 ++++++-- libdwarf/queue.h | 2 ++ 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index dd1e425..101b4f2 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,7 @@ pthread.h \ stdint.h \ string.h \ strings.h \ +sys/cdefs.h \ sys/errno.h \ sys/mman.h \ sys/param.h \ diff --git a/cvt/dwarf.c b/cvt/dwarf.c index 2e6adf5..48ce25c 100644 --- a/cvt/dwarf.c +++ b/cvt/dwarf.c @@ -1262,6 +1262,12 @@ static const fp_size_map_t fp_encodings[] = { { { 0, 0 }, { 0, 0, 0 } } }; +#ifndef DW_ATE_SUN_interval_float +#define DW_ATE_SUN_interval_float 0x91 +#endif +#ifndef DW_ATE_SUN_imaginary_float +#define DW_ATE_SUN_imaginary_float 0x92 +#endif static uint_t die_base_type2enc(dwarf_t *dw, Dwarf_Off off, Dwarf_Signed enc, size_t sz) { diff --git a/libdwarf/dwarf_init.c b/libdwarf/dwarf_init.c index 9128a76..8fd5761 100644 --- a/libdwarf/dwarf_init.c +++ b/libdwarf/dwarf_init.c @@ -417,7 +417,7 @@ dwarf_init_abbrev(Dwarf_Debug dbg, Dwarf_CU cu, Dwarf_Error *error) uint64_t form; uint64_t offset; uint64_t tag; - u_int8_t children; + uint8_t children; d = dbg->dbg_s[DWARF_debug_abbrev].s_data; diff --git a/libdwarf/libdwarf.h b/libdwarf/libdwarf.h index 9918a50..c3ac0fb 100644 --- a/libdwarf/libdwarf.h +++ b/libdwarf/libdwarf.h @@ -111,7 +111,9 @@ typedef struct _Dwarf_Error { #define DW_DLC_READ 0 /* read only access */ /* Function prototype definitions. */ -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif Dwarf_Abbrev dwarf_abbrev_find(Dwarf_CU, uint64_t); Dwarf_AttrValue dwarf_attrval_find(Dwarf_Die, Dwarf_Half); Dwarf_Die dwarf_die_find(Dwarf_Die, Dwarf_Unsigned); @@ -157,6 +159,8 @@ void dwarf_dump_strtab(Dwarf_Debug); void dwarf_dump_symtab(Dwarf_Debug); void dwarf_dump_raw(Dwarf_Debug); void dwarf_dump_tree(Dwarf_Debug); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* !_LIBDWARF_H_ */ diff --git a/libdwarf/queue.h b/libdwarf/queue.h index 1fdfea3..0c42e05 100644 --- a/libdwarf/queue.h +++ b/libdwarf/queue.h @@ -33,7 +33,9 @@ #ifndef _SYS_QUEUE_H_ #define _SYS_QUEUE_H_ +#ifdef HAVE_SYS_CDEFS_H #include +#endif /* * This file defines four types of data structures: singly-linked lists, -- cgit v1.2.3