Not all systems have SIGWINCH. But this isn't an essential
feature so only compile it in if its available.
dnl Checks for header files.
AC_CHECK_HEADERS([sys/wait.h fpu_control.h ieeefp.h fenv.h pwd.h])
+dnl Some systems dont have SIGWINCH
+AC_CHECK_DECLS([SIGWINCH], [], [],
+ [#include <signal.h>
+ /* NetBSD declares sys_siglist in unistd.h. */
+ #ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+ ])
+
+
# For gnulib.
gl_INIT
\f
/* ascii_close_page () and support routines. */
+
+#if HAVE_DECL_SIGWINCH
static struct ascii_driver *the_driver;
static void
{
update_page_size (the_driver, false);
}
+#endif
static bool
ascii_open_page (struct ascii_driver *a)
a->file = fn_open (a->file_name, a->append ? "a" : "w");
if (a->file != NULL)
{
+#if HAVE_DECL_SIGWINCH
if ( isatty (fileno (a->file)))
{
struct sigaction action;
a->auto_length = true;
sigaction (SIGWINCH, &action, NULL);
}
-
+#endif
if (a->init != NULL)
fputs (a->init, a->file);
}