diff lib/c-stack.c @ 12335:d6110537824b

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.
author Jim Meyering <meyering@redhat.com>
date Sun, 22 Nov 2009 17:11:14 +0100 (2009-11-22)
parents d904c3a8f14c
children e8d2c6fc33ad
line wrap: on
line diff
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -218,12 +218,14 @@
 # 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