diff --git a/include/dwarf.h b/include/dwarf.h index 37b5ec1c..c6b95b71 100644 --- a/include/dwarf.h +++ b/include/dwarf.h @@ -34,6 +34,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # include #endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #include struct dwarf_cursor; /* forward-declaration */ diff --git a/src/dwarf/Lexpr.c b/src/dwarf/Lexpr.c index 245970c9..b72fce08 100644 --- a/src/dwarf/Lexpr.c +++ b/src/dwarf/Lexpr.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/dwarf/Lfde.c b/src/dwarf/Lfde.c index e779e8f1..9c22b618 100644 --- a/src/dwarf/Lfde.c +++ b/src/dwarf/Lfde.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/dwarf/Lfind_proc_info-lsb.c b/src/dwarf/Lfind_proc_info-lsb.c index 27a5eeac..c9865634 100644 --- a/src/dwarf/Lfind_proc_info-lsb.c +++ b/src/dwarf/Lfind_proc_info-lsb.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/dwarf/Lparser.c b/src/dwarf/Lparser.c index f23aaf48..0c379003 100644 --- a/src/dwarf/Lparser.c +++ b/src/dwarf/Lparser.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/dwarf/Lpe.c b/src/dwarf/Lpe.c index a672358f..f302638d 100644 --- a/src/dwarf/Lpe.c +++ b/src/dwarf/Lpe.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/dwarf/Lstep.c b/src/dwarf/Lstep.c index c1ac3c75..2b70fa48 100644 --- a/src/dwarf/Lstep.c +++ b/src/dwarf/Lstep.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Ldestroy_addr_space.c b/src/mi/Ldestroy_addr_space.c index 5bf9364b..a1330987 100644 --- a/src/mi/Ldestroy_addr_space.c +++ b/src/mi/Ldestroy_addr_space.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Ldyn-extract.c b/src/mi/Ldyn-extract.c index 1802f865..e348f831 100644 --- a/src/mi/Ldyn-extract.c +++ b/src/mi/Ldyn-extract.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lfind_dynamic_proc_info.c b/src/mi/Lfind_dynamic_proc_info.c index bc88e1c5..081065f7 100644 --- a/src/mi/Lfind_dynamic_proc_info.c +++ b/src/mi/Lfind_dynamic_proc_info.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lget_accessors.c b/src/mi/Lget_accessors.c index 555e37f3..72c22b5d 100644 --- a/src/mi/Lget_accessors.c +++ b/src/mi/Lget_accessors.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lget_fpreg.c b/src/mi/Lget_fpreg.c index e3be4414..6492a5a2 100644 --- a/src/mi/Lget_fpreg.c +++ b/src/mi/Lget_fpreg.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lget_proc_info_by_ip.c b/src/mi/Lget_proc_info_by_ip.c index 96910d83..e5d63c15 100644 --- a/src/mi/Lget_proc_info_by_ip.c +++ b/src/mi/Lget_proc_info_by_ip.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lget_proc_name.c b/src/mi/Lget_proc_name.c index 378097b5..0f8c753f 100644 --- a/src/mi/Lget_proc_name.c +++ b/src/mi/Lget_proc_name.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lget_reg.c b/src/mi/Lget_reg.c index effe8a80..6ca62007 100644 --- a/src/mi/Lget_reg.c +++ b/src/mi/Lget_reg.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lput_dynamic_unwind_info.c b/src/mi/Lput_dynamic_unwind_info.c index 99597cd5..573e8ecc 100644 --- a/src/mi/Lput_dynamic_unwind_info.c +++ b/src/mi/Lput_dynamic_unwind_info.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lset_caching_policy.c b/src/mi/Lset_caching_policy.c index cc18816b..0be4cbf1 100644 --- a/src/mi/Lset_caching_policy.c +++ b/src/mi/Lset_caching_policy.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lset_fpreg.c b/src/mi/Lset_fpreg.c index 2497d404..a903f239 100644 --- a/src/mi/Lset_fpreg.c +++ b/src/mi/Lset_fpreg.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/Lset_reg.c b/src/mi/Lset_reg.c index c7a872b0..c84d4669 100644 --- a/src/mi/Lset_reg.c +++ b/src/mi/Lset_reg.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/mi/backtrace.c b/src/mi/backtrace.c index 46d6c97f..640675ce 100644 --- a/src/mi/backtrace.c +++ b/src/mi/backtrace.c @@ -24,8 +24,16 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef UNW_REMOTE_ONLY - #define UNW_LOCAL_ONLY + +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #include /* See glibc manual for a description of this function. */ diff --git a/src/setjmp/longjmp.c b/src/setjmp/longjmp.c index ca5f1e42..09662edc 100644 --- a/src/setjmp/longjmp.c +++ b/src/setjmp/longjmp.c @@ -23,6 +23,14 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include diff --git a/src/x86_64/Gcreate_addr_space.c b/src/x86_64/Gcreate_addr_space.c index 975387a6..02b93ebb 100644 --- a/src/x86_64/Gcreate_addr_space.c +++ b/src/x86_64/Gcreate_addr_space.c @@ -29,6 +29,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "unwind_i.h" +#if defined(_LITTLE_ENDIAN) && !defined(__LITTLE_ENDIAN) +#define __LITTLE_ENDIAN _LITTLE_ENDIAN +#endif + PROTECTED unw_addr_space_t unw_create_addr_space (unw_accessors_t *a, int byte_order) { diff --git a/src/x86_64/Gis_signal_frame.c b/src/x86_64/Gis_signal_frame.c index 72edf46e..db04d750 100644 --- a/src/x86_64/Gis_signal_frame.c +++ b/src/x86_64/Gis_signal_frame.c @@ -25,6 +25,16 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + +#include + #include "unwind_i.h" #ifdef __linux__ diff --git a/src/x86_64/Gresume.c b/src/x86_64/Gresume.c index 54215c32..90207e11 100644 --- a/src/x86_64/Gresume.c +++ b/src/x86_64/Gresume.c @@ -33,6 +33,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include +#if defined(__linux) /* sigreturn() is a no-op on x86_64 glibc. */ static NORETURN inline long @@ -45,6 +46,7 @@ my_rt_sigreturn (void *new_sp) : "memory"); abort (); } +#endif HIDDEN inline int x86_64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) @@ -73,6 +75,8 @@ x86_64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) (unsigned long long) c->dwarf.ip); setcontext (uc); } +#elif defined(__FreeBSD__) + /* XXXKIB */ #else # warning Implement me! #endif diff --git a/src/x86_64/Lcreate_addr_space.c b/src/x86_64/Lcreate_addr_space.c index 0f2dc6be..7cde3622 100644 --- a/src/x86_64/Lcreate_addr_space.c +++ b/src/x86_64/Lcreate_addr_space.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Lget_proc_info.c b/src/x86_64/Lget_proc_info.c index 69028b01..83086c32 100644 --- a/src/x86_64/Lget_proc_info.c +++ b/src/x86_64/Lget_proc_info.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Lget_save_loc.c b/src/x86_64/Lget_save_loc.c index 9ea048a9..1f6aeb5c 100644 --- a/src/x86_64/Lget_save_loc.c +++ b/src/x86_64/Lget_save_loc.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Lglobal.c b/src/x86_64/Lglobal.c index 6d7b489e..85c5d336 100644 --- a/src/x86_64/Lglobal.c +++ b/src/x86_64/Lglobal.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Linit.c b/src/x86_64/Linit.c index e9abfdd4..36f0ad49 100644 --- a/src/x86_64/Linit.c +++ b/src/x86_64/Linit.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Linit_local.c b/src/x86_64/Linit_local.c index 68a1687e..eee77a37 100644 --- a/src/x86_64/Linit_local.c +++ b/src/x86_64/Linit_local.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Linit_remote.c b/src/x86_64/Linit_remote.c index 58cb04ab..11e68b47 100644 --- a/src/x86_64/Linit_remote.c +++ b/src/x86_64/Linit_remote.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Lis_signal_frame.c b/src/x86_64/Lis_signal_frame.c index b9a7c4f5..4820751e 100644 --- a/src/x86_64/Lis_signal_frame.c +++ b/src/x86_64/Lis_signal_frame.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Lregs.c b/src/x86_64/Lregs.c index 2c9c75cd..f120896f 100644 --- a/src/x86_64/Lregs.c +++ b/src/x86_64/Lregs.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Lresume.c b/src/x86_64/Lresume.c index 41a8cf00..3b9591a4 100644 --- a/src/x86_64/Lresume.c +++ b/src/x86_64/Lresume.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY) diff --git a/src/x86_64/Lstep.c b/src/x86_64/Lstep.c index c1ac3c75..2b70fa48 100644 --- a/src/x86_64/Lstep.c +++ b/src/x86_64/Lstep.c @@ -1,3 +1,11 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #define UNW_LOCAL_ONLY #include #if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)