annotate modules/read @ 14583:8b22057e98d2

Support non-blocking pipe I/O in read() on native Windows. * lib/unistd.in.h: Include <sys/types.h> also for 'read'. (read): New declaration. * lib/read.c: New file. * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_SCANF, _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM): New macros. (fgetc, fgets, fread, fscanf, getc, getchar, gets, scanf, vfscanf, vscanf): New declarations. * lib/stdio-read.c: New file. * m4/read.m4: New file. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_READ, REPLACE_READ. * m4/stdio_h.m4 (gl_STDIO_H): Set GNULIB_FGETC, GNULIB_FGETS, GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS, GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF. In non-blocking I/O is desired and needs workarounds, set REPLACE_STDIO_READ_FUNCS. (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FGETC, GNULIB_FGETS, GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS, GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS. * modules/read: New file. * modules/nonblocking (Files): Add lib/stdio-read.c. * modules/unistd (Makefile.am): Substitute GNULIB_READ, REPLACE_READ. * modules/stdio (Makefile.am): Substitute GNULIB_FGETC, GNULIB_FGETS, GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS, GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS. * modules/pread (Depends-on): Add read. * modules/safe-read (Depends-on): Likewise. * tests/test-stdio-c++.cc (fgetc, fgets, fread, fscanf, getc, getchar, gets, scanf, vfscanf, vscanf): Verify signatures. * doc/posix-functions/read.texi: Mention 'nonblocking' module and problem with non-blocking pipes. * doc/posix-functions/fgetc.texi: Likewise. * doc/posix-functions/fgets.texi: Likewise. * doc/posix-functions/fread.texi: Likewise. * doc/posix-functions/fscanf.texi: Likewise. * doc/posix-functions/getc.texi: Likewise. * doc/posix-functions/getchar.texi: Likewise. * doc/posix-functions/gets.texi: Likewise. * doc/posix-functions/scanf.texi: Likewise. * doc/posix-functions/vfscanf.texi: Likewise. * doc/posix-functions/vscanf.texi: Likewise.
author Bruno Haible <bruno@clisp.org>
date Fri, 15 Apr 2011 01:02:13 +0200
parents
children a30201cdf27e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14583
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 Description:
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 POSIX compatible read() function: read data from a file descriptor
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 Files:
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 lib/read.c
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 m4/read.m4
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 Depends-on:
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 unistd
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 configure.ac:
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 gl_FUNC_READ
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 gl_UNISTD_MODULE_INDICATOR([read])
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 Makefile.am:
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 Include:
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 <unistd.h>
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 License:
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 LGPLv2+
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 Maintainer:
8b22057e98d2 Support non-blocking pipe I/O in read() on native Windows.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 Bruno Haible