diff options
author | Joel Brobecker <brobecker@gnat.com> | 2011-03-17 13:19:10 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2011-03-17 13:19:10 +0000 |
commit | d645e32eb8b60a84a2b0bf8a02e782289e992641 (patch) | |
tree | bf26cdafe9160702dc3e7bae448708b16c164dac /gdb/configure | |
parent | a5f21126be4081334129fb251980d8825f872bdb (diff) | |
download | gdb-d645e32eb8b60a84a2b0bf8a02e782289e992641.zip gdb-d645e32eb8b60a84a2b0bf8a02e782289e992641.tar.gz gdb-d645e32eb8b60a84a2b0bf8a02e782289e992641.tar.bz2 |
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.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure index 5ee5ce6..92818a0 100755 --- a/gdb/configure +++ b/gdb/configure @@ -14487,6 +14487,22 @@ $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" CONFIG_OBS="${CONFIG_OBS} aix-thread.o" CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" + + # Older versions of AIX do not provide the declaration for + # the getthrds function (it appears that it was introduced + # with AIX 6.x). + ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> +" +if test "x$ac_cv_have_decl_getthrds" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETTHRDS $ac_have_decl +_ACEOF + fi ;; esac |