* libc/stdio/popen.c (popen): Allow "rb", "rt", "wb", and "wt" arguments for
popen to match similar functionality in fopen.
This commit is contained in:
parent
245e4e8734
commit
4866247e29
@ -1,3 +1,8 @@
|
||||
2002-08-04 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* libc/stdio/popen.c (popen): Allow "rb", "rt", "wb", and "wt"
|
||||
arguments for popen to match similar functionality in fopen.
|
||||
|
||||
2002-07-29 Pierre Humblet <pierre.humblet@ieee.org>
|
||||
|
||||
* libc/include/sys/unistd.h: Add setgroups prototype for Cygwin.
|
||||
|
@ -71,7 +71,12 @@ popen(program, type)
|
||||
FILE *iop;
|
||||
int pdes[2], pid;
|
||||
|
||||
if ((*type != 'r' && *type != 'w') || type[1]) {
|
||||
if ((*type != 'r' && *type != 'w')
|
||||
|| (type[1]
|
||||
#ifdef __CYGWIN__
|
||||
&& (type[2] || (type[1] != 'b' && type[1] != 't'))
|
||||
#endif
|
||||
)) {
|
||||
errno = EINVAL;
|
||||
return (NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user