From 8cf9d7bc2daf04b1f2c826325a2dd45a12d34fe6 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Thu, 17 Mar 2011 13:19:07 +0000 Subject: Add 'getthrds' declaration check in configure for AIX On newer versions of AIX (6.x and later), this function is actually declared in procinfo.h, thus causing a compilation warning when we re-declare it ourselves. This patch adds a configure check for that function allowing us to declare the function only if the declaration isn't already present in one of procinfo system header. gdb/ChangeLog: PR gdb/12116: * configure.ac: Add getthrds declaration check. * configure, config.in: Regenerate. * aix-thread.c (getthrds): Declare only if not already declared in procinfo.h. More declaration out of get_signaled_thread to global scope. --- gdb/aix-thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/aix-thread.c') diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 37b798a43ba..c5db262e1f6 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -58,6 +58,10 @@ #include #include +#if !HAVE_DECL_GETTHRDS +extern int getthrds (pid_t, struct thrdsinfo64 *, int, pthdb_tid_t *, int); +#endif + /* Whether to emit debugging output. */ static int debug_aix_thread; @@ -647,10 +651,6 @@ get_signaled_thread (void) pthdb_tid_t ktid = 0; int result = 0; - /* getthrds(3) isn't prototyped in any AIX 4.3.3 #include file. */ - extern int getthrds (pid_t, struct thrdsinfo64 *, - int, pthdb_tid_t *, int); - while (1) { if (getthrds (PIDGET (inferior_ptid), &thrinf, -- cgit v1.2.1