* 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:
		| @@ -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> | 2002-07-29  Pierre Humblet  <pierre.humblet@ieee.org> | ||||||
|  |  | ||||||
| 	* libc/include/sys/unistd.h: Add setgroups prototype for Cygwin. | 	* libc/include/sys/unistd.h: Add setgroups prototype for Cygwin. | ||||||
|   | |||||||
| @@ -71,7 +71,12 @@ popen(program, type) | |||||||
| 	FILE *iop; | 	FILE *iop; | ||||||
| 	int pdes[2], pid; | 	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; | 		errno = EINVAL; | ||||||
| 		return (NULL); | 		return (NULL); | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user