summaryrefslogtreecommitdiff
path: root/lib/c-stack.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-11-22 17:11:14 +0100
committerJim Meyering <meyering@redhat.com>2009-11-22 17:11:14 +0100
commit1398c0de968352891dfaaf26d4f8bf6676e5b060 (patch)
treea4d334d6827802e9b318362301c1bf91a364592c /lib/c-stack.c
parent32be9f34696c86446768d8728667ee0564832d81 (diff)
downloadgnulib-1398c0de968352891dfaaf26d4f8bf6676e5b060.tar.gz
c-stack: avoid defining an unused static function
* lib/c-stack.c (find_stack_direction): Do not define this function when it will not be used.
Diffstat (limited to 'lib/c-stack.c')
-rw-r--r--lib/c-stack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/c-stack.c b/lib/c-stack.c
index 044272cc3e..1ee356074d 100644
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -218,12 +218,14 @@ c_stack_action (void (*action) (int))
# if STACK_DIRECTION
# define find_stack_direction(ptr) STACK_DIRECTION
# else
+# if ! SIGACTION_WORKS || HAVE_XSI_STACK_OVERFLOW_HEURISTIC
static int
find_stack_direction (char const *addr)
{
char dummy;
return ! addr ? find_stack_direction (&dummy) : addr < &dummy ? 1 : -1;
}
+# endif
# endif
# if SIGACTION_WORKS