guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-160-g4c187


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-160-g4c187d4
Date: Sat, 09 Mar 2013 10:57:04 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=4c187d46d40aff1601f38675c11f92a73a13a7c9

The branch, stable-2.0 has been updated
       via  4c187d46d40aff1601f38675c11f92a73a13a7c9 (commit)
      from  19113f1ca7a747de06d7b43c6c1eca4cd58d05e5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4c187d46d40aff1601f38675c11f92a73a13a7c9
Author: Andy Wingo <address@hidden>
Date:   Sat Mar 9 11:56:46 2013 +0100

    add check for struct pollfd
    
    * configure.ac: Add check for struct pollfd.
    
    * libguile/fports.c (fport_input_waiting):
    * libguile/poll.c (scm_primitive_poll): Require struct pollfd.  Fixes
      bug 13903.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac      |    2 ++
 libguile/fports.c |    4 ++--
 libguile/poll.c   |    8 ++++----
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index cbad0a1..4157982 100644
--- a/configure.ac
+++ b/configure.ac
@@ -674,6 +674,8 @@ AC_CHECK_TYPE(socklen_t, ,
 
 AC_CHECK_TYPES([struct ip_mreq], , , [#include <netinet/in.h>])
 
+AC_CHECK_TYPES([struct pollfd], , , [#include <poll.h>])
+
 GUILE_HEADER_LIBC_WITH_UNISTD
 
 AC_TYPE_GETGROUPS
diff --git a/libguile/fports.c b/libguile/fports.c
index 10cf671..c1a2800 100644
--- a/libguile/fports.c
+++ b/libguile/fports.c
@@ -1,5 +1,5 @@
 /* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- *   2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, 
Inc.
+ *   2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software 
Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -609,7 +609,7 @@ fport_input_waiting (SCM port)
      highest numerical value of file descriptors that can be monitored.
      Thus, use poll(2) whenever that is possible.  */
 
-#ifdef HAVE_POLL
+#if defined(HAVE_POLL) && defined(HAVE_STRUCT_POLLFD)
   struct pollfd pollfd = { fdes, POLLIN, 0 };
 
   if (poll (&pollfd, 1, 0) < 0)
diff --git a/libguile/poll.c b/libguile/poll.c
index 1bb7572..5bfd97b 100644
--- a/libguile/poll.c
+++ b/libguile/poll.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010, 2013 Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -73,7 +73,7 @@
    If timeout is given and is non-negative, the poll will return after that
    number of milliseconds if no fd became active.
    */
-#ifdef HAVE_POLL
+#if defined(HAVE_POLL) && defined(HAVE_STRUCT_POLLFD)
 static SCM
 scm_primitive_poll (SCM pollfds, SCM nfds, SCM ports, SCM timeout)
 #define FUNC_NAME "primitive-poll"
@@ -174,7 +174,7 @@ scm_primitive_poll (SCM pollfds, SCM nfds, SCM ports, SCM 
timeout)
   return scm_from_int (rv);
 }
 #undef FUNC_NAME
-#endif /* HAVE_POLL */
+#endif /* HAVE_POLL && HAVE_STRUCT_POLLFD */
 
 
 
@@ -182,7 +182,7 @@ scm_primitive_poll (SCM pollfds, SCM nfds, SCM ports, SCM 
timeout)
 static void
 scm_init_poll (void)
 {
-#if HAVE_POLL
+#if defined(HAVE_POLL) && defined(HAVE_STRUCT_POLLFD)
   scm_c_define_gsubr ("primitive-poll", 4, 0, 0, scm_primitive_poll);
   scm_c_define ("%sizeof-struct-pollfd", scm_from_size_t (sizeof (struct 
pollfd)));
 #else


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]