Manual: improve out-of-memory documentation.
[gnulib.git] / m4 / termios_h.m4
1 # termios_h.m4 serial 1
2 dnl Copyright (C) 2010 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 AC_DEFUN([gl_TERMIOS_H],
8 [
9   dnl Use AC_REQUIRE here, so that the default behavior below is expanded
10   dnl once only, before all statements that occur in other macros.
11   AC_REQUIRE([gl_TERMIOS_H_DEFAULTS])
12
13   gl_CHECK_NEXT_HEADERS([termios.h])
14
15   dnl Check for declarations of anything we want to poison if the
16   dnl corresponding gnulib module is not in use, and which is not
17   dnl guaranteed by C89.
18   gl_WARN_ON_USE_PREPARE([[#include <termios.h>]],
19     [tcgetsid])
20 ])
21
22 AC_DEFUN([gl_TERMIOS_MODULE_INDICATOR],
23 [
24   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
25   AC_REQUIRE([gl_TERMIOS_H_DEFAULTS])
26   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
27   dnl Define it also as a C macro, for the benefit of the unit tests.
28   gl_MODULE_INDICATOR_FOR_TESTS([$1])
29 ])
30
31 AC_DEFUN([gl_TERMIOS_H_DEFAULTS],
32 [
33   GNULIB_TCGETSID=0;      AC_SUBST([GNULIB_TCGETSID])
34   dnl Assume proper GNU behavior unless another module says otherwise.
35   HAVE_TCGETSID=1;        AC_SUBST([HAVE_TCGETSID])
36 ])