changeset 15502:5bbc9e0b9275

tcgetsid: Detect declaration correctly. * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Use correct headers in AC_CHECK_DECLS invocation. Reported by Simon Josefsson.
author Bruno Haible <bruno@clisp.org>
date Mon, 08 Aug 2011 23:48:51 +0200
parents d362847afa5a
children 3f32114e6397
files ChangeLog m4/tcgetsid.m4
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-08  Bruno Haible  <bruno@clisp.org>
+
+	tcgetsid: Detect declaration correctly.
+	* m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Use correct headers in
+	AC_CHECK_DECLS invocation.
+	Reported by Simon Josefsson.
+
 2011-08-08  Eric Blake  <eblake@redhat.com>
 
 	largefile: fix typo that regressed large file support
--- a/m4/tcgetsid.m4
+++ b/m4/tcgetsid.m4
@@ -1,4 +1,4 @@
-# tcgetsid.m4 serial 3
+# tcgetsid.m4 serial 4
 dnl Copyright (C) 2010-2011 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,7 +11,7 @@
   dnl Persuade glibc <termios.h> to declare tcgetsid().
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
-  AC_CHECK_DECLS_ONCE([tcgetsid])
+  AC_CHECK_DECLS([tcgetsid], , , [[#include <termios.h>]])
   if test $ac_cv_have_decl_tcgetsid = no; then
     HAVE_DECL_TCGETSID=0
   fi