summaryrefslogtreecommitdiff
path: root/modules/poll
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-09-29 01:00:17 +0200
committerBruno Haible <bruno@clisp.org>2010-09-29 01:00:17 +0200
commit11f1d3a976a737eb6ca30cf89e8b47c85bfe3d47 (patch)
tree2750fb1776792f916f4dcdb9ac73d360bca0764a /modules/poll
parent532d19ed682a2fcc68f97fc63c63e0a514f851d5 (diff)
downloadgnulib-11f1d3a976a737eb6ca30cf89e8b47c85bfe3d47.tar.gz
New module 'poll-h'.
* lib/poll.in.h: Include c++defs.h and warn-on-use.h. (poll): Use modern idiom. * modules/poll-h: New file. * modules/poll (Files): Remove lib/poll.in.h. (Depends-on): Add poll-h. (configure.ac): Invoke gl_POLL_MODULE_INDICATOR. (Makefile.am): Move code for generation of poll.h to modules/poll-h. * m4/poll_h.m4: New file. * m4/poll.m4 (gl_FUNC_POLL): Require gl_POLL_H. Don't check for poll.h here. Don't set POLL_H here. Instead, set HAVE_POLL and REPLACE_POLL and invoke gl_REPLACE_POLL_H. * lib/poll.c: Use common idiom. * tests/test-poll.c: Likewise. * doc/posix-headers/poll.texi: Mention the poll-h module. Suggested by Eric Blake.
Diffstat (limited to 'modules/poll')
-rw-r--r--modules/poll14
1 files changed, 2 insertions, 12 deletions
diff --git a/modules/poll b/modules/poll
index 64c1de5c54..8690271e0d 100644
--- a/modules/poll
+++ b/modules/poll
@@ -3,10 +3,10 @@ poll() function: wait for some event on a set of file descriptors.
Files:
lib/poll.c
-lib/poll.in.h
m4/poll.m4
Depends-on:
+poll-h
alloca
select
sys_select
@@ -15,19 +15,9 @@ errno
configure.ac:
gl_FUNC_POLL
+gl_POLL_MODULE_INDICATOR([poll])
Makefile.am:
-BUILT_SOURCES += $(POLL_H)
-
-# We need the following in order to create <poll.h> when the system
-# doesn't have one.
-poll.h: poll.in.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/poll.in.h; \
- } > $@-t && \
- mv -f $@-t $@
-MOSTLYCLEANFILES += poll.h poll.h-t
Include:
<poll.h>