summaryrefslogtreecommitdiff
path: root/m4/tcgetsid.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-12-20 00:47:57 +0100
committerBruno Haible <bruno@clisp.org>2010-12-20 00:47:57 +0100
commit975bf7fd712baa9a21ce6453e88593065e6c1bb9 (patch)
tree5d6abbef911f9fb300549bd9d1d33bc31e9500f3 /m4/tcgetsid.m4
parent0f831d73fa8f157132e1628349a2d5494b8116ec (diff)
downloadgnulib-975bf7fd712baa9a21ce6453e88593065e6c1bb9.tar.gz
tcgetsid: Add missing declaration on OSF/1 5.1.
* lib/termios.in.h (tcgetsid): Test HAVE_DECL_TCGETSID instead of HAVE_TCGETSID. * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Test whether tcgetsid is declared. Don't set HAVE_TCGETSID. * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Initialize HAVE_DECL_TCGETSID, not HAVE_TCGETSID. * modules/termios (Makefile.am): Substitute HAVE_DECL_TCGETSID, not HAVE_TCGETSID. * doc/posix-functions/tcgetsid.texi: Mention the OSF/1 5.1 problem.
Diffstat (limited to 'm4/tcgetsid.m4')
-rw-r--r--m4/tcgetsid.m48
1 files changed, 6 insertions, 2 deletions
diff --git a/m4/tcgetsid.m4 b/m4/tcgetsid.m4
index 11dcc3d599..96efb3ad79 100644
--- a/m4/tcgetsid.m4
+++ b/m4/tcgetsid.m4
@@ -1,4 +1,4 @@
-# tcgetsid.m4 serial 1
+# tcgetsid.m4 serial 2
dnl Copyright (C) 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,9 +11,13 @@ AC_DEFUN([gl_FUNC_TCGETSID],
dnl Persuade glibc <termios.h> to declare tcgetsid().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_DECLS_ONCE([tcgetsid])
+ if test $ac_cv_have_decl_tcgetsid = no; then
+ HAVE_DECL_TCGETSID=0
+ fi
+
AC_CHECK_FUNCS([tcgetsid])
if test $ac_cv_func_tcgetsid = no; then
- HAVE_TCGETSID=0
AC_LIBOBJ([tcgetsid])
gl_PREREQ_TCGETSID
fi